Skip to content

Traceloop

Send CredenceStack's traces to Traceloop over OTLP, and see how they sit next to spans from Traceloop's own instrumentation (OpenLLMetry).

Facts on this page

Traceloop accepts OTLP (vendor docs). Its endpoint and authentication header were not confirmed by this build (it ran offline): they are marked TODO-verify. Check them against Traceloop's documentation before relying on them.

Prerequisites

  • pip install "credencestack[otel]"
  • A Traceloop account and an API key.

What you need from Traceloop

  • An API key.
  • The OTLP endpoint: TODO-verify (Traceloop's docs give it).
  • The authentication header format: TODO-verify (commonly an Authorization header with a bearer token for OTLP backends; confirm the exact form for Traceloop).

Configure

export OTEL_EXPORTER_OTLP_ENDPOINT="<Traceloop's OTLP endpoint>"          # TODO-verify
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_HEADERS="<header name>=<value with your key>"    # TODO-verify

Run

credencestack otel check
credencestack run -p payments --agent my_agent:policy --otel

Verify

  1. otel check prints OK, and the run ends with OTel: exported N span(s).
  2. In Traceloop, open the traces view (TODO-verify the menu name) for the last hour.
  3. Find credencestack scenario PAY-001 #0; it should contain invoke_agent and the execute_tool spans, and carry credencestack.result and the finding events.

CredenceStack spans and OpenLLMetry spans

If your agent is instrumented with OpenLLMetry, its own LLM and tool spans are emitted through the global tracer provider. With CredenceStack's default CREDENCESTACK_OTEL_AGENT_SPANS nest, CredenceStack installs its provider as the global one when the agent has not set one, so those spans export through CredenceStack's exporter and nest under its invoke_agent span. If your code initialises OpenLLMetry first (which installs its own provider), CredenceStack keeps it; its spans then go wherever OpenLLMetry sends them, and CredenceStack's spans still go to CredenceStack's endpoint. How OpenLLMetry's initialisation interacts with an existing provider is TODO-verify for your version.

Expect two kinds of tool span: OpenLLMetry's (what the agent called) and CredenceStack's, marked credencestack.source=harness (what the simulated environment received).

Useful views and alerts

  • Filter on credencestack.result = fail, or on credencestack.findings.max_severity = critical.
  • Compare credencestack.tool_calls across releases of the agent.

Filter generated scenarios and difficulty

Scenario spans of generated scenarios carry credencestack.forge.* attributes (reference). In the traces view, filter on the span attributes credencestack.forge.generated, credencestack.forge.level and credencestack.result (TODO-verify the attribute filter Traceloop offers for OTLP spans).

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

  • Endpoint, header and UI names are unverified (above).
  • If you see duplicate model spans, decide which to keep: CredenceStack's chat spans carry only what the connector recorded; OpenLLMetry's usually carry more detail.

Last verified

2026-11-28, offline: not tested against a Traceloop account. Docs: https://www.traceloop.com/docs (TODO-verify the page for OTLP ingestion).