pub struct ServerSpan {Show 15 fields
pub ctx: TraceContext,
pub method: String,
pub method_original: Option<String>,
pub url_path: String,
pub url_query: Option<String>,
pub url_scheme: String,
pub status_code: u16,
pub client_address: Option<String>,
pub server_address: Option<String>,
pub user_agent: Option<String>,
pub protocol_version: Option<String>,
pub outcome: String,
pub request_id: String,
pub start_unix_nano: u128,
pub end_unix_nano: u128,
}Expand description
One proxied HTTP request, rendered as an OpenTelemetry SERVER span.
Attribute names follow the current stable HTTP semantic conventions, which renamed nearly all of
them (http.method became http.request.method, http.url became url.*). Getting these wrong
is not cosmetic: every backend normalizes on the stable names, so an old-name span is dropped
from latency and error panels rather than being merely oddly labelled.
Fields§
§ctx: TraceContext§method: StringThe method, or _OTHER when it is not one of the known set (semconv requires that).
method_original: Option<String>Set only when method was replaced by _OTHER.
url_path: String§url_query: Option<String>The query string, already sanitised by crate::accesslog::sanitize_target. None
when the request carried none.
This is the one place the HTTP semconv is deliberately not followed to the letter. The spec wants the query as received; this proxy redacts credential-shaped values everywhere else it writes them, and a span is shipped to the same class of destination as an access log. Sending the raw query here would reintroduce, in traces, exactly the leak the access log was built to prevent.
url_scheme: String§status_code: u16§client_address: Option<String>§server_address: Option<String>§user_agent: Option<String>§protocol_version: Option<String>§outcome: StringEdgeGuard’s own verdict (proxied, rate_limited, waf_blocked, …). Not a semconv
attribute, so it is namespaced — it says WHY a request ended as it did, which the status code
alone does not.
request_id: String§start_unix_nano: u128§end_unix_nano: u128Implementations§
Source§impl ServerSpan
impl ServerSpan
Trait Implementations§
Source§impl Clone for ServerSpan
impl Clone for ServerSpan
Source§fn clone(&self) -> ServerSpan
fn clone(&self) -> ServerSpan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more