Pramod Biligiri
Pramod Biligiri

Reputation: 365

How to start OpenTelemetry GRPC collector without TLS?

How do I launch the OpenTelemetry Collector with GRPC, but without TLS. This is for local development where I don't want TLS.

Currently I'm using a config.yaml snippet like the below:

extensions:
  health_check:
  pprof:
  zpages:

receivers:
  otlp:
    protocols:
      grpc:
      http:

processors:
  batch:

exporters:
  logging:
    loglevel: debug

service:
  extensions: [health_check, pprof, zpages]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging]
  telemetry:
    logs:
      level: "debug"

Is something missing here, because I keep seeing error message as follows when I try to connect an exporter to it:

transport: http2Server.HandleStreams received bogus greeting from client: \"\\x16\\x03\\x01\\x01o\\x01\\x00\\x01k\\x03\\x03͙\\x19n\\xf1\\xa0k\\x18=>t\\x8a\\r\""

Upvotes: 1

Views: 3070

Answers (1)

Brett McBride
Brett McBride

Reputation: 622

TLS configuration for the OpenTelemetry collector can be added under the tls key of an exporter or receiver. Be default, TLS is enabled.

In your example, if you want to be able to send non-TLS telemetry data to the collector, you should update your receiver configuration to disable TLS:

receivers:
  otlp:
    protocols:
      grpc:
        tls:
          insecure: true
      http:
        tls:
          insecure: true

Reference: https://github.com/open-telemetry/opentelemetry-collector/blob/v0.82.0/config/configtls/README.md#tls--mtls-configuration

Upvotes: 0

Related Questions