Skip to main content
Droid can export OpenTelemetry (OTEL) metrics to your own OTLP-compatible collector, giving you full visibility into Droid activity within your existing observability stack. Metrics are sent to both Factory’s collector and yours in the same export cycle — if your collector is unreachable, Factory’s own export is not affected.

Configuration

Set these environment variables before launching Droid:
export OTEL_TELEMETRY_ENDPOINT="https://your-collector.example.com:4318"
export OTEL_TELEMETRY_HEADERS="Authorization=Bearer <your-token>"
VariableRequiredDescription
OTEL_TELEMETRY_ENDPOINTYesBase URL of your OTLP HTTP collector. Metrics are sent to {endpoint}/v1/metrics.
OTEL_TELEMETRY_HEADERSNoComma-separated key=value pairs sent as HTTP headers on every export. Values may contain = (e.g. base64 tokens).

How it works

  • When OTEL_TELEMETRY_ENDPOINT is set, metrics are sent to your endpoint in the same export cycle via a fan-out exporter — no extra timers, no duplication of metric readers.
  • Failures to your collector do not affect Factory’s own export. Each endpoint is isolated.
  • Metrics use delta temporality — each export contains only new values since the last flush (60-second intervals).

Exported metrics

All metrics use the droid.* namespace.
MetricTypeDescription
droid.code.files_modifiedCounterFiles modified during a session
droid.code.files_readCounterFiles read during a session
droid.code.lines_modifiedCounterLines of code modified
droid.git.commitsCounterCommits created
droid.git.pull_requestsCounterPull requests created
droid.tool.invocationsCounterTool invocations
droid.tool.execution_timeHistogramTool execution duration (ms)
droid.mcp.tool_invocationsCounterMCP tool invocations
droid.skill.invocationsCounterSkill invocations
droid.hook.invocationsCounterHook invocations
droid.slash_command.invocationsCounterSlash command invocations
droid.auth.login_successCounterSuccessful logins
droid.repo.metadataGaugeRepository metadata snapshot

Common attributes

Every data point includes these attributes automatically:
AttributeDescription
user.idAuthenticated user ID
organization.idOrganization ID
session.idCurrent Droid session ID
Tool-specific attributes (tool.name, mcp.server, skill.name, etc.) are included where applicable. Resource attributes include service.name (cli) and service.version.

Example configurations

export OTEL_TELEMETRY_ENDPOINT="https://collector.example.com:4318"
export OTEL_TELEMETRY_ENDPOINT="http://localhost:4318"
export OTEL_TELEMETRY_ENDPOINT="https://otlp.datadoghq.com"
export OTEL_TELEMETRY_HEADERS="dd-api-key=<your-datadog-api-key>"
export OTEL_TELEMETRY_ENDPOINT="https://otlp.nr-data.net:4318"
export OTEL_TELEMETRY_HEADERS="api-key=<your-new-relic-license-key>"
export OTEL_TELEMETRY_ENDPOINT="https://api.honeycomb.io"
export OTEL_TELEMETRY_HEADERS="x-honeycomb-team=<your-api-key>,x-honeycomb-dataset=droid-metrics"

Troubleshooting

  • Verify your collector accepts OTLP HTTP on the /v1/metrics path.
  • Confirm OTEL_TELEMETRY_HEADERS includes valid auth credentials.
  • Ensure network connectivity from the machine running Droid to your collector.