Browse documentation

Reference

Configuration

Common SDK and OpenTelemetry settings, defaults, and production guidance.

Prefer environment variables for credentials and deployment-specific values. Use SDK options for settings that are part of application behavior.

Common settings

Setting Environment variable Typical value
API key TEML_API_KEY tm_...
Service name OTEL_SERVICE_NAME orders-api
Service version OTEL_SERVICE_VERSION release tag or commit SHA
Environment TEML_ENVIRONMENT production, staging, development
Endpoint TEML_ENDPOINT https://api.teml.io
Debug output TEML_DEBUG false in normal production use

The JavaScript, Python, and Go SDKs also accept these values through their constructors or options.

Service naming

Use the same stable service.name for every instance of one deployable application. Put pod, host, or instance identity in resource attributes rather than changing the service name.

Set a version on every deploy. This is required for reliable release comparison and symbolication.

Environments

Use a small consistent set such as production, staging, and development. prod and production are different values and create separate views.

Sampling

Begin with default sampling. Increase it temporarily when validating setup or reproducing a rare problem. Errors should remain captured even when ordinary trace sampling is reduced.

Sampling decisions affect the evidence available to customer timelines and Customer Detective. Do not lower sampling before measuring whether critical journeys still retain enough connected traces.

Batching and shutdown

Defaults are suitable for most applications. Tune batch size, queue size, and export timeout only after observing memory or delivery problems. Short-lived jobs must flush or stop the SDK before the process exits.

Secrets

  • Store API keys in your deployment secret manager.
  • Use a project-scoped key with ingest:write for OTLP telemetry and errors.
  • Add analytics:write when the SDK calls identify, group, screen, or diagnostic-event methods.
  • Add replay:write only to browser integrations that record session replay.
  • Never ship management, MCP-write, administrator, or unrelated read scopes in browser or mobile builds. Client-side flag evaluation is the explicit exception: it needs flags:read, so flag configuration and payloads must contain no secrets.
  • Rotate keys independently by application and environment.

Debugging

Enable SDK debug output only while troubleshooting. It can be verbose and should not become part of normal application logging. After changing configuration, follow Verify your setup.