New Relic¶
Send CredenceStack's traces to New Relic over OTLP.
Facts on this page
New Relic's OTLP endpoint and its licence-key header are from memory. This build ran offline, so the values marked TODO-verify were not confirmed: check them against New Relic's documentation before relying on them.
Prerequisites¶
pip install "credencestack[otel]"- A New Relic account and an ingest licence key.
What you need from New Relic¶
- An ingest licence key.
- The OTLP endpoint for your data centre (US or EU) and the key's header name: TODO-verify.
Configure¶
export OTEL_EXPORTER_OTLP_ENDPOINT="<New Relic's OTLP endpoint for your region>" # TODO-verify
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_HEADERS="<licence-key header>=${NEW_RELIC_LICENSE_KEY}" # TODO-verify
Run¶
credencestack otel check
credencestack run -p payments --agent my_agent:policy --otel
Verify¶
otel checkprints OK, and the run ends withOTel: exported N span(s).- In New Relic, find the entity for service
credencestackand its distributed traces (TODO-verify the menu path). - Open a
credencestack scenario <id> #<epoch>trace and checkcredencestack.resultand the finding events.
Useful views and alerts¶
- NRQL such as
SELECT count(*) FROM Span WHERE credencestack.result = 'fail' FACET credencestack.scenario.pack(TODO-verify how span attributes are named in NRQL for your account).
Filter generated scenarios and difficulty¶
Scenario spans of generated scenarios carry
credencestack.forge.* attributes (reference). With NRQL (attribute names with dots need backticks; TODO-verify against your account's span schema):
SELECT count(*) FROM Span
WHERE `credencestack.forge.generated` IS TRUE AND `credencestack.forge.level` >= 4
AND `credencestack.result` = 'fail' FACET `credencestack.forge.level`
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¶
- New Relic may cap attribute value lengths; captured content is already capped at 8 KB by CredenceStack (TODO-verify New Relic's limit).
Last verified¶
2026-11-28, offline: not tested against a New Relic account. Docs: https://docs.newrelic.com/docs/opentelemetry/ (TODO-verify the URL).