open-telemetry / opentelemetry-collector-releases

OpenTelemetry Collector Official Releases
https://opentelemetry.io
Apache License 2.0
242 stars 158 forks source link

Openshift operator 'exporters': unknown type: "loki" #512

Closed alexlionnel closed 6 months ago

alexlionnel commented 6 months ago

I am using Openhift 4.12, and i have installed an operator Red Hat build of OpenTelemetry 0.93.0-3 provided by Red Hat. I created a resource of type OpenTelemetryCollector

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: otel
  namespace: openshift-opentelemetry-operator
spec:
  observability:
    metrics: {}
  deploymentUpdateStrategy: {}
  config: |
    extensions:
      health_check:
      pprof:
        endpoint: 0.0.0.0:1777
      zpages:
        endpoint: 0.0.0.0:55679

    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: 0.0.0.0:4317
          http:
            endpoint: 0.0.0.0:4318

      opencensus:
        endpoint: 0.0.0.0:55678

      # Collect own metrics
      prometheus:
        config:
          scrape_configs:
            - job_name: 'otel-collector'
              scrape_interval: 10s
              static_configs:
                - targets: [ '0.0.0.0:8888' ]

      jaeger:
        protocols:
          grpc:
            endpoint: 0.0.0.0:14250
          thrift_binary:
            endpoint: 0.0.0.0:6832
          thrift_compact:
            endpoint: 0.0.0.0:6831
          thrift_http:
            endpoint: 0.0.0.0:14268

      zipkin:
        endpoint: 0.0.0.0:9411

    processors:
      batch:

    exporters:
      debug:
        verbosity: detailed
      loki:
        endpoint: "http://<HOSTNAME>:3100/loki/api/v1/push"
        tls:
          insecure: true
        default_labels_enabled:
          exporter: true
          job: true

    service:

      pipelines:

        traces:
          receivers: [ otlp, opencensus, jaeger, zipkin ]
          processors: [ batch ]
          exporters: [ debug ]

        metrics:
          receivers: [ otlp, opencensus, prometheus ]
          processors: [ batch ]
          exporters: [ debug ]

        logs:
          receivers: [ otlp ]
          processors: [ batch ]
          exporters: [ loki ]

      extensions: [ health_check, pprof, zpages ]

But i got this error on the pod otel-collector

* error decoding 'exporters': unknown type: "loki" for id: "loki" (valid values: [prometheus kafka awscloudwatchlogs debug logging otlp otlphttp])
TylerHelmuth commented 6 months ago

Please repo this issue over at https://github.com/os-observability/redhat-opentelemetry-collector as that distribution builds their own version of the collector.

The problem is that their collector doesnt include a lokiexporter

jpkrohling commented 6 months ago

cc @frzifus , @pavolloffay

alexlionnel commented 6 months ago

I solved the issue by using a specific image tag

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: otel
  namespace: openshift-opentelemetry-operator
spec:
  image: 'otel/opentelemetry-collector-contrib:0.93.0'
  ...
frzifus commented 6 months ago

Hi @alexlionnel, als tyler mentioned you are using another distro.

Lets continue here: