opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Configuration file error

Open yzcyayaya opened this issue 3 years ago • 5 comments

Description

Configuration file error

Environment

  • OS: [e.g. iOS] ubuntu20
  • Architecture: [e.g. x86, i386] x86
  • Go Version: [e.g. 1.15] 1.18
  • opentelemetry-go version: [e.g. v0.14.0, 3c7face] 0.54.0

Steps To Reproduce

  1. Use the configuration
extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679
  jaeger_grpc:
    endpoint: "10.29.8.64:14250"
  jaeger_thrift_http:
    endpoint: "http://10.29.8.64:14268/api/traces"
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"
      http:

  opencensus:

  # 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:
      thrift_binary:
      thrift_compact:
      thrift_http:

  zipkin:

processors:
  batch:

exporters:
  logging:
    logLevel: debug

service:

  pipelines:

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

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

  extensions: [health_check]

  1. Run 'otelcol --config=config.yaml'
  2. See error

cannot unmarshal the configuration: unknown extensions type "jaeger_grpc " (valid values: [memory_ballast health_check pprof zpages]) I tried to address this question with other answers

unknown extensions type "jaeger" for "jaeger" (valid values: [zpages memory_ballast health_check pprof])

Expected behavior

I want it to work

yzcyayaya avatar Aug 06 '22 17:08 yzcyayaya

what version do you use for otelcol

fatsheep9146 avatar Aug 07 '22 01:08 fatsheep9146

what version do you use for otelcol m2@m2:otelcol$ otelcol --version otelcol version 0.54.0

yzcyayaya avatar Aug 07 '22 02:08 yzcyayaya

jaeger_grpc

I do not find any extension of type jaeger_grpc, where do you find this?

fatsheep9146 avatar Aug 07 '22 04:08 fatsheep9146

jaeger_grpc

I do not find any extension of type jaeger_grpc, where do you find this?

I tried to modify writing jaeger_grpc as jaeger But it still

yzcyayaya avatar Aug 08 '22 02:08 yzcyayaya

you should put jaeger to exporters , there is no extension of type jaeger.

you can check the doc https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/jaegerexporter

fatsheep9146 avatar Aug 08 '22 04:08 fatsheep9146

jaeger_grpc

extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679
  jaeger:
    endpoint: "10.29.8.64:14250"
    insecure: true
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"
      http:

  opencensus:

  # 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:
      thrift_binary:
      thrift_compact:
      thrift_http:

  zipkin:

processors:
  batch:

exporters:
  logging:
    logLevel: debug

service:

  pipelines:

    traces:
      receivers: [jaeger]
      processors: [batch]
      exporters: [jaeger]

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

  extensions: [health_check]

Is still an error

Error: failed to get config: cannot unmarshal the configuration: unknown extensions type "jaeger" for "jaeger" (valid values: [health_check pprof zpages memory_ballast]) 2022/08/08 22:35:50 collector server run finished with error: failed to get config: cannot unmarshal the configuration: unknown extensions type "jaeger" for "jaeger" (valid values: [health_check pprof zpages memory_ballast])

yzcyayaya avatar Aug 08 '22 14:08 yzcyayaya

extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679
  jaeger:   # THIS IS THE PROBLEM, WHAT IS THIS?
    endpoint: "10.29.8.64:14250"
    insecure: true

bogdandrutu avatar Aug 09 '22 20:08 bogdandrutu

jaeger_grpc

extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679
  jaeger:
    endpoint: "10.29.8.64:14250"
    insecure: true
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"
      http:

  opencensus:

  # 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:
      thrift_binary:
      thrift_compact:
      thrift_http:

  zipkin:

processors:
  batch:

exporters:
  logging:
    logLevel: debug

service:

  pipelines:

    traces:
      receivers: [jaeger]
      processors: [batch]
      exporters: [jaeger]

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

  extensions: [health_check]

Is still an error

Error: failed to get config: cannot unmarshal the configuration: unknown extensions type "jaeger" for "jaeger" (valid values: [health_check pprof zpages memory_ballast]) 2022/08/08 22:35:50 collector server run finished with error: failed to get config: cannot unmarshal the configuration: unknown extensions type "jaeger" for "jaeger" (valid values: [health_check pprof zpages memory_ballast])

I mean the jaeger component should be put in exporters or receivers section, but not extensions.

for example

extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679

exporters:
  logging:
    logLevel: debug
  jaeger:   
    endpoint: "10.29.8.64:14250"
    tls:
      insecure: true

fatsheep9146 avatar Aug 10 '22 01:08 fatsheep9146

jaeger_grpc

extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679
  jaeger:
    endpoint: "10.29.8.64:14250"
    insecure: true
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"
      http:

  opencensus:

  # 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:
      thrift_binary:
      thrift_compact:
      thrift_http:

  zipkin:

processors:
  batch:

exporters:
  logging:
    logLevel: debug

service:

  pipelines:

    traces:
      receivers: [jaeger]
      processors: [batch]
      exporters: [jaeger]

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

  extensions: [health_check]

Is still an error Error: failed to get config: cannot unmarshal the configuration: unknown extensions type "jaeger" for "jaeger" (valid values: [health_check pprof zpages memory_ballast]) 2022/08/08 22:35:50 collector server run finished with error: failed to get config: cannot unmarshal the configuration: unknown extensions type "jaeger" for "jaeger" (valid values: [health_check pprof zpages memory_ballast])

I mean the jaeger component should be put in exporters or receivers section, but not extensions.

for example

extensions:
  health_check:
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679

exporters:
  logging:
    logLevel: debug
  jaeger:   
    endpoint: "10.29.8.64:14250"
    tls:
      insecure: true

The issue has been resolved Thank you. It's my problem. I'm sorry to disturb your valuable time

yzcyayaya avatar Aug 10 '22 07:08 yzcyayaya

BTW, the issue could be closed =D

fatsheep9146 avatar Aug 10 '22 07:08 fatsheep9146