Skip to content

[logs] rm duplicated exposed metrics endpoints#844

Merged
timojohlo merged 3 commits intomainfrom
timo/fix-internal-telemetry
May 7, 2025
Merged

[logs] rm duplicated exposed metrics endpoints#844
timojohlo merged 3 commits intomainfrom
timo/fix-internal-telemetry

Conversation

@timojohlo
Copy link
Member

@timojohlo timojohlo commented May 6, 2025

Pull Request Details

The metrics are align with the default values for metrics. By removing the section we ensure the exposing does not happen twice. This behavior can be tested locally with:

  • Created a kind cluster
  • Installed cert-manager
  • Installed the 0.79.0 version of the helm chart for the operator: helm upgrade --install otel-operator open-- telemetry/opentelemetry-operator --version 0.79.0 --set manager.collectorImage.repository=otel/opentelemetry-collector-contrib
  • Created an OpenTelemetry Collector instance:
    apiVersion: opentelemetry.io/v1alpha1
    kind: OpenTelemetryCollector
    metadata:
      name: test
    spec:
      mode: deployment
      config: |
        receivers:
          otlp:
            protocols:
              grpc: {}
              http: {}
    
        processors:
    
        exporters:
          debug: {}
    
        extensions:
    
        service:
          pipelines:
            metrics:
              receivers: [otlp]
              processors: []
              exporters: [debug]
    
    • The config is applied properly:
        telemetry:
          metrics:
            address: 0.0.0.0:8888
  • If we change the config with the new metrics settings:
      telemetry:
        metrics:
          readers:
          - pull:
              exporter:
                prometheus:
                  host: 0.0.0.0
                  port: 8888
  • ...And upgrade the operator with helm upgrade --install otel-operator open-telemetry/opentelemetry-operator --version 0.86.1 --set manager.collectorImage.repository=otel/opentelemetry-collector-contrib, the metrics settings will be applied twice for the config, leading to a CrashLoop of the respective pod.
      telemetry:
        metrics:
          readers:
          - pull:
              exporter:
                prometheus:
                  host: 0.0.0.0
                  port: 8888
          - pull:
              exporter:
                prometheus:
                  host: 0.0.0.0
                  port: 8888

@timojohlo timojohlo requested a review from a team as a code owner May 6, 2025 16:11
@timojohlo timojohlo merged commit aefb95a into main May 7, 2025
6 checks passed
@timojohlo timojohlo deleted the timo/fix-internal-telemetry branch May 7, 2025 08:19
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.

3 participants