Datadog¶
Send CredenceStack's traces to Datadog's LLM Observability (Agent Observability), directly over OTLP/HTTP or through a Datadog Agent in OTLP mode.
Facts on this page
Items marked (vendor docs) come from Datadog's documentation as checked by the maintainers. Items marked TODO-verify were not confirmed by this build (it ran offline): check them against Datadog's LLM Observability OpenTelemetry docs before relying on them.
Prerequisites¶
pip install "credencestack[otel]"- A Datadog organisation with LLM Observability, and a Datadog API key.
What you need from Datadog¶
- Your API key.
- Your Datadog site (for example US1 or EU1) and the matching OTLP intake endpoint: TODO-verify for every site in Datadog's docs.
Datadog ingests OpenTelemetry traces that follow the GenAI semantic conventions
v1.37 or later (vendor docs). CredenceStack uses the 1.37+ names (for example
gen_ai.provider.name, not gen_ai.system).
Configure: direct OTLP¶
From Datadog's docs (vendor docs): the protocol is HTTP/protobuf and two headers are set, the API key and the LLM Observability source.
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_TRACES_HEADERS="dd-api-key=${DD_API_KEY},dd-otlp-source=llmobs"
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="<your site's OTLP traces intake URL>" # TODO-verify
Some Datadog setups also document an export header DD-LLMObs-Enabled=true and a
resource attribute dd_llmobs_enabled=true (vendor docs). If your setup needs them:
export OTEL_EXPORTER_OTLP_TRACES_HEADERS="${OTEL_EXPORTER_OTLP_TRACES_HEADERS},DD-LLMObs-Enabled=true"
export OTEL_RESOURCE_ATTRIBUTES="dd_llmobs_enabled=true"
Configure: through the Datadog Agent¶
Sending through a Datadog Agent with its OTLP receiver enabled is also supported (vendor docs). The Agent then holds the API key, and CredenceStack sends to it locally:
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318" # the Agent's OTLP/HTTP port
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
How to enable the Agent's OTLP receiver, and whether spans reach LLM Observability or APM by that route, is TODO-verify against Datadog's Agent docs for your version.
Run¶
credencestack otel check
credencestack run -p payments -p fincrime --agent my_agent:policy --otel
Verify¶
otel checkprints OK, and the run ends withOTel: exported N span(s).- In Datadog, open LLM Observability's traces (TODO-verify the menu path) for the last hour.
- Each
credencestack scenario <id> #<epoch>trace should appear as one agent run, withinvoke_agent,execute_tooland (where captured)chatspans. - Open one and check the attributes
credencestack.result,credencestack.findings.max_severityandcredencestack.scenario.pack, and thecredencestack.findingevents.
Useful views and alerts¶
- A monitor on spans where
credencestack.result:failandcredencestack.scenario.severity:critical, scoped toservice:credencestack. - A dashboard of
credencestack.findings.countbycredencestack.scenario.domain. - Report links: set
CREDENCESTACK_OTEL_TRACE_URL_TEMPLATEto your Datadog trace URL with{trace_id}(the URL format is TODO-verify).
Remember that a failed test leaves the span status unset (it is not an APM error); use
credencestack.test_failed:true for failures.
Filter generated scenarios and difficulty¶
Scenario spans of generated scenarios carry
credencestack.forge.* attributes (reference). In Trace Explorer, search span attributes with @:
@credencestack.forge.generated:true @credencestack.forge.level:>=4 @credencestack.result:fail
Compare the failure rate by level with the fixed scenarios (credencestack.forge.generated absent) to see the brittleness of an agent in your own traces.
Limitations and troubleshooting¶
- Which CredenceStack attributes LLM Observability shows in its own views is Datadog's mapping, TODO-verify.
- 403 usually means the API key or site do not match (an EU key against a US intake).
- Datadog's conventions requirement is v1.37+; the GenAI conventions are still in Development, so names may change in later CredenceStack releases.
Last verified¶
2026-11-28, offline: the facts marked (vendor docs) were supplied by the maintainers from Datadog's documentation; nothing was tested against a Datadog account. Docs: https://docs.datadoghq.com/llm_observability/instrumentation/otel_instrumentation/ (TODO-verify the URL).