Skip to content

Observability

All OTEL_* settings are inert until telemetry is enabled. When it is off, the OpenTelemetry SDK is not started.

  • Type: boolean string
  • Default: false
  • Use: Master switch for OpenTelemetry.
  • Example: OTEL_ENABLED=true
  • Type: string
  • Default: discord-mcp
  • Use: Sets the service.name resource attribute.
  • Example: OTEL_SERVICE_NAME=discord-mcp-prod
  • Type: string
  • Default: the installed package version
  • Use: Sets the service.version resource attribute for rolling deploys.
  • Example: OTEL_SERVICE_VERSION=1.2.3-canary
  • Type: URL
  • Default: unset
  • Use: OTLP HTTP collector endpoint. The runtime appends /v1/traces and /v1/metrics.
  • Example: OTEL_EXPORTER_OTLP_ENDPOINT=https://api.honeycomb.io
  • Type: enum
  • Allowed: http/protobuf, http/json, grpc
  • Default: http/protobuf
  • Runtime status: parsed by configuration but currently ignored. The server always constructs the HTTP/protobuf trace and metric exporters; http/json and grpc do not change transport behavior yet.
  • Type: comma-separated key=value pairs
  • Default: unset
  • Use: Adds headers to each OTLP export, commonly backend authentication.
  • Example: OTEL_EXPORTER_OTLP_HEADERS=x-honeycomb-team=your-api-key,env=prod
  • Type: boolean string
  • Default: false
  • Use: Do not enable for a stdio MCP server. The current exporter writes through console.dir to stdout, replaces OTLP trace export, and can corrupt JSON-RPC framing. Use an OTLP collector instead.
  • Safe alternative: configure OTEL_EXPORTER_OTLP_ENDPOINT and leave this false.
  • Type: enum
  • Allowed: always_on, always_off, traceidratio, parentbased_always_on, parentbased_always_off, parentbased_traceidratio
  • Default: parentbased_always_on
  • Use: Chooses how traces are sampled. parentbased_* preserves upstream sampling decisions.
  • Type: number from 0 to 1
  • Default: 1
  • Use: Sampling ratio for traceidratio and parentbased_traceidratio; 0.1 records 10% of traces.
  • Example: OTEL_TRACES_SAMPLER_ARG=0.05