diff --git a/crates/common/src/consts.rs b/crates/common/src/consts.rs index b8348ad4..0e6c5b64 100644 --- a/crates/common/src/consts.rs +++ b/crates/common/src/consts.rs @@ -30,3 +30,4 @@ pub const ARCH_MODEL_PREFIX: &str = "Arch"; pub const HALLUCINATION_TEMPLATE: &str = "It seems I'm missing some information. Could you provide the following details "; pub const OTEL_COLLECTOR_HTTP: &str = "opentelemetry_collector_http"; +pub const OTEL_POST_PATH: &str = "/v1/trace"; diff --git a/crates/llm_gateway/src/filter_context.rs b/crates/llm_gateway/src/filter_context.rs index c058af5a..2f73151d 100644 --- a/crates/llm_gateway/src/filter_context.rs +++ b/crates/llm_gateway/src/filter_context.rs @@ -1,6 +1,7 @@ use crate::stream_context::StreamContext; use common::configuration::Configuration; use common::consts::OTEL_COLLECTOR_HTTP; +use common::consts::OTEL_POST_PATH; use common::http::CallArgs; use common::http::Client; use common::llm_providers::LlmProviders; @@ -156,10 +157,10 @@ impl RootContext for FilterContext { debug!("trace: {}", trace_str); let call_args = CallArgs::new( OTEL_COLLECTOR_HTTP, - "/v1/traces", + OTEL_POST_PATH, vec![ - (":method", "POST"), - (":path", "/v1/traces"), + (":method", http::Method::POST.as_str()), + (":path", OTEL_POST_PATH), (":authority", OTEL_COLLECTOR_HTTP), ("content-type", "application/json"), ],