Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown type: "bearertokenauth" #31540

Closed
jinjiaw opened this issue Mar 4, 2024 · 2 comments
Closed

unknown type: "bearertokenauth" #31540

jinjiaw opened this issue Mar 4, 2024 · 2 comments
Labels
bug Something isn't working extension/bearertokenauth needs triage New item requiring triage

Comments

@jinjiaw
Copy link

jinjiaw commented Mar 4, 2024

Component(s)

extension/bearertokenauth

What happened?

Description

Hi folks,

I am using otel/opentelemetry-collector:0.95.0 and following https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/bearertokenauthextension to use bearertokenauth as the authenticator for otlp/withauth exporter. However, following error are emitted from opentelemetry-collector container log. I am not sure why i only got four valid extensions - [zpages memory_ballast health_check pprof]. Suppose everything (including my desired bearertokenauth) defined in https://github.com/open-telemetry/opentelemetry-collector-releases/blob/v0.95.0/distributions/otelcol-contrib/manifest.yaml should be on the valid values list?

* error decoding 'extensions': unknown type: "bearertokenauth" for id: "bearertokenauth" (valid values: [zpages memory_ballast health_check pprof])
2024/03/04 06:49:41 collector server run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

Steps to Reproduce

Expected Result

config with bearertokenauth extension should be allowed.

Actual Result

opentelemetry-collector kept restarting with above mentioned error.

Collector version

0.95.0

Environment information

Environment

OS: Ubuntu 22.04
Compiler(if manually compiled): N/A

OpenTelemetry Collector configuration

---
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: otel-collector:4317
      http:
        endpoint: otel-collector:4318
        cors:
          allowed_origins: ["*"]
          allowed_headers: ["*"]

exporters:
  prometheus:
    endpoint: "0.0.0.0:8889"
    const_labels:
      label1: value1

  logging:

  otlp/withauth:
    endpoint: https://<grpc-endpoint>:443
    auth:
      authenticator: bearertokenauth

processors:
  batch:

extensions:
  bearertokenauth:
    token: "<api-token>"
  health_check:
  pprof:
    endpoint: :1888
  zpages:
    endpoint: :55679

service:
  extensions: [bearertokenauth, pprof, zpages, health_check]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, otlp/withauth]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, prometheus]

Log output

* error decoding 'extensions': unknown type: "bearertokenauth" for id: "bearertokenauth" (valid values: [zpages memory_ballast health_check pprof])
2024/03/04 06:49:37 collector server run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

* error decoding 'extensions': unknown type: "bearertokenauth" for id: "bearertokenauth" (valid values: [zpages memory_ballast health_check pprof])
Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

Additional context

No response

@jinjiaw jinjiaw added bug Something isn't working needs triage New item requiring triage labels Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

Pinging code owners:

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

@jpkrohling
Copy link
Member

  • error decoding 'extensions': unknown type: "bearertokenauth" for id: "bearertokenauth" (valid values: [zpages memory_ballast health_check pprof])

You have to use the contrib distribution, or build your own distribution using ocb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extension/bearertokenauth needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

2 participants