Skip to main content

Export agent traces

Glean can push agent execution traces to your observability platform through standard OpenTelemetry Protocol (OTLP) export. This gives your team visibility into agent runs, tool calls, and LLM interactions using the monitoring tools you already operate.

Exported traces follow OpenTelemetry semantic conventions and include spans for agent runs, tool executions, and LLM calls. You can view them in any platform that accepts OTLP data, such as Datadog, Dynatrace, Grafana, Langfuse, LangSmith, Braintrust, or Splunk.

How it works​

When you enable trace export, Glean pushes OTLP/HTTP traces with protobuf encoding to a customer-configured endpoint. Before export, Glean filters attributes, transforms span data, and excludes internal-only spans so that only customer-relevant telemetry leaves the system.

Each exported trace captures the full lifecycle of an agent run, from the initial request through tool calls and LLM interactions to the final response.

Set up trace export​

1

Open the Admin console

Navigate to the trace export settings in the Admin console.

2

Enter the OTLP endpoint

Provide the OTLP/HTTP endpoint URL for your observability platform.

3

Configure request headers

Add any request headers your platform requires. For authentication tokens, use the {{token}} substitution syntax in the header value and enter the secret separately. The secret is stored encrypted and isn't shown again after you save.

4

Add resource attributes (optional)

Under Resource attributes, add any static metadata your platform needs for routing or grouping. Each row takes an Attribute name and an Attribute value. See Resource attributes for limits and reserved names.

5

Enable export

Turn on trace export. Glean begins pushing traces for new agent runs immediately.

Destination configuration​

The following table lists the endpoint URL, headers, auth token, and resource attributes each platform expects. Enter {{token}} literally in the header value, and replace values in angle brackets with your own. If your provider gives you a tenant-specific or region-specific endpoint, use that exact value.

DestinationOTLP endpoint URLHeadersAuth tokenResource attributes
Datadog APMhttps://otlp.<DD_SITE>/v1/tracesDD-API-KEY: {{token}}Datadog API key—
Datadog LLM ObservabilitySame regional endpoint as Datadog APMDD-API-KEY: {{token}}
DD-OTLP-SOURCE: llmobs
Datadog API key—
Grafana Cloud / Tempohttps://otlp-gateway-<region>.grafana.net/otlp/v1/tracesAuthorization: Basic {{token}}Base64 of <instance-id>:<access-policy-token>—
HoneycombUS: https://api.honeycomb.io/v1/traces
EU: https://api.eu1.honeycomb.io/v1/traces
x-honeycomb-team: {{token}}Honeycomb team API key—
New RelicUS: https://otlp.nr-data.net:4318/v1/traces
EU: https://otlp.eu01.nr-data.net:4318/v1/traces
api-key: {{token}}New Relic ingest or license key—
Dynatracehttps://<environment-id>.live.dynatrace.com/api/v2/otlp/v1/tracesAuthorization: Api-Token {{token}}API token with the openTelemetryTrace.ingest scope—
Splunk Observability Cloudhttps://ingest.<realm>.observability.splunkcloud.com/v2/trace/otlpX-SF-Token: {{token}}Splunk access token—
Elastic ObservabilityYour managed OTLP or APM HTTP traces endpointAPI key: Authorization: ApiKey {{token}}
Secret token: Authorization: Bearer {{token}}
Elastic API key or APM secret token—
Coralogixhttps://ingress.<region>.coralogix.com:443/v1/tracesAuthorization: Bearer {{token}}Send-Your-Data API keycx.application.name: <application>
cx.subsystem.name: <subsystem>
SigNoz Cloudhttps://ingest.<region>.signoz.cloud:443/v1/tracessignoz-ingestion-key: {{token}}SigNoz ingestion key—
SigNoz self-hostedYour OTLP/HTTP traces endpoint, commonly http(s)://<host>:4318/v1/tracesAny headers you defineYour own token—
Uptracehttps://api.uptrace.dev/v1/tracesuptrace-dsn: {{token}}Full Uptrace DSN, not only its token component—
HyperDXhttps://in-otel.hyperdx.io/v1/tracesauthorization: {{token}}HyperDX ingestion API key—
Observehttps://<customer>.collect.observeinc.com/v2/otel/v1/tracesauthorization: Bearer {{token}}
Add x-observe-target-package: <package> when Observe supplies one
Observe ingest token—
ChronosphereThe exact tenant OTLP/HTTP traces endpoint Chronosphere suppliesAPI-Token: {{token}}Chronosphere API token—
Better Stackhttps://<ingesting-host>/v1/tracesAuthorization: Bearer {{token}}Better Stack source token—
SentryThe OTLP traces URL in Project Settings → Client Keys (DSN) → OpenTelemetryx-sentry-auth: sentry sentry_key={{token}}The Sentry public key shown with the OTLP endpoint—
groundcoverYour BYOC or inCloud OTLP HTTP traces endpointapikey: {{token}}Third-party ingestion key—
Arize AXhttps://otlp.arize.com/v1/traces, or the endpoint Arize suppliesapi_key: {{token}}
space_id: <space-id>
Arize API keymodel_id: <project-name>
Add openinference.project.name: <project-name> when your Arize setup specifies it
LangfuseEU: https://cloud.langfuse.com/api/public/otel/v1/traces
Use your US, JP, HIPAA, or self-hosted hostname when applicable
Authorization: Basic {{token}}
x-langfuse-ingestion-version: 4
Base64 of <public-key>:<secret-key>—
LangSmithhttps://api.smith.langchain.com/otel/v1/tracesx-api-key: {{token}}
Langsmith-Project: <project-name>
LangSmith API key—
Braintrusthttps://api.braintrust.dev/otel/v1/tracesAuthorization: Bearer {{token}}
x-bt-parent: project_id:<project-id> or project_name:<name>
Braintrust API key—
TraceloopThe environment-specific OTLP/HTTP traces endpoint shown in TraceloopUse the API-key header shown with that endpointEnvironment-specific Traceloop API key—

Resource attributes​

Resource attributes are static key-value pairs that Glean attaches to the OpenTelemetry resource on every span sent to a destination. Use them for values your observability platform expects outside of transport headers, such as a project, namespace, or environment identifier. You configure them separately for each export destination.

For example:

Attribute nameAttribute value
model_idcustomer-project
service.namespacecustomer-agents

Glean sets service.name to glean and manages it for you. Attempts to set service.name yourself are rejected.

warning

Resource attribute values are exported with every span. Don't enter credentials, tokens, or sensitive user data. For authentication, use request headers with the {{token}} substitution syntax instead.

The following limits apply to each destination:

LimitValue
Resource attributes per destination32
Attribute name length256 characters
Attribute value length1,024 characters
Total size of all attributes16 KiB

Attribute names are case-sensitive, must be unique within a destination, and can't be empty. Values can't be empty either.

Exported trace attributes​

Each span includes a set of attributes that follow OpenTelemetry semantic conventions for generative AI. Every trace also includes a root span that acts as a structural anchor for the run. The attributes vary by span type.

Common attributes​

These attributes appear on every exported span:

AttributeDescription
gen_ai.conversation.idConversation identifier
enduser.idEmail or identifier of the end user who initiated the run
gen_ai.operation.nameOperation name for the span, such as invoke_agent, execute_tool, or chat (omitted on the root span)

Agent run spans​

AttributeDescription
gen_ai.agent.idUnique identifier for the agent
gen_ai.agent.nameDisplay name of the agent
glean.agent.modeAgent execution mode

Tool spans​

The attributes on a tool span depend on the tool's export classification (see Tool data classification).

AttributeDescriptionWhen exported
gen_ai.tool.nameName of the toolAlways
gen_ai.tool.call.idUnique identifier for the tool callAlways
error.typeError classification, if the tool call failedAlways (when present)
gen_ai.tool.call.argumentsArguments passed to the toolOnly for fully exportable tools
gen_ai.tool.call.resultResult returned by the toolOnly for fully exportable tools

Glean's native tools' descriptions, arguments, and results are redacted because they may be sensitive, proprietary, or retrieval-heavy.

Tool data classification​

Agent trace export fully exports customer-authored tools. The tool name, call arguments, and call result are all included in the trace. This applies to custom action packs, custom MCP servers, and custom OpenAPI servers, along with any template-backed tool configured to allow externalization.

Glean's native tools' descriptions, arguments, and results are redacted because they may be sensitive, proprietary, or retrieval-heavy.

LLM call spans​

AttributeDescription
gen_ai.request.modelModel requested for the LLM call
gen_ai.response.modelModel that produced the response
gen_ai.response.idProvider request identifier for the response
gen_ai.provider.nameLLM provider (for example, openai, anthropic, aws.bedrock)
gen_ai.response.finish_reasonsReasons the model stopped generating
gen_ai.response.time_to_first_chunkTime to first response chunk, in seconds
gen_ai.output.messagesModel output messages, serialized as JSON
error.typeError classification, if the LLM call failed

Scope and limitations​

Trace export currently covers:

  • OTLP/HTTP with protobuf encoding
  • Admin-configured export to a single OTLP endpoint
  • Attribute filtering and internal span exclusion before export

The following are not currently supported:

  • OpenTelemetry logs or metrics
  • Historical bulk export or backfill
  • SIEM-specific export formats
  • Delivery durability guarantees

See also​