This commit is contained in:
Adil Hafeez 2024-11-18 15:53:38 -08:00
parent 00e2f3caac
commit 2203f85906
2 changed files with 5 additions and 3 deletions

View file

@ -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";

View file

@ -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"),
],