Skip to content

Commit 64eb6ef

Browse files
authored
feat: Support proxying instrumentation telemetry API payloads (#777)
## Ticket https://datadoghq.atlassian.net/browse/SVLS-7324 ## Overview Instrumentation Telemetry is not enabled for Lambda. This PR adds support for it. ## Testing Deployed for testing and checked logs: `DD_EXTENSION | DEBUG | Trace Agent | Proxied request for instrumentation` `DD_EXTENSION | DEBUG | Proxy Flusher | Successfully sent request in 340 ms to https://instrumentation-telemetry-intake.datadoghq.com/api/v2/apmtelemetry`
1 parent 75ab348 commit 64eb6ef

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

bottlecap/src/traces/trace_agent.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const LLM_OBS_EVAL_METRIC_ENDPOINT_PATH_V2: &str =
5353
const LLM_OBS_SPANS_ENDPOINT_PATH: &str = "/evp_proxy/v2/api/v2/llmobs";
5454
const INFO_ENDPOINT_PATH: &str = "/info";
5555
const DEBUGGER_ENDPOINT_PATH: &str = "/debugger/v1/input";
56+
const INSTRUMENTATION_ENDPOINT_PATH: &str = "/telemetry/proxy/api/v2/apmtelemetry";
5657

5758
// Intake endpoints
5859
const DSM_INTAKE_PATH: &str = "/api/v0.1/pipeline_stats";
@@ -61,6 +62,7 @@ const LLM_OBS_EVAL_METRIC_INTAKE_PATH: &str = "/api/intake/llm-obs/v1/eval-metri
6162
const LLM_OBS_EVAL_METRIC_INTAKE_PATH_V2: &str = "/api/intake/llm-obs/v2/eval-metric";
6263
const PROFILING_INTAKE_PATH: &str = "/api/v2/profile";
6364
const DEBUGGER_LOGS_INTAKE_PATH: &str = "/api/v2/logs";
65+
const INSTRUMENTATION_INTAKE_PATH: &str = "/api/v2/apmtelemetry";
6466

6567
const TRACER_PAYLOAD_CHANNEL_BUFFER_SIZE: usize = 10;
6668
const STATS_PAYLOAD_CHANNEL_BUFFER_SIZE: usize = 10;
@@ -231,6 +233,10 @@ impl TraceAgent {
231233
)
232234
.route(LLM_OBS_SPANS_ENDPOINT_PATH, post(Self::llm_obs_spans_proxy))
233235
.route(DEBUGGER_ENDPOINT_PATH, post(Self::debugger_logs_proxy))
236+
.route(
237+
INSTRUMENTATION_ENDPOINT_PATH,
238+
post(Self::instrumentation_proxy),
239+
)
234240
.with_state(proxy_state);
235241

236242
let info_router = Router::new().route(INFO_ENDPOINT_PATH, any(Self::info));
@@ -366,6 +372,18 @@ impl TraceAgent {
366372
.await
367373
}
368374

375+
async fn instrumentation_proxy(State(state): State<ProxyState>, request: Request) -> Response {
376+
Self::handle_proxy(
377+
state.config,
378+
state.proxy_aggregator,
379+
request,
380+
"instrumentation-telemetry-intake",
381+
INSTRUMENTATION_INTAKE_PATH,
382+
"instrumentation",
383+
)
384+
.await
385+
}
386+
369387
#[allow(clippy::unused_async)]
370388
async fn info() -> Response {
371389
let response_json = json!(

0 commit comments

Comments
 (0)