diff --git a/.changesets/fix_rohan_b99_http_client_spans_missing_status_code.md b/.changesets/fix_rohan_b99_http_client_spans_missing_status_code.md new file mode 100644 index 0000000000..89dbd6d953 --- /dev/null +++ b/.changesets/fix_rohan_b99_http_client_spans_missing_status_code.md @@ -0,0 +1,5 @@ +### fix: add http.response.status_code and error.type attributes to http_request spans ([PR #8775](https://github.com/apollographql/router/pull/8775)) + +The `http.response.status_code` attribute is now always added to http_request spans (e.g. for router -> subgraph requests), and `error.type` is conditionally added for non-success status codes. + +By [@rohan-b99](https://github.com/rohan-b99) in https://github.com/apollographql/router/pull/8775 diff --git a/apollo-router/src/services/http/service.rs b/apollo-router/src/services/http/service.rs index 5afcee235e..a7d6109429 100644 --- a/apollo-router/src/services/http/service.rs +++ b/apollo-router/src/services/http/service.rs @@ -17,6 +17,7 @@ use hyper_util::client::legacy::connect::HttpConnector; #[cfg(unix)] use hyperlocal::UnixConnector; use opentelemetry::global; +use opentelemetry_semantic_conventions::attribute::HTTP_RESPONSE_STATUS_CODE; use rustls::ClientConfig; use rustls::RootCertStore; use schemars::JsonSchema; @@ -37,6 +38,7 @@ use crate::configuration::TlsClientAuth; use crate::error::FetchError; use crate::plugins::authentication::subgraph::SigningParamsConfig; use crate::plugins::telemetry::HttpClientAttributes; +use crate::plugins::telemetry::config_new::attributes::ERROR_TYPE; use crate::plugins::telemetry::consts::HTTP_REQUEST_SPAN_NAME; use crate::plugins::telemetry::dynamic_attribute::SpanDynAttribute; use crate::plugins::telemetry::otel::OpenTelemetrySpanExt; @@ -406,6 +408,7 @@ async fn do_fetch( service_name: &str, request: Request, ) -> Result, FetchError> { + let span = tracing::Span::current(); let (parts, body) = client .call(request) .await @@ -418,8 +421,195 @@ async fn do_fetch( } })? .into_parts(); + + span.set_span_dyn_attribute( + opentelemetry::Key::new(HTTP_RESPONSE_STATUS_CODE), + opentelemetry::Value::I64(parts.status.as_u16() as i64), + ); + + if !parts.status.is_success() { + span.set_span_dyn_attribute( + opentelemetry::Key::new(ERROR_TYPE), + opentelemetry::Value::String(parts.status.as_str().to_owned().into()), + ); + } + Ok(http::Response::from_parts( parts, RouterBody::new(body.map_err(axum::Error::new)), )) } + +#[cfg(test)] +mod tests { + use std::collections::HashMap; + use std::str::FromStr; + use std::sync::Arc; + use std::sync::Mutex; + + use http::StatusCode; + use http::Uri; + use http::header::CONTENT_TYPE; + use hyper_rustls::ConfigBuilderExt; + use mime::APPLICATION_JSON; + use tokio::net::TcpListener; + use tower::ServiceExt; + use tracing::Subscriber; + use tracing::subscriber::DefaultGuard; + use tracing_subscriber::Layer; + use tracing_subscriber::layer::SubscriberExt; + use tracing_subscriber::registry::LookupSpan; + + use crate::Context; + use crate::plugins::telemetry::dynamic_attribute::DynAttributeLayer; + use crate::plugins::telemetry::otel; + use crate::plugins::telemetry::otel::OtelData; + use crate::services::http::HttpClientService; + use crate::services::http::HttpRequest; + use crate::services::router; + + async fn emulate_subgraph_with_status_code(listener: TcpListener, status_code: StatusCode) { + crate::services::http::tests::serve(listener, move |_| async move { + Ok(http::Response::builder() + .status(status_code) + .body(r#"{}"#.into()) + .unwrap()) + }) + .await + .unwrap(); + } + + #[derive(Default, Clone)] + struct RecordingLayer { + pub values: Arc>>, + } + + impl RecordingLayer { + fn get(&self, key: &str) -> Option { + self.values.lock().unwrap().get(key).cloned() + } + } + + impl Layer for RecordingLayer + where + S: Subscriber + for<'span> LookupSpan<'span>, + { + fn on_exit( + &self, + id: &tracing_core::span::Id, + ctx: tracing_subscriber::layer::Context<'_, S>, + ) { + let mut map = self.values.lock().unwrap(); + if let Some(span) = ctx.span(id) + && let Some(otel_data) = span.extensions().get::() + && let Some(attributes) = otel_data.builder.attributes.as_ref() + { + for attribute in attributes { + map.insert(attribute.key.to_string(), attribute.value.clone()); + } + } + } + } + + fn setup_tracing() -> (DefaultGuard, RecordingLayer) { + let recording_layer = RecordingLayer::default(); + let layer = DynAttributeLayer; + let subscriber = tracing_subscriber::Registry::default() + .with(layer) + .with(otel::layer().force_sampling()) + .with(recording_layer.clone()); + let guard = tracing::subscriber::set_default(subscriber); + (guard, recording_layer) + } + + #[tokio::test] + async fn test_http_client_adds_status_code_and_error_type_attributes_to_500_span() { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + let socket_addr = listener.local_addr().unwrap(); + + tokio::task::spawn(emulate_subgraph_with_status_code( + listener, + StatusCode::INTERNAL_SERVER_ERROR, + )); + + let http_client_service = HttpClientService::new( + "test", + rustls::ClientConfig::builder() + .with_native_roots() + .expect("Able to load native roots") + .with_no_client_auth(), + crate::configuration::shared::Client::builder().build(), + ) + .expect("can create a HttpClientService"); + + let (_guard, recording_layer) = setup_tracing(); + + let url = Uri::from_str(&format!("http://{socket_addr}")).unwrap(); + let response = http_client_service + .oneshot(HttpRequest { + http_request: http::Request::builder() + .uri(url) + .header(CONTENT_TYPE, APPLICATION_JSON.essence_str()) + .body(router::body::from_bytes(r#"{"query":"{ me { name } }"#)) + .unwrap(), + context: Context::new(), + }) + .await + .unwrap(); + + assert_eq!( + response.http_response.status(), + StatusCode::INTERNAL_SERVER_ERROR + ); + + assert_eq!( + recording_layer.get("http.response.status_code"), + Some(opentelemetry::Value::I64(500)) + ); + assert_eq!( + recording_layer.get("error.type"), + Some(opentelemetry::Value::String("500".to_string().into())), + ); + } + + #[tokio::test] + async fn test_http_client_adds_status_code_attributes_to_200_span() { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + let socket_addr = listener.local_addr().unwrap(); + + tokio::task::spawn(emulate_subgraph_with_status_code(listener, StatusCode::OK)); + + let http_client_service = HttpClientService::new( + "test", + rustls::ClientConfig::builder() + .with_native_roots() + .expect("Able to load native roots") + .with_no_client_auth(), + crate::configuration::shared::Client::builder().build(), + ) + .expect("can create a HttpClientService"); + + let (_guard, recording_layer) = setup_tracing(); + + let url = Uri::from_str(&format!("http://{socket_addr}")).unwrap(); + let response = http_client_service + .oneshot(HttpRequest { + http_request: http::Request::builder() + .uri(url) + .header(CONTENT_TYPE, APPLICATION_JSON.essence_str()) + .body(router::body::from_bytes(r#"{"query":"{ me { name } }"#)) + .unwrap(), + context: Context::new(), + }) + .await + .unwrap(); + + assert_eq!(response.http_response.status(), StatusCode::OK); + + assert_eq!( + recording_layer.get("http.response.status_code"), + Some(opentelemetry::Value::I64(200)) + ); + assert_eq!(recording_layer.get("error.type"), None); + } +} diff --git a/apollo-router/src/services/http/tests.rs b/apollo-router/src/services/http/tests.rs index 498ff8ced4..c140fdcd0b 100644 --- a/apollo-router/src/services/http/tests.rs +++ b/apollo-router/src/services/http/tests.rs @@ -183,7 +183,10 @@ async fn tls_server( } } -async fn serve(listener: TcpListener, handle: Handler) -> std::io::Result<()> +pub(crate) async fn serve( + listener: TcpListener, + handle: Handler, +) -> std::io::Result<()> where Handler: (Fn(http::Request) -> Fut) + Clone + Sync + Send + 'static, Fut: std::future::Future, Infallible>> + Send + 'static, diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__batch_send_header-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__batch_send_header-2.snap index d069ee55b1..e50a3122a0 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__batch_send_header-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__batch_send_header-2.snap @@ -460,7 +460,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -586,7 +589,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -712,7 +718,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -982,7 +991,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1108,7 +1120,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1234,7 +1249,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__batch_send_header.snap b/apollo-router/tests/snapshots/apollo_otel_traces__batch_send_header.snap index d069ee55b1..e50a3122a0 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__batch_send_header.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__batch_send_header.snap @@ -460,7 +460,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -586,7 +589,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -712,7 +718,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -982,7 +991,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1108,7 +1120,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1234,7 +1249,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__batch_trace_id-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__batch_trace_id-2.snap index fec5016370..c46b22fab1 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__batch_trace_id-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__batch_trace_id-2.snap @@ -460,7 +460,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -586,7 +589,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -712,7 +718,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -982,7 +991,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1108,7 +1120,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1234,7 +1249,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__batch_trace_id.snap b/apollo-router/tests/snapshots/apollo_otel_traces__batch_trace_id.snap index fec5016370..c46b22fab1 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__batch_trace_id.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__batch_trace_id.snap @@ -460,7 +460,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -586,7 +589,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -712,7 +718,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -982,7 +991,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1108,7 +1120,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1234,7 +1249,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__client_name-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__client_name-2.snap index 0791fe568d..9afd8a36ac 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__client_name-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__client_name-2.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__client_name.snap b/apollo-router/tests/snapshots/apollo_otel_traces__client_name.snap index 0791fe568d..9afd8a36ac 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__client_name.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__client_name.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__client_version-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__client_version-2.snap index eaf3ec9fd2..30df031d34 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__client_version-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__client_version-2.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__client_version.snap b/apollo-router/tests/snapshots/apollo_otel_traces__client_version.snap index eaf3ec9fd2..30df031d34 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__client_version.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__client_version.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__condition_else-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__condition_else-2.snap index 0c45204836..dfc88f0fd9 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__condition_else-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__condition_else-2.snap @@ -478,7 +478,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -610,7 +613,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -742,7 +748,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__condition_else.snap b/apollo-router/tests/snapshots/apollo_otel_traces__condition_else.snap index 0c45204836..dfc88f0fd9 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__condition_else.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__condition_else.snap @@ -478,7 +478,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -610,7 +613,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -742,7 +748,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__condition_if-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__condition_if-2.snap index 2275283e09..4a1499c9b0 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__condition_if-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__condition_if-2.snap @@ -496,7 +496,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -673,7 +676,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -805,7 +811,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__condition_if.snap b/apollo-router/tests/snapshots/apollo_otel_traces__condition_if.snap index 2275283e09..4a1499c9b0 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__condition_if.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__condition_if.snap @@ -496,7 +496,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -673,7 +676,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -805,7 +811,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__connector-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__connector-2.snap index 2ebc89bd7d..35c5da51ad 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__connector-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__connector-2.snap @@ -406,7 +406,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__connector.snap b/apollo-router/tests/snapshots/apollo_otel_traces__connector.snap index 2ebc89bd7d..35c5da51ad 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__connector.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__connector.snap @@ -406,7 +406,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__connector_error-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__connector_error-2.snap index a39dd672c1..032c230a1a 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__connector_error-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__connector_error-2.snap @@ -424,7 +424,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -554,7 +557,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -603,7 +609,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -652,7 +661,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -701,7 +713,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -750,7 +765,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -799,7 +817,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -848,7 +869,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -897,7 +921,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -946,7 +973,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -995,7 +1025,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1044,7 +1077,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1093,7 +1129,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1142,7 +1181,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1191,7 +1233,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1240,7 +1285,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1289,7 +1337,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1338,7 +1389,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1387,7 +1441,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1436,7 +1493,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1485,7 +1545,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1534,7 +1597,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1583,7 +1649,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1632,7 +1701,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1681,7 +1753,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1730,7 +1805,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1779,7 +1857,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1828,7 +1909,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1877,7 +1961,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1926,7 +2013,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1975,7 +2065,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2024,7 +2117,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2073,7 +2169,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2122,7 +2221,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2171,7 +2273,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2220,7 +2325,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2269,7 +2377,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2318,7 +2429,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2367,7 +2481,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2416,7 +2533,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2465,7 +2585,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2514,7 +2637,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2563,7 +2689,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2612,7 +2741,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2661,7 +2793,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2710,7 +2845,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2759,7 +2897,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2808,7 +2949,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2857,7 +3001,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2906,7 +3053,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2955,7 +3105,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__connector_error.snap b/apollo-router/tests/snapshots/apollo_otel_traces__connector_error.snap index a39dd672c1..032c230a1a 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__connector_error.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__connector_error.snap @@ -424,7 +424,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -554,7 +557,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -603,7 +609,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -652,7 +661,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -701,7 +713,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -750,7 +765,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -799,7 +817,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -848,7 +869,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -897,7 +921,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -946,7 +973,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -995,7 +1025,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1044,7 +1077,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1093,7 +1129,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1142,7 +1181,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1191,7 +1233,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1240,7 +1285,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1289,7 +1337,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1338,7 +1389,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1387,7 +1441,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1436,7 +1493,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1485,7 +1545,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1534,7 +1597,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1583,7 +1649,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1632,7 +1701,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1681,7 +1753,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1730,7 +1805,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1779,7 +1857,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1828,7 +1909,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1877,7 +1961,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1926,7 +2013,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -1975,7 +2065,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2024,7 +2117,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2073,7 +2169,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2122,7 +2221,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2171,7 +2273,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2220,7 +2325,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2269,7 +2377,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2318,7 +2429,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2367,7 +2481,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2416,7 +2533,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2465,7 +2585,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2514,7 +2637,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2563,7 +2689,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2612,7 +2741,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2661,7 +2793,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2710,7 +2845,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2759,7 +2897,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2808,7 +2949,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2857,7 +3001,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2906,7 +3053,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -2955,7 +3105,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "404" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__non_defer-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__non_defer-2.snap index 96a3eed566..8f789400c3 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__non_defer-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__non_defer-2.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__non_defer.snap b/apollo-router/tests/snapshots/apollo_otel_traces__non_defer.snap index 96a3eed566..8f789400c3 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__non_defer.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__non_defer.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__send_header-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__send_header-2.snap index d090a76689..6bd45e39ee 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__send_header-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__send_header-2.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__send_header.snap b/apollo-router/tests/snapshots/apollo_otel_traces__send_header.snap index d090a76689..6bd45e39ee 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__send_header.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__send_header.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__send_variable_value-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__send_variable_value-2.snap index a6daaabc5b..e150c8a2cc 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__send_variable_value-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__send_variable_value-2.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__send_variable_value.snap b/apollo-router/tests/snapshots/apollo_otel_traces__send_variable_value.snap index a6daaabc5b..e150c8a2cc 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__send_variable_value.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__send_variable_value.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__trace_id-2.snap b/apollo-router/tests/snapshots/apollo_otel_traces__trace_id-2.snap index 96a3eed566..8f789400c3 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__trace_id-2.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__trace_id-2.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 diff --git a/apollo-router/tests/snapshots/apollo_otel_traces__trace_id.snap b/apollo-router/tests/snapshots/apollo_otel_traces__trace_id.snap index 96a3eed566..8f789400c3 100644 --- a/apollo-router/tests/snapshots/apollo_otel_traces__trace_id.snap +++ b/apollo-router/tests/snapshots/apollo_otel_traces__trace_id.snap @@ -439,7 +439,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -571,7 +574,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0 @@ -703,7 +709,10 @@ resourceSpans: kind: 3 startTimeUnixNano: "[start_time]" endTimeUnixNano: "[end_time]" - attributes: [] + attributes: + - key: http.response.status_code + value: + intValue: "200" droppedAttributesCount: 0 events: [] droppedEventsCount: 0