Skip to content

fix: skip OTLP export when Spotlight metrics are disabled or unreachable - #477

Open
Sudesh0119 wants to merge 2 commits into
developfrom
fix/observability-skip-otlp-when-spotlight-unavailable
Open

Sudesh0119 wants to merge 2 commits into
developfrom
fix/observability-skip-otlp-when-spotlight-unavailable

Conversation

@Sudesh0119

Copy link
Copy Markdown
Contributor

The IPC broker advertises the spotlight_telemetry port whenever the Spotlight collector sidecar runs, even when OTel metrics are switched off. Splunk Enterprise ships with [spotlight] enable_otlp_metrics = false, so ObservabilityService exported to a port nothing listens on and logged repeated StatusCode.UNAVAILABLE export failures.

Before building the OTLP exporter, ObservabilityService now:

  • reads server.conf and skips OTLP unless [teleport_supervisor] enable_splunk_spotlight, [spotlight] enable_otlp_metrics and [spotlight] enable_otlp_metrics_export are all true (missing keys use the server.conf.spec defaults). This runs before the IPC broker is queried and is skipped when SPOTLIGHT_OTEL_RECEIVER_PORT is set.
  • probes localhost: with a 2 s TLS gRPC connect using the Spotlight certificate, and skips OTLP if the endpoint is not ready.

In both cases one INFO line is logged and the extra exporters keep working.

The IPC broker advertises the spotlight_telemetry port whenever the
Spotlight collector sidecar runs, even when OTel metrics are switched
off. Splunk Enterprise ships with [spotlight] enable_otlp_metrics =
false, so ObservabilityService exported to a port nothing listens on
and logged repeated StatusCode.UNAVAILABLE export failures.

Before building the OTLP exporter, ObservabilityService now:

- reads server.conf and skips OTLP unless
  [teleport_supervisor] enable_splunk_spotlight,
  [spotlight] enable_otlp_metrics and
  [spotlight] enable_otlp_metrics_export are all true (missing keys use
  the server.conf.spec defaults). This runs before the IPC broker is
  queried and is skipped when SPOTLIGHT_OTEL_RECEIVER_PORT is set.
- probes localhost:<port> with a 2 s TLS gRPC connect using the
  Spotlight certificate, and skips OTLP if the endpoint is not ready.

In both cases one INFO line is logged and the extra exporters keep
working.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant