Observability
Synapse is instrumented with OpenTelemetry metrics and traces. To obtain the data via OTLP, configure the exporters using OpenTelemetry environment variables.
Metrics
| Environment variable | Description |
|---|---|
|
Address of the OTLP metrics receiver (for example: |
|
Skip validating the TLS certificate of the endpoint |
|
Path to the certificate to use for validating the server’s TLS credentials. |
|
Path to the client certificate to use for mTLS |
|
Path to the client key to use for mTLS |
|
OTLP protocol. Supported values are |
|
The export interval in milliseconds. Defaults to 60000. |
|
Timeout for exporting the data in milliseconds. Defaults to 30000. |
|
Set to |
Refer to https://opentelemetry.io/docs/specs/otel/protocol/exporter/ for more information about exporter configuration through environment variables. Note that the OpenTelemetry Go SDK used by Synapse might not have full support for some of the environment variables listed on the OpenTelemetry specification.
OTEL_METRICS_EXPORTER and OTEL_EXPORTER_OTLP_METRICS_ENDPOINT are the only required environment variables to enable OTLP metrics.
|
Traces
| Environment variable | Description |
|---|---|
|
Service name reported in the traces. Defaults to |
|
Set to |
|
Trace sampler. Defaults to
|
|
Set the sampling ratio when |
|
Address of the OTLP collector (for example: |
|
Skip validating the TLS certificate of the endpoint |
|
Path to the certificate to use for validating the server’s TLS credentials. |
|
Path to the client certificate to use for mTLS |
|
Path to the client key to use for mTLS |
|
OTLP protocol. Supported values are |
Refer to https://opentelemetry.io/docs/specs/otel/protocol/exporter/ for more information about exporter configuration through environment variables. Note that the OpenTelemetry Go SDK used by Synapse might not have full support for some of the environment variables listed on the OpenTelemetry specification.
OTEL_TRACES_EXPORTER and OTEL_EXPORTER_OTLP_TRACES_ENDPOINT are the only required environment variables to enable OTLP trace exports.
|
Remote span context
By default, Synapse does not trust the trace context of incoming API requests. Spans that Synapse creates for a request are linked to the caller’s span instead of becoming its children. Synapse applies its own sampler to these spans rather than following the caller’s sampling decision.
When the caller is a trusted component, such as an Envoy proxy in the same deployment, set server.trace.trustRemoteSpans to true. Synapse spans then become children of the caller’s span, and the request appears as a single trace.
server:
trace:
trustRemoteSpans: true