open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.92k stars 2.29k forks source link

Parsing Spanmetrics Connector config failed #20450

Closed Owenxh closed 1 year ago

Owenxh commented 1 year ago

Component(s)

connector/spanmetrics

What happened?

Description

An error occurred when starting the OTel collector. The log of the OTel collector told me that decode connectors failed because of the unknown type: "spanmetrics" for id: "spanmetrics"

Collector version

v0.74.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      grpc:
      http:
        cors:
          allowed_origins:
            - http://*
            - https://*
  jaeger:
    protocols:
      grpc:
        endpoint: 0.0.0.0:14250
  opencensus:
  zipkin:

processors:
  probabilistic_sampler:
    hash_seed: 22
    sampling_percentage: 15.3
  memory_limiter:
    check_interval: 1s
    limit_percentage: 75
    spike_limit_percentage: 15
  batch:
    timeout: 10s
    send_batch_size: 100

exporters:
  logging:
  otlp:
    endpoint: "0.0.0.0:4317"
    tls:
      insecure: true
  prometheus:
    endpoint: "0.0.0.0:8889"
    metric_expiration: 1m
    send_timestamps: true
    # resource_to_telemetry_conversion:
  jaeger:
    endpoint: global-jaeger-collector.jaeger:14250
    tls:
      insecure: true

connectors:
  spanmetrics:
    histogram:
      explicit:
        buckets: [100us, 1ms, 2ms, 6ms, 10ms, 100ms, 250ms]
    dimensions:
      - name: http.method
        default: GET
      - name: http.status_code
    dimensions_cache_size: 1000
    aggregation_temporality: "AGGREGATION_TEMPORALITY_CUMULATIVE"

service:
  extensions:
  pipelines:
    traces:
      receivers: [otlp, opencensus, zipkin]
      processors: [memory_limiter, probabilistic_sampler, batch]
      exporters: [jaeger]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [prometheus]

Log output

Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
* error decoding 'connectors': unknown type: "spanmetrics" for id: "spanmetrics" (valid values: [forward])
2023/03/29 09:49:23 collector server run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
* error decoding 'connectors': unknown type: "spanmetrics" for id: "spanmetrics" (valid values: [forward])

Additional context

No response

github-actions[bot] commented 1 year ago

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

fatsheep9146 commented 1 year ago

which collector image do you use? you shoud use otel/opentelemetry-collector-contrib:v0.74.0

Owenxh commented 1 year ago

@fatsheep9146 I use ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-amd64

fatsheep9146 commented 1 year ago

The image you used does not contain spanmetrics connector. otel/opentelemetry-collector-contrib:v0.74.0 is the latest released image which contain spanmetrics

Owenxh commented 1 year ago

@fatsheep9146 Thank you.