pub struct RecordedRequest {Show 15 fields
pub id: String,
pub protocol: Protocol,
pub timestamp: DateTime<Utc>,
pub method: String,
pub path: String,
pub query_params: Option<String>,
pub headers: String,
pub body: Option<String>,
pub body_encoding: String,
pub client_ip: Option<String>,
pub trace_id: Option<String>,
pub span_id: Option<String>,
pub duration_ms: Option<i64>,
pub status_code: Option<i32>,
pub tags: Option<String>,
}
Expand description
Recorded HTTP/API request
Fields§
§id: String
Unique request ID
protocol: Protocol
Protocol type
timestamp: DateTime<Utc>
Timestamp
method: String
HTTP method or gRPC method name
path: String
Request path or endpoint
query_params: Option<String>
Query parameters (for HTTP)
headers: String
Request headers (JSON)
body: Option<String>
Request body (may be base64 encoded for binary)
body_encoding: String
Body encoding (utf8, base64)
client_ip: Option<String>
Client IP address
trace_id: Option<String>
Trace ID (from OpenTelemetry)
span_id: Option<String>
Span ID (from OpenTelemetry)
duration_ms: Option<i64>
Duration in milliseconds
status_code: Option<i32>
Response status code
Tags for categorization (JSON array)
Implementations§
Source§impl RecordedRequest
impl RecordedRequest
Sourcepub fn headers_map(&self) -> HashMap<String, String>
pub fn headers_map(&self) -> HashMap<String, String>
Parse headers from JSON string
Sourcepub fn query_params_map(&self) -> HashMap<String, String>
pub fn query_params_map(&self) -> HashMap<String, String>
Parse query parameters
Parse tags
Sourcepub fn decoded_body(&self) -> Option<Vec<u8>>
pub fn decoded_body(&self) -> Option<Vec<u8>>
Decode body based on encoding
Trait Implementations§
Source§impl Clone for RecordedRequest
impl Clone for RecordedRequest
Source§fn clone(&self) -> RecordedRequest
fn clone(&self) -> RecordedRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RecordedRequest
impl Debug for RecordedRequest
Source§impl<'de> Deserialize<'de> for RecordedRequest
impl<'de> Deserialize<'de> for RecordedRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'r> FromRow<'r, SqliteRow> for RecordedRequest
impl<'r> FromRow<'r, SqliteRow> for RecordedRequest
Auto Trait Implementations§
impl Freeze for RecordedRequest
impl RefUnwindSafe for RecordedRequest
impl Send for RecordedRequest
impl Sync for RecordedRequest
impl Unpin for RecordedRequest
impl UnwindSafe for RecordedRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more