Observability

sxs provides built-in metrics, request logs and traces through Confy, without requiring an external observability backend. OpenTelemetry export is optional and additive.

Confy is a read-only telemetry viewer. It displays telemetry produced by sxs, lxs and wxs; it does not emit telemetry or receive OTLP traffic.

Signals

SignalBuilt-in storageConfy view
Metricsevent_loop_metrics, request logs, ClickHouse statisticsDashboards and status pages
LogsPer-space logs collectionsxs request history and detail
TracesPer-space telemetry_spans and telemetry_tracesTraces tab
Worker jobsPer-space worker_jobsWorker jobs tab
IngestionsShared ingestions collectionIngestions page (above Jobs)

Built-in traces

Trace collection is enabled by default:

TELEMETRY_ENABLED=true
TELEMETRY_TRACES_ENABLED=true
TELEMETRY_TRACE_RETENTION_DAYS=7

Traces are stored per member/space and retained for seven days by default. They include:

  • HTTP request roots;
  • observation classification and counting;
  • ClickHouse queries;
  • SDMX data building;
  • local and remote worker execution;
  • asynchronous exports;
  • Mongo and AMQP spans from automatic instrumentation.

Request logs include traceId and spanId. Worker jobs include traceId as well.

Trace status follows the request result: successful 2xx/3xx responses are OK, client-error 4xx responses remain UNSET, and 5xx responses or unhandled exceptions are ERROR. UNSET is the OpenTelemetry default and does not mean a trace is incomplete.

Sampling

The default sampler is parent-based trace-ID ratio sampling at 10%:

OTEL_TRACES_SAMPLER=parentbased_traceidratio
OTEL_TRACES_SAMPLER_ARG=0.1

Use 1.0 in staging or development when full traces are needed.

OpenTelemetry export

External export is disabled unless an OTLP endpoint is configured:

OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_TRACES_EXPORTER=otlp
OTEL_METRICS_EXPORTER=otlp
OTEL_LOGS_EXPORTER=otlp

The standard OTEL_RESOURCE_ATTRIBUTES, OTEL_EXPORTER_OTLP_HEADERS and OTEL_SERVICE_NAME variables are supported.

Telemetry is fail-open: an unavailable collector or storage failure never affects request handling.

Use OTEL_SDK_DISABLED=true to disable all OpenTelemetry telemetry, including built-in Confy traces.

Configuration

VariableDefaultDescription
TELEMETRY_ENABLEDtrueEnable built-in telemetry
TELEMETRY_TRACES_ENABLEDtrueStore traces for Confy
TELEMETRY_TRACE_RETENTION_DAYS7Trace TTL
TELEMETRY_MAX_SPANS_PER_TRACE200Span limit per trace
TELEMETRY_MAX_ATTRIBUTE_LENGTH1024Attribute truncation limit
TELEMETRY_CAPTURE_SQLfalseCapture SQL attributes
OTEL_SDK_DISABLEDfalseDisable all OTel telemetry
OTEL_SERVICE_NAMESERVICE_NAMEService name
OTEL_EXPORTER_OTLP_ENDPOINTunsetOTLP collector endpoint
OTEL_EXPORTER_OTLP_PROTOCOLhttp/protobufOTLP protocol
OTEL_TRACES_SAMPLERparentbased_traceidratioTrace sampler
OTEL_TRACES_SAMPLER_ARG0.1Sampling ratio

See Configuration and settings for the complete settings reference.

Privacy

By default, sxs does not export:

  • authorization headers;
  • API keys;
  • cookies;
  • passwords or tokens;
  • full SQL/query statements.

Attribute values are truncated to TELEMETRY_MAX_ATTRIBUTE_LENGTH.