diff --git a/content/en/llm_observability/instrumentation/sdk.md b/content/en/llm_observability/instrumentation/sdk.md index 78c79e951df..a3b787fc79d 100644 --- a/content/en/llm_observability/instrumentation/sdk.md +++ b/content/en/llm_observability/instrumentation/sdk.md @@ -1252,6 +1252,10 @@ public class MyJavaClass { ## Enriching spans +
+The metrics parameter here refers to numeric values attached as attributes on individual spans — not Datadog platform metrics. For certain recognized keys such as input_tokens, output_tokens, and total_tokens, Datadog uses these span attributes to generate corresponding platform metrics (such as ml_obs.span.llm.input.tokens) for use in dashboards and monitors. +
+ {{< tabs >}} {{% tab "Python" %}} The SDK provides the method `LLMObs.annotate()` to enrich spans with inputs, outputs, and metadata. @@ -1923,6 +1927,8 @@ Attach token metrics (for automatic cost tracking) or cost metrics (for manual c If you're using automatic instrumentation, token and cost metrics appear on your spans automatically. If you're instrumenting manually, follow the guidance below. +
In this context, "token metrics" and "cost metrics" refer to numeric key-value pairs you attach to spans through the metrics parameter of the LLMObs.annotate() method. These are distinct from Datadog platform LLM Observability metrics. For recognized keys such as input_tokens, output_tokens, input_cost, and output_cost, Datadog uses these span attributes to generate corresponding platform metrics (such as ml_obs.span.llm.input.cost) for use in dashboards and monitors.
+ {{< tabs >}} {{% tab "Python" %}}