deepeval OTel Trace Export
Skill11 starsChanged 6 months agoMITView on GitHub
Suggested follow-up actions
- Reads credentials
In this repository37 other files it gives its agents.
- Browser ML in JavaScriptSkill
- CLI BuilderSkill
- ClickHouse Best PracticesSkill
- Code ReviewerSkill
- Code Review WorkflowSkill
- Commit Message WriterSkill
- deepeval Pytest Eval SuiteSkill
- deepeval SDK TracingSkill
- Doc Co-Authoring WorkflowSkill
- Embedding Model TrainingSkill
- Frontend Large-Feature ArchitectureSkill
- Frontend Visual Design TasteSkill
- Goal DefinitionSkill
- Internal Comms AuthoringSkill
- Invalid Name HandlerSkill
- LLM Model Pricing File UpdateSkill
- maf-prs-jobSkill
- MCP Server BuilderSkill
- Code Ownership & Bus FactorSkill
- PDF SummarizerSkill
- PDF Vision ExtractorSkill
- PNPM Upgrade PackageSkill
- promptflow-to-mafSkill
- promptfoo Eval Suite AuthorSkill
- promptfoo Redteam Plugin AuthorSkill
- Single-Flow PR YeetSkill
- React Router Search Param StateSkill
- Realtime Eval ScaffoldSkill
- Secure Code by LanguageSkill
- Security Review ChecklistSkill
- Skill Authoring LoopSkill
- SQL Query HelperSkill
- Storybook Component StoriesSkill
- Unit Test GeneratorSkill
- Repository Threat ModelSkill
- Turborepo Monorepo AuthoringSkill
- Webapp Testing HarnessSkill
The file
Files
When to use
You're instrumenting an AI application — an LLM app, an agent,
a RAG pipeline, a chatbot — and you want its traces to land in
Confident AI's Observatory so you can evaluate, monitor, and
debug. You don't want to install the deepeval Python package; you
just want to point an OpenTelemetry exporter at the right place and
set the right attributes.
The mechanism is OpenTelemetry standard: any OTLP-capable SDK, any
language, the same confident.* attribute keys. Confident AI's
exporter reads those attributes off each span and assembles the
trace structure. Parent/child nesting is native OpenTelemetry span
context — nothing deepeval-specific.
Use this skill when you already have an OTel SDK in the project and just need to repoint the exporter. Or when you're starting from zero and want a minimal vendor-neutral setup that doesn't lock you in to a Python-only framework.
Don't use this skill for non-AI software (web servers, CRUD
backends, infrastructure). The confident.* attributes describe
AI components (agent, llm, retriever, tool) and the Observatory is
built to render AI behaviour — putting non-AI spans in there is
waste of bandwidth and confusing to read.
For the deepeval SDK's native @observe decorator and framework
integrations (LangGraph, LangChain, etc.), use the
deepeval-tracing skill instead. For pytest-style eval suites and
metric definitions, use the deepeval-eval-suite skill.
Inputs
| Field | Required | Notes |
otel_endpoint | yes | Pick region from API key prefix. US vs EU only. |
confident_api_key | yes | Header value, never URL query. |
ai_components | yes | Subset of agent / llm / retriever / tool. |
app_language | yes | Determines which OTel SDK to install. |
app_language examples: python (use opentelemetry-sdk +
opentelemetry-exporter-otlp-proto-http), typescript
(@opentelemetry/sdk-node + @opentelemetry/exporter-trace-otlp-http),
go (go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp).
Output
Plain-text confirmation. No JSON envelope, no schema enforcement. The system of record is Confident AI's Observatory; this skill just wires the export. Typical return:
Trace landed: https://app.confident-ai.com/observability/traces/abc123
Spans by type: llm=12, agent=4, retriever=3, tool=2
Next: review the trace timeline in the Observatory, attach a
dataset, then create a metric to score the runs.Prompt
You are wiring an AI application's OpenTelemetry export to Confident
AI. Follow the steps in order. Do not skip ahead.
1. Confirm the target is an AI app.
It must have at least one of: LLM calls, an agent loop,
retrieval / vector search, or tool calls. If none of these
are present, STOP — this skill does not apply. Tell the user
that `confident.*` attributes only describe AI components and
Confident AI's Observatory is built to evaluate AI behaviour.
2. Inspect for existing OTel setup.
Look for an existing `TracerProvider`, span exporters, an
OpenTelemetry Collector, or an APM auto-instrumentation agent
(Datadog, New Relic, etc.). If one exists, prefer repointing
it to the Confident AI endpoint over adding a parallel
pipeline.
3. Pick the OTLP/HTTP endpoint.
Read the user's `CONFIDENT_API_KEY`. The key prefix tells
you the region:
- US key (starts with `us-`) → https://otel.confident-ai.com
- EU key (starts with `eu-`) → https://otel.eu.confident-ai.com
If the key has no clear prefix, ask the user which region
they provisioned in. Do NOT guess.
4. Wire an OTLP/HTTP span exporter with the
`x-confident-api-key` header set to the key value.
For Python, start from a minimal exporter setup; for other
languages, use the equivalent OTel SDK + HTTP exporter.
NEVER use OTLP/gRPC — Confident AI's endpoint accepts HTTP
only.
5. Isolate the export if the process has other OTel
instrumentation. A web server emitting HTTP request spans, a
database driver emitting query spans, or an APM agent
exporting everything will pollute Confident AI with
non-AI data. Set up either:
- a dedicated `TracerProvider` only for AI spans, OR
- a span filter that drops non-AI spans before they reach
the Confident AI exporter.
The `confident.*` attributes and span types
(`agent / llm / retriever / tool`) describe AI components.
Non-AI spans have no place in the Observatory.
6. Set `confident.span.*` attributes on each AI span.
Required minimum:
- `confident.span.type` = one of `agent / llm / retriever / tool`
Recommended for `llm` spans:
- `confident.span.model` (model id as the provider reports it)
- `confident.span.input` / `confident.span.output` (the
actual prompt and response, redacted)
Use OTLP data-type rules: attribute values are primitives or
homogeneous primitive lists. JSON-encode dicts and nested
metadata as strings.
7. Set `confident.trace.*` attributes for trace-wide fields:
- `confident.trace.name` (human-readable trace label)
- `confident.trace.session_id` (links traces into a session)
- `confident.trace.user_id` (the end user, if you have it)
8. If the app already emits OTel GenAI semantic conventions
(`gen_ai.*` attributes), do NOT add redundant `confident.*`
attributes. Confident AI's exporter reads the gen_ai
conventions as a fallback.
9. Run the app, generate one trace, and confirm the span appears
in Confident AI's Observatory. If it doesn't:
- check the exporter's error log for HTTP 401/403
- verify the endpoint matches the key region
- check whether the spans have `confident.span.type` setWhen NOT to use
- The target is non-AI software (web server, CRUD API, queue
consumer, cron).
confident.*attributes describe AI components only. Setting them on a Postgres query span or an HTTP request span is meaningless and clutters the Observatory. - You need the deepeval SDK's
@observedecorator to mark functions. This skill is for raw OTLP, not the deepeval Python package. Use thedeepeval-tracingskill instead. - You want to define metrics and run pytest eval suites. This
skill only handles trace export. Use the
deepeval-eval-suiteskill. - You must use gRPC for trace export. Confident AI's endpoint accepts HTTP only. There is no fallback.
- You want span → trace rollup computed client-side. Confident
AI does the rollup from the attributes. Don't double-count by
setting
trace.idorparent_spanmanually. - You have credentials or PII to put in span attributes. Span attributes are not encrypted at rest on Confident AI's side. Redact before setting.
Example
Input:
otel_endpoint: https://otel.confident-ai.com
confident_api_key: us-cf_*** # region prefix is `us-`
ai_components: [llm, agent]
app_language: pythonOutput:
Trace landed: https://app.confident-ai.com/observability/traces/8f3a2c
Spans by type: llm=12, agent=4
Next:
- Open the trace timeline in the Observatory
- Create a metric (e.g. Answer Relevancy) and attach this trace
- Link future traces in this session via session_idDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

