@cetra-ai/cli 0.0.0 → 0.1.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -3
- package/dist/skills/cetra/SKILL.md +1 -1
- package/dist/skills/cetra/references/anthropic.md +12 -0
- package/dist/skills/cetra/references/attributes.md +97 -2
- package/dist/skills/cetra/references/from-langfuse.md +1 -1
- package/dist/skills/cetra/references/google-genai.md +1 -1
- package/dist/skills/cetra/references/integrations.md +234 -34
- package/dist/skills/cetra/references/langchain.md +7 -3
- package/dist/skills/cetra/references/litellm.md +2 -0
- package/dist/skills/cetra/references/python-opentelemetry.md +4 -0
- package/dist/skills/cetra/references/python.md +20 -2
- package/dist/skills/cetra/references/sessions.md +9 -0
- package/dist/skills/cetra/references/sql-schema.md +64 -6
- package/dist/skills/cetra/references/typescript.md +4 -0
- package/package.json +10 -10
package/dist/cli.js
CHANGED
|
@@ -1286,7 +1286,7 @@ function localHost() {
|
|
|
1286
1286
|
return cleaned === "" ? void 0 : cleaned;
|
|
1287
1287
|
}
|
|
1288
1288
|
// src/version.ts
|
|
1289
|
-
const VERSION = "0.0.
|
|
1289
|
+
const VERSION = "0.1.0-rc.3";
|
|
1290
1290
|
// src/http.ts
|
|
1291
1291
|
/** The most of an error body that is read (bytes past this are dropped). */
|
|
1292
1292
|
const PROBLEM_LIMIT = 65536;
|
|
@@ -1720,7 +1720,7 @@ const READY_CHECK_MS = 2e3;
|
|
|
1720
1720
|
const TOKEN_LIFETIME_MS = 7776e6;
|
|
1721
1721
|
const PASSWORD_LENGTH = 24;
|
|
1722
1722
|
const PASSWORD_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
1723
|
-
const INSTALL_HINT = "Install cetra: curl -fsSL https://
|
|
1723
|
+
const INSTALL_HINT = "Install cetra: curl -fsSL https://cetra.sh/install.sh | sh";
|
|
1724
1724
|
const DOCKER_NOT_STARTED = `cetra did not start; see docker logs ${CONTAINER}`;
|
|
1725
1725
|
/** Whether the URL points at this machine: localhost, 127.0.0.0/8 or [::1] (URL keeps the brackets). */
|
|
1726
1726
|
function isLoopback(url) {
|
|
@@ -1954,7 +1954,7 @@ async function startDocker(context) {
|
|
|
1954
1954
|
const ran = await run(deps, "docker", args, childEnvironment(admin?.variables));
|
|
1955
1955
|
if (!ran.ok) {
|
|
1956
1956
|
if (firstStart) await cleanupContainer(deps);
|
|
1957
|
-
if (/pull access denied|not found|unauthorized/i.test(ran.stderr)) throw new CliError(`docker could not pull ${IMAGE} (the image is public from the first release); install the binary instead: curl -fsSL https://
|
|
1957
|
+
if (/pull access denied|not found|unauthorized/i.test(ran.stderr)) throw new CliError(`docker could not pull ${IMAGE} (the image is public from the first release); install the binary instead: curl -fsSL https://cetra.sh/install.sh | sh`, Exit.Unreachable);
|
|
1958
1958
|
throw new CliError(`docker could not start cetra: ${firstLine(ran.stderr)}`, Exit.Unreachable);
|
|
1959
1959
|
}
|
|
1960
1960
|
try {
|
|
@@ -92,4 +92,4 @@ Tell the user which files changed, which libraries are traced, and where to see
|
|
|
92
92
|
- The whole documentation for agents: `https://cetra.sh/llms.txt`.
|
|
93
93
|
- Search the docs with the docs MCP server at `https://cetra.sh/mcp`.
|
|
94
94
|
- Span attributes cetra reads, for hand-made spans: [attributes.md](references/attributes.md) and [metadata-and-tags.md](references/metadata-and-tags.md).
|
|
95
|
-
- Tracing the coding agent itself (Claude Code, Codex, Gemini CLI, Copilot) is a different setup, `cetra agents setup`: see [Claude Code](https://cetra.sh/docs/integrations/claude-code/).
|
|
95
|
+
- Tracing the coding agent itself (Claude Code, Codex, Gemini CLI, Copilot, Qwen Code, Pi, OpenClaw, OpenCode, Goose, Oh My Pi) is a different setup, `cetra agents setup`: see [Claude Code](https://cetra.sh/docs/integrations/claude-code/).
|
|
@@ -69,11 +69,23 @@ await client.messages.create({
|
|
|
69
69
|
- Cache read and cache write tokens are recorded. The input token count includes them, and cetra prices them separately.
|
|
70
70
|
- The cost is computed from cetra's price table.
|
|
71
71
|
|
|
72
|
+
## Claude Managed Agents
|
|
73
|
+
|
|
74
|
+
Claude Managed Agents is Anthropic's hosted agent product, in beta: a session runs in a sandbox hosted by Anthropic (or self-hosted), and the model calls are made from Anthropic's servers, not from your app. The session spans are exported by the Claude Platform from Anthropic's servers to an OpenTelemetry destination an admin sets; your app sends nothing for them. Anthropic's documentation names the session spans `anthropic.session.turn`, `anthropic.model_request` and `anthropic.tool_use`, among others. This route is setup only: it was not run against cetra, because a session needs Anthropic's real Sessions API.
|
|
75
|
+
|
|
76
|
+
Adding a destination needs the Console admin role, or the Admin API (`POST /v1/organizations/telemetry_destinations`). Point it at cetra as a "Custom" destination: the endpoint is a hostname on port 443, not an IP address, and Anthropic's API appends `/v1/traces` itself and sends gzip-compressed protobuf, which cetra accepts. Add a header `Authorization: Bearer sk-cetra-…` with your cetra API key, and set the destination's content mode to full content if you want prompts, messages and tool arguments recorded; the default, `metadata_only`, records no content. [Send OpenTelemetry](https://cetra.sh/docs/get-started/opentelemetry/) describes cetra's side of the endpoint.
|
|
77
|
+
|
|
78
|
+
Because the spans leave from Anthropic's servers, cetra's endpoint must be reachable from the public internet: the hostname must resolve to a public IP. It must answer within 5 s for TLS and headers, and within 10 s in total. A `3xx` response disables the destination, and so do 24 hours of failed deliveries.
|
|
79
|
+
|
|
72
80
|
## Limits
|
|
73
81
|
|
|
74
82
|
- The fixtures were captured with the Anthropic Python SDK 2.4.0 and these instrumentations: OpenInference 3.3.0 and OpenLLMetry 0.62.4. Other versions are not covered.
|
|
83
|
+
- Anthropic's own SDKs start a span of their own for each call, `anthropic.messages.create`, on the global tracer provider: Python `anthropic` 2.8.0 and TypeScript `@anthropic-ai/sdk` 1.8.0, the versions tested, both do. With the setups on this page each call is still recorded once: OpenInference's Anthropic instrumentor (Python 3.3.0 or later, TypeScript 1.0.1 or later) keeps the SDK's span out of the calls it traces. Without `use_global_provider=True` (TypeScript `useGlobalProvider: true`) the SDK's spans do not reach cetra at all.
|
|
84
|
+
- OpenLLMetry's Anthropic instrumentation (0.62.4) does not keep the SDK's span out: its `anthropic.chat` span and the SDK's span both carry the call's tokens, which then count twice. With OpenLLMetry, set `ANTHROPIC_OPEN_TELEMETRY=false`, which both SDKs read, to turn the SDK's own spans off.
|
|
75
85
|
- With OpenLLMetry's Anthropic instrumentation the prompt token count can exclude the cache. cetra adds the cache back, so the stored counts follow one rule.
|
|
76
86
|
- The TypeScript helper is covered by an SDK test, not by captured spans.
|
|
87
|
+
- The Claude Managed Agents route is setup only: no session was run against cetra, the span shapes come from Anthropic's documentation, and the beta means the span names and attributes can change.
|
|
88
|
+
- A Claude Platform destination sends prompts, messages and tool arguments only in full content mode; the default is `metadata_only`. An organization can have up to 10 destinations, with 20 headers each.
|
|
77
89
|
|
|
78
90
|
## Next
|
|
79
91
|
|
|
@@ -59,7 +59,7 @@ When a span carries no cetra attribute for a field, cetra reads the field from t
|
|
|
59
59
|
|
|
60
60
|
| Attribute | Feeds |
|
|
61
61
|
|---|---|
|
|
62
|
-
| `gen_ai.operation.name` | Span kind and the operation |
|
|
62
|
+
| `gen_ai.operation.name` | Span kind and the operation; `embeddings`, `embedding` and `aembedding` are embedding operations; `tts` and `stt` (Pipecat's speech operations) are plain `span`s |
|
|
63
63
|
| `gen_ai.provider.name`, `gen_ai.system` | Provider |
|
|
64
64
|
| `gen_ai.request.model` | Request model |
|
|
65
65
|
| `gen_ai.response.model` | Response model |
|
|
@@ -73,10 +73,33 @@ When a span carries no cetra attribute for a field, cetra reads the field from t
|
|
|
73
73
|
| `gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`, `gen_ai.usage.total_tokens` | Token counts |
|
|
74
74
|
| `gen_ai.usage.cache_read.input_tokens`, `gen_ai.usage.cache_creation.input_tokens` | Cache token counts |
|
|
75
75
|
| `gen_ai.usage.reasoning.output_tokens` | Reasoning token count |
|
|
76
|
-
| `gen_ai.usage.cost`, `gen_ai.usage.total_cost`, `gen_ai.usage.input_cost`, `gen_ai.usage.output_cost` | Reported cost |
|
|
76
|
+
| `gen_ai.usage.cost`, `gen_ai.usage.total_cost`, `gen_ai.usage.input_cost`, `gen_ai.usage.output_cost`, `gen_ai.cost.total_cost`, `gen_ai.cost.input_cost`, `gen_ai.cost.output_cost` | Reported cost |
|
|
77
|
+
| `bifrost.cost.input`, `bifrost.cost.output` | Reported cost parts, on Bifrost gateway spans |
|
|
77
78
|
| `gen_ai.response.time_to_first_chunk` | Time to first token |
|
|
78
79
|
| `gen_ai.conversation.id` | Session |
|
|
79
80
|
|
|
81
|
+
### Endpoint
|
|
82
|
+
|
|
83
|
+
| Attribute | Feeds |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `server.address`, `url.full`, `gen_ai.openai.api_base` | Provider, when the provider is missing or `openai` on an `llm` or `embedding` span. The host names the provider, for example `openrouter.ai` gives `openrouter`. |
|
|
86
|
+
|
|
87
|
+
### VoltAgent
|
|
88
|
+
|
|
89
|
+
Read on spans that VoltAgent writes: spans with a `voltagent.*` attribute, or whose instrumentation scope starts with `@voltagent/`.
|
|
90
|
+
|
|
91
|
+
| Attribute | Feeds |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `span.type` | Span kind: `llm` and `tool` |
|
|
94
|
+
| `entity.type` | Span kind `agent`, when `span.type` is missing |
|
|
95
|
+
| `llm.model`, `ai.model.name` | Request model, after `gen_ai.request.model` |
|
|
96
|
+
| `llm.usage.prompt_tokens`, `llm.usage.completion_tokens` | Input and output token counts, on `llm` spans |
|
|
97
|
+
| `llm.usage.cached_tokens` | Cache read token count, on `llm` spans |
|
|
98
|
+
| `llm.usage.reasoning_tokens` | Reasoning token count, on `llm` spans |
|
|
99
|
+
| `llm.messages` | Input messages, on `llm` spans (AI SDK messages) |
|
|
100
|
+
| `input`, `output` | Input, when `llm.messages` does not supply it, and output |
|
|
101
|
+
| `conversation.id`, `voltagent.conversation_id` | Session |
|
|
102
|
+
|
|
80
103
|
### OpenInference
|
|
81
104
|
|
|
82
105
|
| Attribute | Feeds |
|
|
@@ -103,6 +126,7 @@ When a span carries no cetra attribute for a field, cetra reads the field from t
|
|
|
103
126
|
|---|---|
|
|
104
127
|
| `traceloop.span.kind` | Span kind |
|
|
105
128
|
| `llm.request.type` | Span kind |
|
|
129
|
+
| span name, on the vector scopes | Span kind `retriever` for the read names, on the scopes `opentelemetry.instrumentation.chromadb`, `.qdrant`, `.milvus`, `.pinecone` and `.weaviate`: `chroma.query`, `chroma.get`, `qdrant.query_points`, `qdrant.search`, `qdrant.scroll`, `milvus.search`, `milvus.query`, `milvus.get`, `pinecone.query`, `pinecone.fetch`, and Weaviate names starting `db.weaviate.collections.query.` or `db.weaviate.gql.query.`. Every other name on them gives `span` |
|
|
106
130
|
| `gen_ai.prompt.N.*` | Input messages |
|
|
107
131
|
| `gen_ai.completion.N.*` | Output messages |
|
|
108
132
|
| `traceloop.entity.input`, `traceloop.entity.output` | Input and output when there are no messages |
|
|
@@ -169,6 +193,77 @@ When a span carries no cetra attribute for a field, cetra reads the field from t
|
|
|
169
193
|
| `gcp.vertex.agent.tool_call_args`, `gcp.vertex.agent.tool_response` | Input and output of a tool span |
|
|
170
194
|
| `gcp.vertex.agent.session_id` | Session |
|
|
171
195
|
|
|
196
|
+
### Prompt Flow
|
|
197
|
+
|
|
198
|
+
Read on spans of scope `promptflow`, which Prompt Flow writes.
|
|
199
|
+
|
|
200
|
+
| Attribute | Feeds |
|
|
201
|
+
|---|---|
|
|
202
|
+
| `span_type` | Span kind: `LLM` gives `llm`, `Embedding` gives `embedding`, `Retrieval` gives `retriever`, `Flow` and `LangChain` give `chain`, and `Function` gives `span` |
|
|
203
|
+
| `inputs` | Input. On an `llm` span, the messages of the OpenAI request when it has them. The `model` field of the JSON gives the request model on an `llm` or `embedding` span |
|
|
204
|
+
| `output` | Output. On an `llm` span, the message of the OpenAI response when it has one |
|
|
205
|
+
| `llm.response.model` | Response model, on an `llm` or `embedding` span |
|
|
206
|
+
| `llm.usage.prompt_tokens`, `llm.usage.completion_tokens`, `llm.usage.total_tokens` | Token counts, on an `llm` span |
|
|
207
|
+
|
|
208
|
+
### Langflow
|
|
209
|
+
|
|
210
|
+
Read on spans of scope `langflow`, which Langflow writes through Traceloop.
|
|
211
|
+
|
|
212
|
+
| Attribute | Feeds |
|
|
213
|
+
|---|---|
|
|
214
|
+
| `trace_type` | Span kind: `agent`, `tool`, `retriever` and `embedding` keep their kind, and any other value gives `chain` |
|
|
215
|
+
| `flow_id` | Span kind `chain`, when `trace_type` is missing (the flow's root span) |
|
|
216
|
+
| `inputs` | Input, as JSON text |
|
|
217
|
+
| `outputs` | Output, as JSON text |
|
|
218
|
+
|
|
219
|
+
### n8n
|
|
220
|
+
|
|
221
|
+
Read on spans of scope `n8n-workflow`. n8n keeps every node span's name as `node.execute`.
|
|
222
|
+
|
|
223
|
+
| Attribute | Feeds |
|
|
224
|
+
|---|---|
|
|
225
|
+
| span name `workflow.execute` | Span kind `chain` |
|
|
226
|
+
| span name `node.execute` | Span kind `span`, unless `gen_ai.operation.name` is set. Then the GenAI operation decides the kind |
|
|
227
|
+
|
|
228
|
+
### LiveKit Agents
|
|
229
|
+
|
|
230
|
+
Read on spans of scope `livekit-agents`. The `lk.pii.*` keys are present only when LiveKit keeps the content, which is the default.
|
|
231
|
+
|
|
232
|
+
| Attribute | Feeds |
|
|
233
|
+
|---|---|
|
|
234
|
+
| `lk.pii.user_input`, `lk.pii.chat_ctx`, `lk.pii.function_tool.arguments` | Input, in that order, when no GenAI key gives one |
|
|
235
|
+
| `lk.pii.response.text`, `lk.pii.function_tool.output` | Output, in that order, when no GenAI key gives one |
|
|
236
|
+
| `gen_ai.provider.name` | Provider, on any span. A host in this key is an endpoint: `api.openai.com` gives `openai`, another host that cetra maps gives its provider, and an unmapped host gives no provider |
|
|
237
|
+
|
|
238
|
+
### Pipecat
|
|
239
|
+
|
|
240
|
+
Read on spans of scopes starting with `pipecat`.
|
|
241
|
+
|
|
242
|
+
| Attribute | Feeds |
|
|
243
|
+
|---|---|
|
|
244
|
+
| `input` | Input. An OpenAI-shaped message list is read as messages. Any other value is kept as text |
|
|
245
|
+
| `output` | Output, as text |
|
|
246
|
+
| `conversation.id` | Session, on spans of scope `pipecat.turn` (the `conversation` and `turn` spans) |
|
|
247
|
+
|
|
248
|
+
### OpenLIT
|
|
249
|
+
|
|
250
|
+
Read on spans of scopes starting with `openlit.instrumentation.`, which OpenLIT writes.
|
|
251
|
+
|
|
252
|
+
| Attribute | Feeds |
|
|
253
|
+
|---|---|
|
|
254
|
+
| `gen_ai.operation.type` | Span kind, when `gen_ai.operation.name` is not a standard operation: `invoke_agent` gives `agent`, and `execute_task` gives `chain` |
|
|
255
|
+
| `db.operation.name` | Span kind on a vector span (`gen_ai.operation.name` `vectordb`): `get`, `query` or `search`, lowercased, gives `retriever`; any other value, and a missing key, give `span`. The key is peeked, not consumed |
|
|
256
|
+
|
|
257
|
+
The provider `browser_use`, which OpenLIT writes for Browser Use, is a framework name. cetra never reads it as a provider.
|
|
258
|
+
|
|
259
|
+
### Promptfoo
|
|
260
|
+
|
|
261
|
+
Read on spans of scope `promptfoo.providers`. Promptfoo's request and response bodies are not read.
|
|
262
|
+
|
|
263
|
+
| Attribute | Feeds |
|
|
264
|
+
|---|---|
|
|
265
|
+
| `gen_ai.evaluation.name` | Span kind `evaluator`, on a grader span |
|
|
266
|
+
|
|
172
267
|
### Resource attributes
|
|
173
268
|
|
|
174
269
|
| Attribute | Feeds |
|
|
@@ -38,7 +38,7 @@ The fixtures show the Langfuse SDK 5.1.0 producing these, and cetra reading them
|
|
|
38
38
|
- The input and output of decorated functions, and the messages of the OpenAI drop-in.
|
|
39
39
|
- Session ID, user ID and tags, set at trace level, become the cetra session, user and tags. Trace metadata becomes metadata.
|
|
40
40
|
- The model, model parameters and `usage_details`, including cached and reasoning tokens.
|
|
41
|
-
- A reported cost (`cost_details`) is kept as the reported cost, and cetra does not replace it with a computed one.
|
|
41
|
+
- A reported cost (`cost_details`) is kept as the reported cost, and cetra does not replace it with a computed one, except a total of exactly 0 on a span that has tokens, which is priced from the price table (see [Cost and tokens](https://cetra.sh/docs/tracing/cost-and-tokens/)).
|
|
42
42
|
- `completion_start_time` gives the time to first token.
|
|
43
43
|
- An observation with level `ERROR` has the status `error`.
|
|
44
44
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Trace Google Gen AI calls with cetra: Gemini generateContent, streaming, multimodal input and reasoning tokens, from Python.
|
|
6
6
|
|
|
7
|
-
cetra traces calls to Gemini through the Google Gen AI SDK, including streamed answers, images in the input and reasoning tokens.
|
|
7
|
+
cetra traces calls to Gemini through the Google Gen AI SDK, including streamed answers, images in the input and reasoning tokens. For Vertex AI, see [Vertex AI](https://cetra.sh/docs/integrations/vertex-ai/).
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -6,66 +6,266 @@ The frameworks, providers and instrumentation libraries cetra works with, how ea
|
|
|
6
6
|
|
|
7
7
|
Use this page to find how to connect your framework, provider or instrumentation library to cetra.
|
|
8
8
|
|
|
9
|
+
## Providers
|
|
10
|
+
|
|
9
11
|
| Integration | Python | TypeScript | How | Tested against |
|
|
10
12
|
|---|---|---|---|---|
|
|
11
|
-
| [
|
|
13
|
+
| [Amazon Bedrock](https://cetra.sh/docs/integrations/bedrock/) | ✓ | — | `instrument=["bedrock"]` | SDK test |
|
|
12
14
|
| [Anthropic](https://cetra.sh/docs/integrations/anthropic/) | ✓ | ✓ | `instrument=["anthropic"]` or `anthropic(Anthropic)` | captured |
|
|
15
|
+
| [Azure OpenAI](https://cetra.sh/docs/integrations/azure-openai/) | ✓ | ✓ | `instrument=["openai"]` | captured |
|
|
16
|
+
| [Baidu Qianfan](https://cetra.sh/docs/integrations/qianfan/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
17
|
+
| [Baseten](https://cetra.sh/docs/integrations/baseten/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
18
|
+
| [BytePlus ModelArk](https://cetra.sh/docs/integrations/byteplus/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
19
|
+
| [Cerebras](https://cetra.sh/docs/integrations/cerebras/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
20
|
+
| [Cloudflare Workers AI](https://cetra.sh/docs/integrations/cloudflare-workers-ai/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
21
|
+
| [Cohere](https://cetra.sh/docs/integrations/cohere/) | ✓ | — | `instrument=["cohere"]` | captured |
|
|
22
|
+
| [CometAPI](https://cetra.sh/docs/integrations/cometapi/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
23
|
+
| [Databricks](https://cetra.sh/docs/integrations/databricks/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
24
|
+
| [DeepInfra](https://cetra.sh/docs/integrations/deepinfra/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
25
|
+
| [DeepSeek](https://cetra.sh/docs/integrations/deepseek/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
26
|
+
| [Doubleword](https://cetra.sh/docs/integrations/doubleword/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
27
|
+
| [Fireworks AI](https://cetra.sh/docs/integrations/fireworks/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
13
28
|
| [Google Gen AI](https://cetra.sh/docs/integrations/google-genai/) | ✓ | — | `instrument=["google-genai"]` | captured |
|
|
14
|
-
| [
|
|
29
|
+
| [Groq](https://cetra.sh/docs/integrations/groq/) | ✓ | — | `instrument=["groq"]` | captured |
|
|
30
|
+
| [Hugging Face Inference Providers](https://cetra.sh/docs/integrations/hugging-face/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
31
|
+
| [Hyperbolic](https://cetra.sh/docs/integrations/hyperbolic/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
32
|
+
| [IBM watsonx.ai](https://cetra.sh/docs/integrations/watsonx/) | ✓ | — | OpenLLMetry watsonx instrumentation | setup only |
|
|
15
33
|
| [LiteLLM](https://cetra.sh/docs/integrations/litellm/) | ✓ | — | `instrument=["litellm"]` | SDK test |
|
|
16
|
-
| [
|
|
17
|
-
| [
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
34
|
+
| [MiniMax](https://cetra.sh/docs/integrations/minimax/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
35
|
+
| [Mistral AI](https://cetra.sh/docs/integrations/mistral/) | ✓ | — | `instrument=["mistralai"]` | captured |
|
|
36
|
+
| [Moonshot AI (Kimi)](https://cetra.sh/docs/integrations/moonshot/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
37
|
+
| [Nebius AI Studio](https://cetra.sh/docs/integrations/nebius/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
38
|
+
| [Novita AI](https://cetra.sh/docs/integrations/novita/) | ✓ | ✓ | OpenAI client with the provider's base URL | captured |
|
|
39
|
+
| [NVIDIA NIM](https://cetra.sh/docs/integrations/nvidia-nim/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
40
|
+
| [Ollama](https://cetra.sh/docs/integrations/ollama/) | ✓ | — | `instrument=["ollama"]` | captured |
|
|
41
|
+
| [OpenAI](https://cetra.sh/docs/integrations/openai/) | ✓ | ✓ | `instrument=["openai"]` or `openai(OpenAI)` | captured |
|
|
42
|
+
| [OpenRouter](https://cetra.sh/docs/integrations/openrouter/) | ✓ | ✓ | OpenAI client with the provider's base URL | captured |
|
|
43
|
+
| [Perplexity](https://cetra.sh/docs/integrations/perplexity/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
44
|
+
| [Qwen (Alibaba Cloud Model Studio)](https://cetra.sh/docs/integrations/qwen/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
45
|
+
| [SambaNova](https://cetra.sh/docs/integrations/sambanova/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
46
|
+
| [Sarvam AI](https://cetra.sh/docs/integrations/sarvam/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
47
|
+
| [Together AI](https://cetra.sh/docs/integrations/together/) | ✓ | — | `instrument=["together"]` | captured |
|
|
48
|
+
| [Vertex AI](https://cetra.sh/docs/integrations/vertex-ai/) | ✓ | — | `instrument=["google-genai"]` | captured |
|
|
49
|
+
| [vLLM](https://cetra.sh/docs/integrations/vllm/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
50
|
+
| [Volcengine Ark](https://cetra.sh/docs/integrations/volcengine/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
51
|
+
| [xAI](https://cetra.sh/docs/integrations/xai/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
52
|
+
| [Z.ai (GLM)](https://cetra.sh/docs/integrations/z-ai/) | ✓ | ✓ | OpenAI client with the provider's base URL | setup only |
|
|
53
|
+
|
|
54
|
+
- [Amazon Bedrock](https://cetra.sh/docs/integrations/bedrock/): Bedrock calls from Python.
|
|
55
|
+
- [Anthropic](https://cetra.sh/docs/integrations/anthropic/): Messages, streaming, thinking and cache tokens.
|
|
56
|
+
- [Azure OpenAI](https://cetra.sh/docs/integrations/azure-openai/): Azure OpenAI through the OpenAI SDK.
|
|
57
|
+
- [Cohere](https://cetra.sh/docs/integrations/cohere/): Cohere v2 chat from Python.
|
|
58
|
+
- [Google Gen AI](https://cetra.sh/docs/integrations/google-genai/): Gemini through the Google Gen AI SDK.
|
|
59
|
+
- [Groq](https://cetra.sh/docs/integrations/groq/): Groq SDK and the OpenAI client.
|
|
60
|
+
- [LiteLLM](https://cetra.sh/docs/integrations/litellm/): LiteLLM calls from Python.
|
|
61
|
+
- [Mistral AI](https://cetra.sh/docs/integrations/mistral/): Mistral AI from Python.
|
|
62
|
+
- [Novita AI](https://cetra.sh/docs/integrations/novita/): Novita through the OpenAI client.
|
|
63
|
+
- [Ollama](https://cetra.sh/docs/integrations/ollama/): Local models through the Ollama SDK.
|
|
64
|
+
- [OpenAI](https://cetra.sh/docs/integrations/openai/): Chat, Responses API and embeddings.
|
|
65
|
+
- [OpenRouter](https://cetra.sh/docs/integrations/openrouter/): Any model through OpenRouter, priced by its publisher.
|
|
66
|
+
- [Together AI](https://cetra.sh/docs/integrations/together/): Together SDK and the OpenAI client.
|
|
67
|
+
- [Vertex AI](https://cetra.sh/docs/integrations/vertex-ai/): Gemini on Vertex AI.
|
|
68
|
+
|
|
69
|
+
## Gateways
|
|
70
|
+
|
|
71
|
+
| Integration | Python | TypeScript | How | Tested against |
|
|
72
|
+
|---|---|---|---|---|
|
|
73
|
+
| [Bifrost](https://cetra.sh/docs/integrations/bifrost/) | — | — | the gateway's `otel` plugin | captured |
|
|
74
|
+
| [Cloudflare AI Gateway](https://cetra.sh/docs/integrations/cloudflare-ai-gateway/) | ✓ | ✓ | OpenAI client with the gateway's base URL | setup only |
|
|
75
|
+
| [Envoy AI Gateway](https://cetra.sh/docs/integrations/envoy-ai-gateway/) | — | — | the gateway's OpenTelemetry environment | captured |
|
|
76
|
+
| [Helicone](https://cetra.sh/docs/integrations/helicone/) | ✓ | ✓ | OpenAI client with the gateway's base URL | setup only |
|
|
77
|
+
| [Kong AI Gateway](https://cetra.sh/docs/integrations/kong/) | — | — | the `opentelemetry` plugin | setup only |
|
|
78
|
+
| [LiteLLM Proxy](https://cetra.sh/docs/integrations/litellm-proxy/) | ✓ | — | the proxy's `otel` callback | captured |
|
|
79
|
+
| [Portkey](https://cetra.sh/docs/integrations/portkey/) | ✓ | ✓ | OpenAI client with the gateway's base URL | setup only |
|
|
80
|
+
| [TrueFoundry](https://cetra.sh/docs/integrations/truefoundry/) | ✓ | ✓ | OpenAI client with the gateway's base URL | setup only |
|
|
81
|
+
| [Vercel AI Gateway](https://cetra.sh/docs/integrations/vercel-ai-gateway/) | ✓ | ✓ | OpenAI client with the gateway's base URL | setup only |
|
|
82
|
+
|
|
83
|
+
- [Bifrost](https://cetra.sh/docs/integrations/bifrost/): Chain and LLM spans per call, with the reported cost.
|
|
84
|
+
- [Envoy AI Gateway](https://cetra.sh/docs/integrations/envoy-ai-gateway/): One LLM span per call, priced from the table.
|
|
85
|
+
- [LiteLLM Proxy](https://cetra.sh/docs/integrations/litellm-proxy/): Routed calls with the cost the proxy computes.
|
|
86
|
+
|
|
87
|
+
## Frameworks
|
|
88
|
+
|
|
89
|
+
| Integration | Python | TypeScript | How | Tested against |
|
|
90
|
+
|---|---|---|---|---|
|
|
91
|
+
| [AG2](https://cetra.sh/docs/integrations/ag2/) | ✓ | — | AG2's own telemetry middleware | captured |
|
|
92
|
+
| [Agent Spec](https://cetra.sh/docs/integrations/agent-spec/) | ✓ | — | OpenInference's Agent Spec instrumentor | captured |
|
|
93
|
+
| [Agno](https://cetra.sh/docs/integrations/agno/) | ✓ | — | `instrument=["agno"]` | captured |
|
|
94
|
+
| [aisuite](https://cetra.sh/docs/integrations/aisuite/) | ✓ | — | the instrumentation of each provider SDK | setup only |
|
|
95
|
+
| [Atomic Agents](https://cetra.sh/docs/integrations/atomic-agents/) | ✓ | — | its `AtomicAgentsInstrumentor` | captured |
|
|
96
|
+
| [AutoGen](https://cetra.sh/docs/integrations/autogen/) | ✓ | — | `instrument=["autogen-agentchat"]` | captured |
|
|
97
|
+
| [Bedrock AgentCore](https://cetra.sh/docs/integrations/bedrock-agentcore/) | ✓ | — | Strands' own OpenTelemetry spans | captured |
|
|
98
|
+
| [BeeAI Framework](https://cetra.sh/docs/integrations/beeai/) | ✓ | — | `instrument=["beeai"]` | captured |
|
|
99
|
+
| [Claude Agent SDK](https://cetra.sh/docs/integrations/claude-agent-sdk/) | ✓ | ✓ | Claude Code's OpenTelemetry spans | captured |
|
|
100
|
+
| [Cloudflare Agents](https://cetra.sh/docs/integrations/cloudflare-agents/) | — | ✓ | Cloudflare's OTLP destination | setup only |
|
|
20
101
|
| [CrewAI](https://cetra.sh/docs/integrations/crewai/) | ✓ | — | `instrument=["crewai"]` | SDK test |
|
|
102
|
+
| [Deep Agents](https://cetra.sh/docs/integrations/deepagents/) | ✓ | — | `instrument=["langchain"]` | captured |
|
|
21
103
|
| [DSPy](https://cetra.sh/docs/integrations/dspy/) | ✓ | — | `instrument=["dspy"]` | SDK test |
|
|
104
|
+
| [eve](https://cetra.sh/docs/integrations/eve/) | — | ✓ | its `otelIntegration` | captured |
|
|
105
|
+
| [Flue](https://cetra.sh/docs/integrations/flue/) | — | ✓ | `@flue/opentelemetry` | captured |
|
|
22
106
|
| [Google ADK](https://cetra.sh/docs/integrations/google-adk/) | ✓ | — | ADK's own OpenTelemetry spans | captured |
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
107
|
+
| [Graphite](https://cetra.sh/docs/integrations/graphite/) | ✓ | — | grafi's OTLP/gRPC export | setup only |
|
|
108
|
+
| [Guardrails AI](https://cetra.sh/docs/integrations/guardrails/) | ✓ | — | `instrument=["openai"]` plus Guardrails' own spans | captured |
|
|
109
|
+
| [Haystack](https://cetra.sh/docs/integrations/haystack/) | ✓ | — | `instrument=["haystack"]` | captured |
|
|
110
|
+
| [Instructor](https://cetra.sh/docs/integrations/instructor/) | ✓ | — | `instrument=["instructor", "openai"]` | captured |
|
|
111
|
+
| [LangChain](https://cetra.sh/docs/integrations/langchain/) | ✓ | ✓ | `instrument=["langchain"]` or `langchain(…)` | captured (Python), SDK test (TypeScript) |
|
|
112
|
+
| [LangGraph](https://cetra.sh/docs/integrations/langgraph/) | ✓ | ✓ | `instrument=["langchain"]` | captured (Python), SDK test (TypeScript) |
|
|
113
|
+
| [LlamaIndex](https://cetra.sh/docs/integrations/llama-index/) | ✓ | — | `instrument=["llama-index"]` | SDK test |
|
|
114
|
+
| [Mastra](https://cetra.sh/docs/integrations/mastra/) | — | ✓ | Mastra's OpenTelemetry exporter | captured |
|
|
115
|
+
| [Microsoft Agent Framework](https://cetra.sh/docs/integrations/agent-framework/) | ✓ | — | Agent Framework's own OpenTelemetry spans | captured |
|
|
116
|
+
| [Mirascope](https://cetra.sh/docs/integrations/mirascope/) | ✓ | — | Mirascope's `ops` traces | captured |
|
|
117
|
+
| [NVIDIA NeMo Agent Toolkit](https://cetra.sh/docs/integrations/nemo-agent-toolkit/) | ✓ | — | its OTLP exporter | setup only |
|
|
118
|
+
| [OpenAI Agents SDK](https://cetra.sh/docs/integrations/openai-agents/) | ✓ | — | `instrument=["openai-agents"]` | captured |
|
|
119
|
+
| [OpenHands](https://cetra.sh/docs/integrations/openhands/) | ✓ | — | Laminar SDK's OTLP export | hand-written |
|
|
120
|
+
| [Pydantic AI](https://cetra.sh/docs/integrations/pydantic-ai/) | ✓ | — | Pydantic AI's own OpenTelemetry spans | captured |
|
|
121
|
+
| [Semantic Kernel](https://cetra.sh/docs/integrations/semantic-kernel/) | ✓ | — | Semantic Kernel's own OpenTelemetry spans | captured |
|
|
122
|
+
| [smolagents](https://cetra.sh/docs/integrations/smolagents/) | ✓ | — | `instrument=["smolagents"]` | captured |
|
|
123
|
+
| [Strands Agents](https://cetra.sh/docs/integrations/strands/) | ✓ | — | Strands' own OpenTelemetry spans | captured |
|
|
124
|
+
| [TanStack AI](https://cetra.sh/docs/integrations/tanstack-ai/) | — | ✓ | OpenInference's TanStack AI middleware | captured |
|
|
125
|
+
| [Temporal](https://cetra.sh/docs/integrations/temporal/) | ✓ | — | Temporal's OpenAI Agents plugin | captured |
|
|
126
|
+
| [Vercel AI SDK](https://cetra.sh/docs/integrations/vercel-ai-sdk/) | — | ✓ | `aiTelemetry()` | captured |
|
|
127
|
+
| [VoltAgent](https://cetra.sh/docs/integrations/voltagent/) | — | ✓ | VoltAgent's own OpenTelemetry spans | captured |
|
|
128
|
+
| [Spring AI](https://cetra.sh/docs/integrations/spring-ai/) | — | — | Java, Spring Boot with Micrometer or OpenInference | captured |
|
|
129
|
+
| [LangChain4j](https://cetra.sh/docs/integrations/langchain4j/) | — | — | Java, OpenInference's model listener | captured |
|
|
130
|
+
| [Quarkus LangChain4j](https://cetra.sh/docs/integrations/quarkus-langchain4j/) | — | — | Java, the `quarkus-opentelemetry` extension | captured |
|
|
131
|
+
| [Koog](https://cetra.sh/docs/integrations/koog/) | — | — | Kotlin, its OpenTelemetry feature | captured |
|
|
132
|
+
| [Microsoft.Extensions.AI](https://cetra.sh/docs/integrations/extensions-ai/) | — | — | .NET, `UseOpenTelemetry()` on the client | captured |
|
|
133
|
+
| [Genkit Go](https://cetra.sh/docs/integrations/genkit-go/) | — | — | Go, its `otelgenai` plugin | setup only |
|
|
134
|
+
| [openai-go](https://cetra.sh/docs/integrations/openai-go/) | — | — | Go, OpenInference Go's middleware | setup only |
|
|
135
|
+
| [ruby_llm](https://cetra.sh/docs/integrations/ruby-llm/) | — | — | Ruby, its built-in `RubyLLM::OpenTelemetry` | setup only |
|
|
136
|
+
| [rig](https://cetra.sh/docs/integrations/rig/) | — | — | Rust, `tracing` spans exported by `tracing-opentelemetry` | setup only |
|
|
137
|
+
| [Arconia](https://cetra.sh/docs/integrations/arconia/) | — | — | Java, its OpenInference starter for Spring AI | setup only |
|
|
138
|
+
|
|
139
|
+
- [AG2](https://cetra.sh/docs/integrations/ag2/): Agent runs and tool calls.
|
|
140
|
+
- [Agent Spec](https://cetra.sh/docs/integrations/agent-spec/): Agent runs, model calls and tool calls, without token counts.
|
|
141
|
+
- [Agno](https://cetra.sh/docs/integrations/agno/): Agent runs, model calls and tools.
|
|
142
|
+
- [Atomic Agents](https://cetra.sh/docs/integrations/atomic-agents/): Agent runs, model calls and the tools you call yourself.
|
|
143
|
+
- [AutoGen](https://cetra.sh/docs/integrations/autogen/): AgentChat agents, model calls and tools.
|
|
144
|
+
- [Bedrock AgentCore](https://cetra.sh/docs/integrations/bedrock-agentcore/): AgentCore agents, through their Strands spans.
|
|
145
|
+
- [BeeAI Framework](https://cetra.sh/docs/integrations/beeai/): Agents in Python.
|
|
146
|
+
- [Claude Agent SDK](https://cetra.sh/docs/integrations/claude-agent-sdk/): Claude Code turns inside your app.
|
|
147
|
+
- [CrewAI](https://cetra.sh/docs/integrations/crewai/): CrewAI from Python.
|
|
148
|
+
- [Deep Agents](https://cetra.sh/docs/integrations/deepagents/): LangChain Deep Agents.
|
|
149
|
+
- [DSPy](https://cetra.sh/docs/integrations/dspy/): DSPy from Python.
|
|
150
|
+
- [eve](https://cetra.sh/docs/integrations/eve/): Agent turns, steps, model calls and tools.
|
|
151
|
+
- [Flue](https://cetra.sh/docs/integrations/flue/): Agent runs, model calls and tools, with content on by default.
|
|
152
|
+
- [Google ADK](https://cetra.sh/docs/integrations/google-adk/): Agent Development Kit runs.
|
|
153
|
+
- [Guardrails AI](https://cetra.sh/docs/integrations/guardrails/): Guards, validators and the checked call.
|
|
154
|
+
- [Haystack](https://cetra.sh/docs/integrations/haystack/): Pipelines and model calls.
|
|
155
|
+
- [Instructor](https://cetra.sh/docs/integrations/instructor/): Structured outputs and their model calls.
|
|
156
|
+
- [LangChain](https://cetra.sh/docs/integrations/langchain/): Chains, agents, models and tools.
|
|
157
|
+
- [LangGraph](https://cetra.sh/docs/integrations/langgraph/): Graphs, nodes and tools.
|
|
158
|
+
- [LlamaIndex](https://cetra.sh/docs/integrations/llama-index/): LlamaIndex from Python.
|
|
159
|
+
- [Mastra](https://cetra.sh/docs/integrations/mastra/): Agent runs, steps and tool calls.
|
|
160
|
+
- [Microsoft Agent Framework](https://cetra.sh/docs/integrations/agent-framework/): Agents and workflow steps.
|
|
161
|
+
- [Mirascope](https://cetra.sh/docs/integrations/mirascope/): Ops traces, model calls and tool loops.
|
|
162
|
+
- [OpenAI Agents SDK](https://cetra.sh/docs/integrations/openai-agents/): Agent runs and function tools.
|
|
163
|
+
- [OpenHands](https://cetra.sh/docs/integrations/openhands/): SDK conversations, steps and tools.
|
|
164
|
+
- [Pydantic AI](https://cetra.sh/docs/integrations/pydantic-ai/): Agent runs, model calls and tool calls.
|
|
165
|
+
- [Semantic Kernel](https://cetra.sh/docs/integrations/semantic-kernel/): Agents, plugin functions and model calls.
|
|
166
|
+
- [smolagents](https://cetra.sh/docs/integrations/smolagents/): Agent steps, model calls and tools.
|
|
167
|
+
- [Strands Agents](https://cetra.sh/docs/integrations/strands/): Event loop cycles, model calls and tools.
|
|
168
|
+
- [TanStack AI](https://cetra.sh/docs/integrations/tanstack-ai/): Chat runs, model calls and tool calls.
|
|
169
|
+
- [Temporal](https://cetra.sh/docs/integrations/temporal/): Agent workflows on Temporal, with their model calls.
|
|
170
|
+
- [Vercel AI SDK](https://cetra.sh/docs/integrations/vercel-ai-sdk/): Versions 4 to 7.
|
|
171
|
+
- [VoltAgent](https://cetra.sh/docs/integrations/voltagent/): Agent runs, model calls and tools, with the session.
|
|
172
|
+
- [Spring AI](https://cetra.sh/docs/integrations/spring-ai/): Model calls and tools from Spring Boot, on one of two routes.
|
|
173
|
+
- [LangChain4j](https://cetra.sh/docs/integrations/langchain4j/): Model calls with messages, tokens and cost.
|
|
174
|
+
- [Quarkus LangChain4j](https://cetra.sh/docs/integrations/quarkus-langchain4j/): AI services, model calls and tools in one trace.
|
|
175
|
+
- [Koog](https://cetra.sh/docs/integrations/koog/): Agent runs, graph nodes, model calls and tools.
|
|
176
|
+
- [Microsoft.Extensions.AI](https://cetra.sh/docs/integrations/extensions-ai/): Chat calls with messages and tokens, and tool calls.
|
|
177
|
+
|
|
178
|
+
## Apps and tools
|
|
179
|
+
|
|
180
|
+
| Integration | Python | TypeScript | How | Tested against |
|
|
181
|
+
|---|---|---|---|---|
|
|
182
|
+
| [Azure AI Evaluation](https://cetra.sh/docs/integrations/azure-ai-evaluation/) | ✓ | — | `cetra.score` with the evaluators' results | setup only |
|
|
183
|
+
| [Browser Use](https://cetra.sh/docs/integrations/browser-use/) | ✓ | — | Pydantic AI's own OpenTelemetry spans | captured |
|
|
184
|
+
| [Cleanlab](https://cetra.sh/docs/integrations/cleanlab/) | ✓ | — | `cetra.score` with Cleanlab's trustworthiness score | setup only |
|
|
185
|
+
| [Cognee](https://cetra.sh/docs/integrations/cognee/) | ✓ | — | its built-in OTLP export | setup only |
|
|
186
|
+
| [EverOS](https://cetra.sh/docs/integrations/everos/) | ✓ | — | its built-in OTLP export | captured |
|
|
187
|
+
| [Gradio](https://cetra.sh/docs/integrations/gradio/) | ✓ | — | the instrumentation of the client library | setup only |
|
|
188
|
+
| [Harbor and Terminal-Bench](https://cetra.sh/docs/integrations/harbor/) | ✓ | — | Harbor's OTLP protobuf export, sent as files | setup only |
|
|
189
|
+
| [Langflow](https://cetra.sh/docs/integrations/langflow/) | ✓ | — | the Traceloop export that Langflow includes | captured |
|
|
190
|
+
| [LiveKit Agents](https://cetra.sh/docs/integrations/livekit-agents/) | ✓ | — | LiveKit's own OpenTelemetry spans | captured |
|
|
191
|
+
| [LobeChat](https://cetra.sh/docs/integrations/lobechat/) | — | — | LobeChat's telemetry variables | setup only |
|
|
192
|
+
| [MCP](https://cetra.sh/docs/integrations/mcp/) | ✓ | — | the MCP SDK's own OpenTelemetry spans | captured |
|
|
193
|
+
| [n8n](https://cetra.sh/docs/integrations/n8n/) | — | — | n8n's OpenTelemetry export | captured |
|
|
194
|
+
| [OpenLIT](https://cetra.sh/docs/integrations/openlit/) | ✓ | — | OpenLIT's own OpenTelemetry instrumentation | captured |
|
|
195
|
+
| [Pipecat](https://cetra.sh/docs/integrations/pipecat/) | ✓ | — | Pipecat's built-in tracing | captured |
|
|
196
|
+
| [Pixeltable](https://cetra.sh/docs/integrations/pixeltable/) | ✓ | — | `opentelemetry-instrumentation-pixeltable` | setup only |
|
|
197
|
+
| [Prompt Flow](https://cetra.sh/docs/integrations/prompt-flow/) | ✓ | — | Prompt Flow's own OpenTelemetry setup | captured |
|
|
198
|
+
| [Promptfoo](https://cetra.sh/docs/integrations/promptfoo/) | — | — | Promptfoo's own OpenTelemetry export | captured |
|
|
199
|
+
| [Ragas](https://cetra.sh/docs/integrations/ragas/) | ✓ | — | `cetra.score` with Ragas metric results | setup only |
|
|
200
|
+
| [Stagehand](https://cetra.sh/docs/integrations/stagehand/) | — | ✓ | the `telemetry` option of the Stagehand SDK | setup only |
|
|
201
|
+
| [UQLM](https://cetra.sh/docs/integrations/uqlm/) | ✓ | — | `cetra.score` with UQLM's scorer results | setup only |
|
|
202
|
+
| [Vector databases](https://cetra.sh/docs/integrations/vector-databases/) | ✓ | — | OpenLIT's or OpenLLMetry's vector instrumentors | captured |
|
|
203
|
+
|
|
204
|
+
- [Browser Use](https://cetra.sh/docs/integrations/browser-use/): Browser agent runs, model calls and tools.
|
|
205
|
+
- [EverOS](https://cetra.sh/docs/integrations/everos/): Memory add, flush and search calls, with their model and embedding calls.
|
|
206
|
+
- [Langflow](https://cetra.sh/docs/integrations/langflow/): Flow runs, components and model calls.
|
|
207
|
+
- [LiveKit Agents](https://cetra.sh/docs/integrations/livekit-agents/): Agent sessions, turns, model calls and tools.
|
|
208
|
+
- [MCP](https://cetra.sh/docs/integrations/mcp/): Tool calls across MCP clients and servers.
|
|
209
|
+
- [n8n](https://cetra.sh/docs/integrations/n8n/): Workflow runs, nodes and the tokens of AI nodes.
|
|
210
|
+
- [OpenLIT](https://cetra.sh/docs/integrations/openlit/): Model, embedding and vector database spans.
|
|
211
|
+
- [Pipecat](https://cetra.sh/docs/integrations/pipecat/): Conversations, turns and each model call.
|
|
212
|
+
- [Prompt Flow](https://cetra.sh/docs/integrations/prompt-flow/): Traced functions and their OpenAI calls.
|
|
213
|
+
- [Promptfoo](https://cetra.sh/docs/integrations/promptfoo/): Eval cases, provider calls and graders.
|
|
214
|
+
- [Vector databases](https://cetra.sh/docs/integrations/vector-databases/): Chroma, Qdrant, Milvus, Pinecone and Weaviate calls.
|
|
215
|
+
|
|
216
|
+
## Coding agents
|
|
217
|
+
|
|
218
|
+
| Integration | Python | TypeScript | How | Tested against |
|
|
219
|
+
|---|---|---|---|---|
|
|
28
220
|
| [Claude Code](https://cetra.sh/docs/integrations/claude-code/) | — | — | `cetra agents setup claude-code` | captured |
|
|
29
221
|
| [Codex CLI](https://cetra.sh/docs/integrations/codex/) | — | — | `cetra agents setup codex` | captured |
|
|
30
222
|
| [Gemini CLI](https://cetra.sh/docs/integrations/gemini-cli/) | — | — | `cetra agents setup gemini-cli` | captured |
|
|
223
|
+
| [Qwen Code](https://cetra.sh/docs/integrations/qwen-code/) | — | — | `cetra agents setup qwen-code` | captured |
|
|
224
|
+
| [Pi](https://cetra.sh/docs/integrations/pi/) | — | — | `cetra agents setup pi` | captured |
|
|
225
|
+
| [OpenClaw](https://cetra.sh/docs/integrations/openclaw/) | — | — | `cetra agents setup openclaw` | captured |
|
|
226
|
+
| [OpenCode](https://cetra.sh/docs/integrations/opencode/) | — | — | `cetra agents setup opencode` | captured |
|
|
227
|
+
| [Goose](https://cetra.sh/docs/integrations/goose/) | — | — | `cetra agents setup goose` | captured |
|
|
228
|
+
| [Oh My Pi](https://cetra.sh/docs/integrations/oh-my-pi/) | — | — | `cetra agents setup oh-my-pi` | captured |
|
|
31
229
|
| [GitHub Copilot](https://cetra.sh/docs/integrations/copilot/) | — | — | `cetra agents setup copilot` | hand-written |
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
230
|
+
| [Hermes Agent](https://cetra.sh/docs/integrations/hermes-agent/) | — | — | the `hermes-otel` community plugin | captured |
|
|
231
|
+
| [Augment Code](https://cetra.sh/docs/integrations/augment-code/) | — | — | its `otel` extension's environment variables | setup only |
|
|
232
|
+
| [Devin SDK](https://cetra.sh/docs/integrations/devin-sdk/) | — | — | the SDK's session tracing | setup only |
|
|
233
|
+
| [Omnigent](https://cetra.sh/docs/integrations/omnigent/) | — | — | Omnigent's telemetry environment variables | setup only |
|
|
36
234
|
|
|
37
235
|
- [Claude Code](https://cetra.sh/docs/integrations/claude-code/): Prompts, model calls and tools, with the Claude Agent SDK.
|
|
38
236
|
- [Codex CLI](https://cetra.sh/docs/integrations/codex/): Turns and tool calls from codex exec.
|
|
39
237
|
- [Gemini CLI](https://cetra.sh/docs/integrations/gemini-cli/): Model calls and tool batches.
|
|
238
|
+
- [Qwen Code](https://cetra.sh/docs/integrations/qwen-code/): Model calls and tool calls, with the session.
|
|
239
|
+
- [Pi](https://cetra.sh/docs/integrations/pi/): Prompts, model calls and tools through cetra's pi extension.
|
|
240
|
+
- [OpenClaw](https://cetra.sh/docs/integrations/openclaw/): Agent runs, model calls and tools through its diagnostics plugin.
|
|
241
|
+
- [OpenCode](https://cetra.sh/docs/integrations/opencode/): Prompts, model calls and tools through cetra's OpenCode plugin.
|
|
242
|
+
- [Goose](https://cetra.sh/docs/integrations/goose/): Replies, model calls and tools through its OpenTelemetry environment.
|
|
243
|
+
- [Oh My Pi](https://cetra.sh/docs/integrations/oh-my-pi/): Runs, model calls and tools through its .env file.
|
|
40
244
|
- [GitHub Copilot](https://cetra.sh/docs/integrations/copilot/): Copilot CLI and VS Code Copilot Chat.
|
|
41
|
-
|
|
42
|
-
## Providers
|
|
43
|
-
|
|
44
|
-
- [OpenAI](https://cetra.sh/docs/integrations/openai/): Chat, Responses API and embeddings.
|
|
45
|
-
- [Anthropic](https://cetra.sh/docs/integrations/anthropic/): Messages, streaming, thinking and cache tokens.
|
|
46
|
-
- [Google Gen AI](https://cetra.sh/docs/integrations/google-genai/): Gemini through the Google Gen AI SDK.
|
|
47
|
-
- [Amazon Bedrock](https://cetra.sh/docs/integrations/bedrock/): Bedrock calls from Python.
|
|
48
|
-
- [LiteLLM](https://cetra.sh/docs/integrations/litellm/): LiteLLM calls from Python.
|
|
49
|
-
|
|
50
|
-
## Frameworks
|
|
51
|
-
|
|
52
|
-
- [LangChain and LangGraph](https://cetra.sh/docs/integrations/langchain/): Chains, agents, models and tools.
|
|
53
|
-
- [LlamaIndex](https://cetra.sh/docs/integrations/llama-index/): LlamaIndex from Python.
|
|
54
|
-
- [Vercel AI SDK](https://cetra.sh/docs/integrations/vercel-ai-sdk/): Versions 4 to 7.
|
|
55
|
-
- [OpenAI Agents SDK](https://cetra.sh/docs/integrations/openai-agents/): Agent runs and function tools.
|
|
56
|
-
- [CrewAI](https://cetra.sh/docs/integrations/crewai/): CrewAI from Python.
|
|
57
|
-
- [DSPy](https://cetra.sh/docs/integrations/dspy/): DSPy from Python.
|
|
58
|
-
- [Google ADK](https://cetra.sh/docs/integrations/google-adk/): Agent Development Kit runs.
|
|
245
|
+
- [Hermes Agent](https://cetra.sh/docs/integrations/hermes-agent/): Turns, model calls and tools through its telemetry plugin.
|
|
59
246
|
|
|
60
247
|
## Instrumentation libraries
|
|
61
248
|
|
|
249
|
+
| Integration | Python | TypeScript | How | Tested against |
|
|
250
|
+
|---|---|---|---|---|
|
|
251
|
+
| [OpenInference](https://cetra.sh/docs/integrations/openinference/) | ✓ | ✓ | point its exporter at cetra | captured |
|
|
252
|
+
| [OpenLLMetry (Traceloop)](https://cetra.sh/docs/integrations/openllmetry/) | ✓ | ✓ | point its exporter at cetra | captured |
|
|
253
|
+
| [OpenTelemetry GenAI](https://cetra.sh/docs/integrations/opentelemetry-genai/) | ✓ | ✓ | the official `opentelemetry-instrumentation-*` packages | captured |
|
|
254
|
+
|
|
62
255
|
- [OpenInference](https://cetra.sh/docs/integrations/openinference/): Arize's instrumentation, with any exporter.
|
|
63
256
|
- [OpenLLMetry](https://cetra.sh/docs/integrations/openllmetry/): Traceloop's instrumentation and SDK.
|
|
64
257
|
- [OpenTelemetry GenAI](https://cetra.sh/docs/integrations/opentelemetry-genai/): The official GenAI instrumentation packages.
|
|
65
258
|
|
|
66
259
|
## Migrating
|
|
67
260
|
|
|
68
|
-
|
|
261
|
+
| Integration | Python | TypeScript | How | Tested against |
|
|
262
|
+
|---|---|---|---|---|
|
|
263
|
+
| [From Laminar](https://cetra.sh/docs/integrations/from-laminar/) | ✓ | — | keep the Laminar SDK, export its spans to cetra | captured |
|
|
264
|
+
| [From Langfuse](https://cetra.sh/docs/integrations/from-langfuse/) | ✓ | — | keep the Langfuse SDK, export its spans to cetra | captured |
|
|
265
|
+
|
|
69
266
|
- [From Laminar](https://cetra.sh/docs/integrations/from-laminar/): Keep the Laminar SDK and send its spans to cetra.
|
|
267
|
+
- [From Langfuse](https://cetra.sh/docs/integrations/from-langfuse/): Keep the Langfuse SDK and send its spans to cetra.
|
|
268
|
+
|
|
269
|
+
"Captured" means the repository holds spans recorded from the real library, and a test checks how cetra reads them. "Hand-written" means the spans in the repository were written from the vendor's attribute reference. "SDK test" means an SDK test checks the helper, and the repository holds no recorded spans. "Setup only" means the page shows the setup; nothing in the repository records this integration's spans. A ✓ for TypeScript means a helper in `@cetra-ai/sdk`, or a TypeScript library whose spans are captured. A — means no helper or captured run exists for that language: you can still use the library's own OpenTelemetry instrumentation with [Send OpenTelemetry](https://cetra.sh/docs/get-started/opentelemetry/). A dash in both language columns means the page is for another language, named in the How column (Java, Kotlin, .NET, Go, Ruby, Rust).
|
|
70
270
|
|
|
71
271
|
Anything else that speaks OpenTelemetry works through [Send OpenTelemetry](https://cetra.sh/docs/get-started/opentelemetry/).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- Generated from website/src/content/docs/docs/integrations/langchain.mdx by website/scripts/skill-references.mjs. Do not edit: run `just docs-gen`. -->
|
|
2
2
|
|
|
3
|
-
# LangChain
|
|
3
|
+
# LangChain
|
|
4
4
|
|
|
5
|
-
Trace LangChain
|
|
5
|
+
Trace LangChain chains, agents, models and tools with cetra from Python and TypeScript, through the OpenInference LangChain instrumentation.
|
|
6
6
|
|
|
7
|
-
cetra traces LangChain and LangGraph runs as a tree: the graph, its nodes, each model call and each tool call.
|
|
7
|
+
cetra traces LangChain and LangGraph runs as a tree: the graph, its nodes, each model call and each tool call. For LangGraph graphs and Deep Agents, see [LangGraph](https://cetra.sh/docs/integrations/langgraph/) and [Deep Agents](https://cetra.sh/docs/integrations/deepagents/).
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -63,6 +63,10 @@ await model.invoke("What is the weather in Paris?");
|
|
|
63
63
|
- LangChain's run metadata, such as `langgraph_node` and `langgraph_step`, is kept as span metadata.
|
|
64
64
|
- Cost is computed from the token counts of each model call.
|
|
65
65
|
|
|
66
|
+
## LangServe
|
|
67
|
+
|
|
68
|
+
LangServe serves LangChain runnables over HTTP and has no spans of its own. Instrument the app's LangChain code as this page shows, and add an OpenTelemetry FastAPI instrumentor for the HTTP layer if you want HTTP spans.
|
|
69
|
+
|
|
66
70
|
## Limits
|
|
67
71
|
|
|
68
72
|
- The fixtures were captured in Python with `langchain` 1.4.8, `langchain-openai` 1.7.3 and `langgraph` 1.2.19, with OpenInference 0.1.81 and OpenLLMetry 0.62.4.
|
|
@@ -6,6 +6,8 @@ Trace LiteLLM calls with cetra from Python, with the OpenInference LiteLLM instr
|
|
|
6
6
|
|
|
7
7
|
cetra can trace LiteLLM calls from Python through the OpenInference LiteLLM instrumentation.
|
|
8
8
|
|
|
9
|
+
Running the LiteLLM Proxy instead? See [LiteLLM Proxy](https://cetra.sh/docs/integrations/litellm-proxy/).
|
|
10
|
+
|
|
9
11
|
## Install
|
|
10
12
|
|
|
11
13
|
```bash
|
|
@@ -26,6 +26,10 @@ instrumented yourself is left alone (one debug line). `shutdown()` uninstruments
|
|
|
26
26
|
everything the SDK enabled. Our provider raises the OTel attribute limit to
|
|
27
27
|
10 000, so flattened message attributes are not clipped.
|
|
28
28
|
|
|
29
|
+
With `instrument=["openai"]`, cetra records the host of the OpenAI client's base URL as `server.address`, so calls to OpenRouter, Novita or another provider behind the OpenAI client show that provider.
|
|
30
|
+
The host is the only part of the URL that is recorded.
|
|
31
|
+
Only the `create` methods of chat completions, responses and embeddings record the host; spans of `parse` or `stream` calls do not.
|
|
32
|
+
|
|
29
33
|
## Existing OpenTelemetry setups
|
|
30
34
|
|
|
31
35
|
By default `init()` builds its own `TracerProvider` and never registers it
|
|
@@ -36,8 +36,22 @@ Auto-instrumentation is optional, one extra per library:
|
|
|
36
36
|
| `openai-agents` | `cetra-sdk[openai-agents]` |
|
|
37
37
|
| `crewai` | `cetra-sdk[crewai]` |
|
|
38
38
|
| `dspy` | `cetra-sdk[dspy]` |
|
|
39
|
-
|
|
40
|
-
`
|
|
39
|
+
| `groq` | `cetra-sdk[groq]` |
|
|
40
|
+
| `mistralai` | `cetra-sdk[mistralai]` |
|
|
41
|
+
| `cohere` | `cetra-sdk[cohere]` |
|
|
42
|
+
| `ollama` | `cetra-sdk[ollama]` |
|
|
43
|
+
| `together` | `cetra-sdk[together]` |
|
|
44
|
+
| `instructor` | `cetra-sdk[instructor]` |
|
|
45
|
+
| `agno` | `cetra-sdk[agno]` |
|
|
46
|
+
| `smolagents` | `cetra-sdk[smolagents]` |
|
|
47
|
+
| `haystack` | `cetra-sdk[haystack]` |
|
|
48
|
+
| `beeai` | `cetra-sdk[beeai]` |
|
|
49
|
+
| `mcp` | `cetra-sdk[mcp]` |
|
|
50
|
+
| `autogen-agentchat` | `pip install openinference-instrumentation-autogen-agentchat` |
|
|
51
|
+
|
|
52
|
+
The `instructor` and `beeai` distributions do not support every Python version: the `instructor` extra installs on Python 3.13 or earlier, and `beeai` on Python 3.14 or earlier.
|
|
53
|
+
|
|
54
|
+
`cetra-sdk[all]` installs every instrumentor that has an extra. The core package pulls in only `opentelemetry-api`, `opentelemetry-sdk`, `opentelemetry-exporter-otlp-proto-http` and `requests`.
|
|
41
55
|
|
|
42
56
|
## Initialize
|
|
43
57
|
|
|
@@ -77,3 +91,7 @@ An explicit argument wins over the environment variable, which wins over the def
|
|
|
77
91
|
## What is never logged
|
|
78
92
|
|
|
79
93
|
The SDK's own logs and errors never contain payload content (prompts, completions, attribute values), secrets, API keys or email addresses. Log lines carry ids, sizes, counts and exception type names only; configuration errors name the option, never its value; the API key is excluded from `repr` and serialization of the config. Messages go to the `cetra` logger, which has no handlers by default: configure the standard `logging` module to see them. The missing-key and second-`init()` warnings appear once per process; a full score buffer warns at most once per minute, and rejected or failed score batches are logged as they happen.
|
|
94
|
+
|
|
95
|
+
## User agent
|
|
96
|
+
|
|
97
|
+
Every request the SDK sends carries `User-Agent: cetra-sdk-python/<version>`: score writes, prompt fetches and `Client` calls. The trace exporter keeps the OpenTelemetry exporter's own value and adds the SDK's after it (`OTel-OTLP-Exporter-Python/<otel version> cetra-sdk-python/<version>`). Nothing else goes into it. A firewall or proxy in front of cetra can allow these values.
|
|
@@ -72,6 +72,15 @@ Select **Columns** to show, hide or reorder them. The list has the same facets,
|
|
|
72
72
|
|
|
73
73
|
Open a session to read it as a transcript. cetra rebuilds the conversation from the input and output of each trace's root span, in order. Select a turn to open its trace. Session scores sit at the top, and **Annotate** adds your own.
|
|
74
74
|
|
|
75
|
+
Each turn shows the calls made in it, and the page helps you search and move through the turns:
|
|
76
|
+
|
|
77
|
+
- Tool, retriever and guardrail calls appear as chips under the turn. A failed call is red and shows its error message.
|
|
78
|
+
- Select the chevron beside a turn to list its model, tool, retriever and guardrail calls in order, each with one line of its input preview. Select a call to open it in the trace.
|
|
79
|
+
- Search the turns by name or text, and filter them with the **Failed**, **Scored** and **Uses tools** chips.
|
|
80
|
+
- Switch to **Compact** to show one line per turn.
|
|
81
|
+
- The strip above the transcript shows one cell per turn, sized by duration and colored by status. Select a cell to jump to its turn.
|
|
82
|
+
- Press `j` and `k`, or the arrow keys, to move between turns. The errors chip in the header selects the next failed turn, then starts again from the first.
|
|
83
|
+
|
|
75
84
|
A session takes its user from the first trace that has one, and its tags are the tags of all its traces together.
|
|
76
85
|
|
|
77
86
|
## Filter sessions
|
|
@@ -196,15 +196,73 @@ Live items of each dataset at its current version.
|
|
|
196
196
|
|
|
197
197
|
| Function | Description |
|
|
198
198
|
|---|---|
|
|
199
|
-
| `now() -> timestamp` | Current time. |
|
|
200
199
|
| `lower(value: string) -> string` | Lowercase a string. |
|
|
201
200
|
| `upper(value: string) -> string` | Uppercase a string. |
|
|
202
|
-
| `length(value: string) -> integer` | Number of characters. |
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
| `
|
|
201
|
+
| `length(value: string) -> integer` | Number of UTF-8 characters. |
|
|
202
|
+
| `substr(value: string, start: integer [, count: integer]) -> string` | Extract a substring (1-based start). |
|
|
203
|
+
| `trim(value: string [, chars: string]) -> string` | Trim leading and trailing characters. |
|
|
204
|
+
| `ltrim(value: string [, chars: string]) -> string` | Trim leading characters. |
|
|
205
|
+
| `rtrim(value: string [, chars: string]) -> string` | Trim trailing characters. |
|
|
206
|
+
| `left(value: string, n: integer) -> string` | First n characters of a string. |
|
|
207
|
+
| `right(value: string, n: integer) -> string` | Last n characters of a string. |
|
|
208
|
+
| `split_part(value: string, delimiter: string, part: integer) -> string` | Split a string and return the 1-based part. |
|
|
209
|
+
| `concat(value: any, ...) -> string` | Concatenate values as a string. |
|
|
210
|
+
| `concat_ws(separator: string, value: any, ...) -> string` | Concatenate non-null values with a separator. |
|
|
211
|
+
| `starts_with(value: string, prefix: string) -> boolean` | Whether value starts with prefix. |
|
|
212
|
+
| `ends_with(value: string, suffix: string) -> boolean` | Whether value ends with suffix. |
|
|
213
|
+
| `contains(value: string, substring: string) -> boolean` | Whether value contains substring. |
|
|
214
|
+
| `strpos(value: string, substring: string) -> integer` | 1-based position of substring, or 0 if absent. |
|
|
215
|
+
| `regexp_like(value: string, pattern: string [, flags: string]) -> boolean` | Whether value matches a regular expression. |
|
|
216
|
+
| `regexp_extract(value: string, pattern: string [, flags: string]) -> string` | Extract the first match or capture group. |
|
|
217
|
+
| `encode(value: binary \| string, encoding: string) -> string` | Encode bytes using hex or base64. |
|
|
218
|
+
| `now() -> timestamp` | Current query timestamp. |
|
|
206
219
|
| `date_trunc(unit: string, time: timestamp) -> timestamp` | Truncate a timestamp to a unit such as day or hour. |
|
|
207
|
-
| `
|
|
220
|
+
| `date_bin(stride: interval, time: timestamp [, origin: timestamp]) -> timestamp` | Bin a timestamp to fixed stride boundaries. |
|
|
221
|
+
| `extract(field: string, value: timestamp \| date \| interval) -> integer \| float` | Extract a calendar field from a timestamp, date, or interval. |
|
|
222
|
+
| `to_timestamp(value: integer \| float \| string \| timestamp) -> timestamp` | Convert epoch seconds or string to a UTC timestamp. |
|
|
223
|
+
| `abs(value: number) -> number` | Absolute value. |
|
|
224
|
+
| `round(value: number [, digits: integer]) -> number` | Round a number to digits decimal places. |
|
|
225
|
+
| `floor(value: number) -> number` | Largest integer not greater than value. |
|
|
226
|
+
| `ceil(value: number) -> number` | Smallest integer not less than value. |
|
|
227
|
+
| `sqrt(value: float) -> float` | Square root. |
|
|
228
|
+
| `ln(value: float) -> float` | Natural logarithm. |
|
|
229
|
+
| `log10(value: float) -> float` | Base-10 logarithm. |
|
|
230
|
+
| `power(base: float, exponent: float) -> float` | Raise base to exponent. |
|
|
231
|
+
| `coalesce(value: any, fallback: any, ...) -> any` | First non-null argument. |
|
|
232
|
+
| `nullif(a: any, b: any) -> any` | Return null when a equals b, else a. |
|
|
233
|
+
| `greatest(value: any, ...) -> any` | Largest non-null argument. |
|
|
234
|
+
| `least(value: any, ...) -> any` | Smallest non-null argument. |
|
|
235
|
+
| `isnan(value: float) -> boolean` | Whether value is IEEE NaN. |
|
|
236
|
+
| `isfinite(value: float) -> boolean` | Whether value is finite (not NaN or infinite). |
|
|
237
|
+
| `array_has(array: list, value: any) -> boolean` | Whether the list contains the value. |
|
|
238
|
+
| `array_has_all(array: list, subset: list) -> boolean` | Whether array contains every element of subset. |
|
|
239
|
+
| `array_length(array: list [, dim: integer]) -> integer` | Number of elements. |
|
|
240
|
+
| `array_element(array: list, index: integer) -> any` | 1-based element of a list. |
|
|
241
|
+
| `array_to_string(array: list, delimiter: string [, null_str: string]) -> string` | Join list elements into a string. |
|
|
242
|
+
| `array_distinct(array: list) -> list` | Remove duplicate elements from a list. |
|
|
243
|
+
| `map_keys(map: string_map) -> string_list` | Sorted keys of a string map. |
|
|
244
|
+
| `map_values(map: string_map) -> string_list` | Values of a string map in key order. |
|
|
245
|
+
| `json_get(json: string, key: string \| integer) -> string` | Get JSON object field or array element as JSON text. |
|
|
246
|
+
| `json_get_text(json: string, key: string \| integer) -> string` | Get JSON object field or array element as unquoted text. |
|
|
247
|
+
| `json_extract(json: string, path: string) -> string` | Extract JSONPath value as JSON text. |
|
|
248
|
+
| `json_extract_text(json: string, path: string) -> string` | Extract JSONPath value as unquoted text. |
|
|
249
|
+
| `count([DISTINCT] value: any \| *) -> integer` | Count rows or non-null values. |
|
|
250
|
+
| `sum(value: number) -> number` | Sum of non-null values. |
|
|
251
|
+
| `avg(value: number) -> float \| decimal` | Arithmetic mean of non-null values. |
|
|
252
|
+
| `min(value: any) -> any` | Minimum non-null value. |
|
|
253
|
+
| `max(value: any) -> any` | Maximum non-null value. |
|
|
254
|
+
| `approx_percentile_cont(value: number, quantile: float) -> float` | Approximate continuous percentile via DDSketch. |
|
|
255
|
+
| `percentile_cont(quantile: float) WITHIN GROUP (ORDER BY value) -> float` | Exact interpolated continuous percentile. |
|
|
256
|
+
| `bool_or(value: boolean) -> boolean` | True if any non-null value is true. |
|
|
257
|
+
| `bool_and(value: boolean) -> boolean` | True if all non-null values are true. |
|
|
258
|
+
| `array_agg([DISTINCT] value: any) -> list` | Collect non-null values into a list. |
|
|
259
|
+
| `row_number() OVER (...) -> integer` | Sequential 1-based row number within each partition. |
|
|
260
|
+
| `rank() OVER (...) -> integer` | 1-based rank with gaps for ties. |
|
|
261
|
+
| `dense_rank() OVER (...) -> integer` | 1-based rank without gaps for ties. |
|
|
262
|
+
| `lag(value: any [, offset: integer [, default: any]]) OVER (...) -> any` | Value from a preceding row in the partition. |
|
|
263
|
+
| `lead(value: any [, offset: integer [, default: any]]) OVER (...) -> any` | Value from a following row in the partition. |
|
|
264
|
+
| `first_value(value: any) OVER (...) -> any` | Value at the first row of the window frame. |
|
|
265
|
+
| `last_value(value: any) OVER (...) -> any` | Value at the last row of the window frame. |
|
|
208
266
|
| `score(name: string) -> float` | Latest numeric score of that name on the row's target. |
|
|
209
267
|
| `score_label(name: string) -> string` | Latest categorical or text score of that name. |
|
|
210
268
|
| `has_score(name: string) -> boolean` | Whether the row's target has a score of that name. |
|
|
@@ -54,3 +54,7 @@ An explicit argument wins over the env var, which wins over the default. Env val
|
|
|
54
54
|
## What is never logged
|
|
55
55
|
|
|
56
56
|
Logs and warnings never contain payloads (prompts, completions, attribute values), API keys or email addresses: ids, sizes and counts only. An invalid score logs `cetra: score not queued: <reason>` with the reason, never the value. The API key never appears in errors or serialized config.
|
|
57
|
+
|
|
58
|
+
## User agent
|
|
59
|
+
|
|
60
|
+
Every request the SDK sends carries `User-Agent: cetra-sdk-js/<version>`: trace exports, score writes, prompt fetches and `Client` calls. Nothing else goes into it. A firewall or proxy in front of cetra can allow this value. The browser `feedback()` helper sends the browser's own user agent.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cetra-ai/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.1.0-rc.3",
|
|
4
4
|
"description": "Set up cetra tracing with one command and one prompt to your coding agent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://cetra.sh/docs/get-started/coding-agent/",
|
|
@@ -23,19 +23,19 @@
|
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
|
|
28
|
-
"build": "tsdown",
|
|
29
|
-
"test": "vitest run",
|
|
30
|
-
"check:package": "publint",
|
|
31
|
-
"check": "biome check . && pnpm typecheck && pnpm build && pnpm test && pnpm check:package"
|
|
32
|
-
},
|
|
33
26
|
"devDependencies": {
|
|
34
27
|
"@types/node": "26.6.6",
|
|
35
28
|
"publint": "0.3.25",
|
|
36
29
|
"smol-toml": "1.9.1",
|
|
37
30
|
"tsdown": "0.23.7",
|
|
38
31
|
"typescript": "5.9.3",
|
|
39
|
-
"vitest": "5.1.
|
|
32
|
+
"vitest": "5.1.1"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
|
|
36
|
+
"build": "tsdown",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"check:package": "publint",
|
|
39
|
+
"check": "biome check . && pnpm typecheck && pnpm build && pnpm test && pnpm check:package"
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|