Skip to content

Splunk Observability Cloud

Send CredenceStack's traces to Splunk Observability Cloud, usually through the Splunk Distribution of the OpenTelemetry Collector, or directly over OTLP with an access token.

Facts on this page

The two routes (the Splunk Distribution of the OpenTelemetry Collector, or direct OTLP with an access token) are from the maintainers' reading of Splunk's docs. The realm-based endpoint and the token header name were not confirmed by this build (it ran offline) and are marked TODO-verify. Check them against Splunk Observability Cloud's documentation before relying on them.

Prerequisites

  • pip install "credencestack[otel]"
  • A Splunk Observability Cloud organisation, your realm (for example us1), and an access token with permission to send traces.

Route 1 (usual): the Splunk Distribution of the OpenTelemetry Collector

Install and run the Splunk Distribution of the Collector with your realm and token, as Splunk's docs describe. It listens for OTLP locally; point CredenceStack at it:

export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf

The token stays in the Collector's configuration. The default local ports are TODO-verify for the Splunk distribution (4317 and 4318 are the OpenTelemetry defaults).

Route 2: direct OTLP

export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="<your realm's OTLP traces URL>"   # TODO-verify
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_TRACES_HEADERS="<token header>=${SPLUNK_ACCESS_TOKEN}"   # TODO-verify

Run

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

Verify

  1. otel check prints OK, and the run ends with OTel: exported N span(s).
  2. In Splunk APM, open the service credencestack (TODO-verify the menu path) for the last hour.
  3. Each scenario epoch is a trace named credencestack scenario <id> #<epoch>; open one to see invoke_agent and the execute_tool spans.
  4. Check the span tags credencestack.result and credencestack.findings.max_severity and the finding events.

Useful views and alerts

  • A detector on spans with credencestack.result=fail and credencestack.scenario.severity=critical.
  • Add credencestack.scenario.domain and credencestack.result as indexed span tags if your plan requires indexing for filtering (TODO-verify).

Filter generated scenarios and difficulty

Scenario spans of generated scenarios carry credencestack.forge.* attributes (reference). Span attributes are searchable in APM once indexed as span tags. Index credencestack.forge.level and credencestack.result (TODO-verify the indexing step in your org), then filter traces with:

credencestack.forge.level >= 4 AND 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

  • A failed test is not an APM error; filter on credencestack.test_failed=true.
  • 401 usually means the token or realm is wrong; the token's scope must allow ingest.

Last verified

2026-11-28, offline: not tested against a Splunk organisation. Docs: https://docs.splunk.com/observability/en/ (TODO-verify the OTLP ingest page).