Skip to main content
Devin CLI can send session metrics and structured agent events to an OpenTelemetry (OTLP) collector you configure. Metrics use the OTLP metrics signal; events use the OTLP logs signal. Use your metrics and logs backend to track adoption, token usage, code changes, tool decisions, and request latency. Export is opt-in: it requires an endpoint in the otel block of your user configuration file.

Quick start

Add an OTLP/HTTP collector base URL to ~/.config/devin/config.json (on Windows, %APPDATA%\devin\config.json):
Then start devin. The CLI sends logs to http://localhost:4318/v1/logs and metrics to http://localhost:4318/v1/metrics. Check your backend for devin.session.count after starting a session; submit a prompt and look for a log event with event.name=user_prompt to verify the logs signal. Log batches export every 5 seconds and metrics every 60 seconds by default; both are also flushed when the session ends. To authenticate to a collector, set headers in the same block or use OTEL_EXPORTER_OTLP_HEADERS in the process environment. Keep credentials out of shared project configuration:

Configure destinations and exporters

The otel block accepts these settings in the user configuration file: For separate backends or a logs-only SIEM, specify full URLs and credentials per signal:
Remove either signal-specific endpoint to export only the other signal. If endpoint is set, both signals have a destination; a signal-specific endpoint replaces only that signal’s destination.

Environment overrides

The CLI supports these OTLP environment variables for each signal: An environment variable does not activate export by itself: otel.endpoint, otel.logs_endpoint, or otel.metrics_endpoint must already be set in the user configuration and otel.enabled must not be false. Once activated, the endpoint used for a given signal is resolved in this order: signal-specific environment variable, shared environment variable, signal-specific setting, shared setting. A signal-specific environment URL must include its complete /v1/logs or /v1/metrics path. Timeouts use the same precedence (signal-specific environment variable, shared environment variable, timeout_ms, default). Per-signal settings headers overlay shared settings headers, and environment headers overlay both, matched case-insensitively by header name. A signal-specific environment headers variable replaces the shared environment headers variable as a whole rather than combining with it. For example:
Export requests use the CLI’s proxy configuration and run in the background. A failed collector does not block the interactive agent; pending exports get a short flush window when the CLI exits.

Security and privacy

Prompt text (prompt), assistant response text (response), and tool arguments (tool_input) are exported by default. Tool error text can also be included. Tools may contain file paths, shell commands, URLs, or sensitive values, so configure your collector and access controls accordingly. To omit prompt and assistant text and tool arguments/errors, set:
You can also set OTEL_LOG_USER_PROMPTS=0 or OTEL_LOG_TOOL_DETAILS=0 (the value false also works). These environment flags can disable content, but cannot override a disable_* setting to re-enable it. When disabled, the content attributes are absent, not redacted placeholders. Prompt/response lengths, tool input/result sizes, tool names, usage counters, and error categories can still be exported; api_error.error can contain an error message. Resource attributes include service.name=devin-local, service.version, os.type, host.arch, and, when available, os.version and the authenticated Devin user.id. Custom resource_attributes are added to the resource but not to each metric data point; they cannot override the built-in identity keys. Add team or cost-center labels there to segment data by resource in a backend that supports resource-aware queries. Avoid high-cardinality values in custom labels.

Metrics

The meter scope is ai.devin.local. Counters use delta temporality; if your backend requires cumulative counters, convert them in your collector. Every metric data point has session.id, terminal.type, and user.id when available. terminal.type describes the host surface (for example, cli or vscode). These counters describe observed agent activity, not a billing statement. Commit and PR counters detect supported successful tool calls, not every out-of-band VCS change. For usage dashboards, group devin.token.usage by model and type, devin.session.count by user/team, and code-activity counters by session. Alert on unusual token volume or api_error events; a backend or SIEM must implement alerting and aggregation. Use stable team.id or cost_center resource attributes for team reporting; derive productivity or ROI estimates in your backend rather than treating these counters as billing data.

Events

The log instrumentation scope is ai.devin.local.events. Each OTLP log record carries event.name, event.timestamp, event.sequence, session.id, terminal.type, and optional user.id; the name is also the log body. A user_prompt has a prompt.id that correlates the following request, tool, and response events for that turn. tool_use_id links tool_decision and tool_result. Use the success, duration, and size attributes on tool_result to analyze tool usage and latency; correlate with tool_decision to audit allow/deny outcomes. source on a decision distinguishes config, user_temporary, user_reject, and user_abort where known. It does not always distinguish a hook approval from a user approval. For auditing, forward the logs signal to an OTLP-capable SIEM or collector and correlate events by session.id, prompt.id, and tool_use_id.

Troubleshooting

If no telemetry arrives:
  1. Confirm that otel.enabled is not false and an endpoint is present in the user config; environment variables alone do not activate export.
  2. Check the collector’s /v1/logs and /v1/metrics URLs. Signal-specific endpoints are complete URLs, whereas shared endpoints are base URLs.
  3. Check collector authentication, network access, and the CLI’s proxy configuration. A failed export logs an error but does not interrupt the session.
  4. Wait for the export intervals or end the session to flush pending data, then run devin doctor for unsupported exporter variables. devin doctor lists variable names (never credential values) but does not validate collector connectivity.

Limitations

  • Devin CLI exports logs and metrics over OTLP/HTTP protobuf by default. Set OTEL_EXPORTER_OTLP_PROTOCOL (or a signal-specific override) to http/json for OTLP/HTTP JSON or grpc for OTLP/gRPC. With grpc, use your collector’s gRPC endpoint (typically port 4317); the /v1/logs and /v1/metrics paths are not appended. Other values warn and leave HTTP/protobuf export in place. Console, Prometheus, and traces are not supported.
  • There are no OTEL_LOGS_EXPORTER or OTEL_METRICS_EXPORTER selectors. OTEL_EXPORTER_OTLP_TRACES_*, compression, certificate, and other exporter options are not supported. The OTEL_METRIC_EXPORT_INTERVAL, OTEL_LOGS_EXPORT_INTERVAL, and OTEL_RESOURCE_ATTRIBUTES environment variables are not read; configure intervals and custom resource attributes in the otel block instead.