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

When I add the basic/auth extention to opentelemetry it throwing an error decoding 'extensions': unknown type: "basicauth" #30251

Closed
nikhil-ht-el opened this issue Jan 2, 2024 · 3 comments
Labels
needs triage New item requiring triage

Comments

@nikhil-ht-el
Copy link

Component(s)

No response

Describe the issue you're reporting

here is my openetelemetry config file

receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:5555

exporters:
  logging:
    loglevel: debug
  otlphttp:
    endpoint:https://tempo-dev.com
    auth:
      authenticator: basicauth/client
extensions:
  basicauth/client:
    client_auth: 
      username: ${username}
      password: ${password}
service:
  extensions: [basicauth/client]
  pipelines:
    metrics:
      receivers: [otlp]
      exporters: [otlphttp]
    traces:
      receivers: [otlp]
      exporters: [otlphttp,logging]

I want to push basic auth header when pushing the traces and matrics to the tempo address so that is why I added the basicauth/client extension in opentelemetry but it throwing the below error.(using otel/opentelemetry-collector:0.87.0 version)

Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

* error decoding 'extensions': unknown type: "basicauth" for id: "basicauth/client" (valid values: [zpages memory_ballast health_check pprof])
2024/01/02 10:34:19 collector server run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:

* error decoding 'extensions': unknown type: "basicauth" for id: "basicauth/client" (valid values: [zpages memory_ballast health_check pprof])
@nikhil-ht-el nikhil-ht-el added the needs triage New item requiring triage label Jan 2, 2024
@crobert-1
Copy link
Member

Hello @nikhil-ht-el, this is because you're using what is referred to as the core distribution OpenTelemetry Collector, not the contrib distribution. Note your image name: otel/opentelemetry-collector:0.87.0. If you use the contrib image, the extension will be included.

This image should work instead: otel/opentelemetry-collector-contrib:0.87.0

Note in the README the supported distributions.

@crobert-1
Copy link
Member

Please feel free to let us know if you have any more questions, happy to help! If you run into more issues with this extension please file a new issue. 👍

@nikhil-ht-el
Copy link
Author

Thanks @crobert-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

2 participants