Aller au contenu

Cette page n'est pas encore traduite. Elle s'affiche en anglais.

OpenTelemetry providers

Send Elide telemetry to an OTLP collector, Sentry, Datadog, PostHog, Honeycomb, or Grafana Cloud: which signals each accepts, its credential variable, endpoint, and a setup recipe.

Sur cette page

A provider is a preset for one destination: it fills in the endpoint, the authentication header, and the signals and protocols the service accepts. Every provider is reached over OTLP.

ProviderSent by defaultSent when listedProtocolsCredential variable
otlptraces, metrics, logs; profiles when on—allnone; use headerEnv
sentrytraces, logs—http/protobufSENTRY_DSN
datadogmetrics, logstraceshttp/protobuf; http/json except logsDD_API_KEY
posthoglogstraceshttp/protobufPOSTHOG_PROJECT_TOKEN
honeycombtraces, metrics, logs—allHONEYCOMB_API_KEY
grafanatraces, metrics, logs—http/protobufGRAFANA_CLOUD_OTLP_CREDENTIAL

Default signals are sent unless the destination lists signals. The others are sent only when named in signals (or ELIDE_OTEL_SIGNALS). “all” is grpc, http/protobuf, and http/json. Errors travel inside traces, logs, and metrics, so every provider receives them; see Errors.

Asking a provider for a signal or protocol it does not accept, or leaving its credential variable unset, leaves telemetry off for the run with a warning; see Configuration errors. Credential values never appear in logs or errors.

Pick a provider at run time

ELIDE_OTEL_PROVIDER adds one destination for a provider, with ELIDE_OTEL_REGION and ELIDE_OTEL_SIGNALS for its options:

ELIDE_OTEL_PROVIDER=honeycomb HONEYCOMB_API_KEY=... elide serve app.ts

The --otel-provider= flag does the same for one command. Use elide.pkl to keep the choice with the project, or to send to several providers at once.

OTLP collector or agent

Any OTLP receiver: the OpenTelemetry Collector, Grafana Alloy, a vendor agent, or a backend with an OTLP endpoint.

OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 elide serve app.ts
opentelemetry {
  destinations {
    ["collector"] {
      endpoint = "https://otel.example.com"
      protocol = "grpc"
      headerEnv { ["authorization"] = "OTEL_COLLECTOR_AUTH" }
    }
  }
}
SettingValue
Default endpointhttp://localhost:4318; http://localhost:4317 with grpc
HTTP paths/v1/traces, /v1/metrics, /v1/logs, /v1development/profiles, appended to endpoint
gRPCendpoint used as given, with http:// (plaintext) or https://
Authenticationheaders, headerEnv, or OTEL_EXPORTER_OTLP_HEADERS

Only otlp destinations take profiles, once profiles are turned on; see Profiles.

Sentry

Traces and logs, with the project’s DSN:

ELIDE_OTEL_PROVIDER=sentry SENTRY_DSN=https://<key>@o123.ingest.us.sentry.io/456 elide serve app.ts
opentelemetry {
  destinations {
    ["sentry"] { provider = "sentry"; dsn = "SENTRY_DSN" }
  }
}
SettingValue
Credentialdsn names the variable; default SENTRY_DSN
EndpointFrom the DSN: https://<host>/api/<project>/integration/otlp/v1/{traces,logs}
Headerx-sentry-auth: sentry sentry_key=<key>
Signalstraces, logs

Uncaught errors reach Sentry as exception log records and as exception events on the failing span.

Datadog

Metrics and logs by default, through Datadog’s agentless OTLP intake:

ELIDE_OTEL_PROVIDER=datadog ELIDE_OTEL_REGION=us5 DD_API_KEY=... elide serve app.ts
opentelemetry {
  destinations {
    ["datadog"] {
      provider = "datadog"
      site = "us5"
      signals { "metrics"; "logs"; "traces" }
    }
  }
}
SettingValue
Credentialcredential names the variable; default DD_API_KEY. Sent as dd-api-key.
Sitesite, then DD_SITE, then datadoghq.com
Endpointhttps://otlp.<site>/v1/{traces,metrics,logs}
Signalsmetrics and logs by default; traces when listed
TemporalityMetrics are sent as delta. Setting cumulative with Datadog is an error.
siteHost
us1, usdatadoghq.com
us3us3.datadoghq.com
us5us5.datadoghq.com
eu, eu1datadoghq.eu
ap1ap1.datadoghq.com
ap2ap2.datadoghq.com
gov, us1-fedddog-gov.com
any domainused as given, e.g. datadoghq.com

Traces are opt-in because Datadog’s agentless trace intake must be enabled for your organization. With a Datadog Agent running locally, use an otlp destination pointed at the Agent’s OTLP receiver instead.

PostHog

Logs by default; traces when listed:

ELIDE_OTEL_PROVIDER=posthog POSTHOG_PROJECT_TOKEN=phc_... elide serve app.ts
opentelemetry {
  destinations {
    ["posthog"] { provider = "posthog"; region = "eu"; signals { "logs"; "traces" } }
  }
}
SettingValue
Credentialcredential names the variable; default POSTHOG_PROJECT_TOKEN. Sent as Authorization: Bearer.
Regionus (default) or eu
Endpointhttps://<region>.i.posthog.com/i/v1/{traces,logs}
Signalslogs by default; traces when listed

Honeycomb

Traces, metrics, and logs:

ELIDE_OTEL_PROVIDER=honeycomb HONEYCOMB_API_KEY=... elide serve app.ts
opentelemetry {
  service { name = "checkout" }
  destinations {
    ["honeycomb"] { provider = "honeycomb"; region = "eu"; protocol = "grpc" }
  }
}
SettingValue
Credentialcredential names the variable; default HONEYCOMB_API_KEY. Sent as x-honeycomb-team.
Regionus (api.honeycomb.io, default) or eu (api.eu1.honeycomb.io)
Endpointhttps://<host>/v1/{traces,metrics,logs}; <host>:443 with grpc
Signalstraces, metrics, logs

Honeycomb names datasets after service.name; set it, or data lands in unknown_service:elide.

Grafana Cloud

Traces, metrics, and logs through the stack’s OTLP gateway. The credential is <instance id>:<token> from the stack’s OpenTelemetry connection page:

ELIDE_OTEL_PROVIDER=grafana ELIDE_OTEL_REGION=prod-us-east-0 \
GRAFANA_CLOUD_OTLP_CREDENTIAL=123456:glc_... elide serve app.ts
opentelemetry {
  destinations {
    ["grafana"] { provider = "grafana"; region = "prod-us-east-0" }
  }
}
SettingValue
Credentialcredential names the variable; default GRAFANA_CLOUD_OTLP_CREDENTIAL. Sent as HTTP basic auth.
RegionRequired unless endpoint is set: the stack’s zone, such as prod-us-east-0 or prod-eu-west-2
Endpointhttps://otlp-gateway-<zone>.grafana.net/otlp/v1/{traces,metrics,logs}
Signalstraces, metrics, logs

Samples

Cette page vous a-t-elle aidé ?