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

Logs to debug authentication using oauth2 #36944

Open
Jonaprince opened this issue Dec 24, 2024 · 1 comment
Open

Logs to debug authentication using oauth2 #36944

Jonaprince opened this issue Dec 24, 2024 · 1 comment

Comments

@Jonaprince
Copy link

Component(s)

exporter/prometheusremotewrite, extension/oauth2clientauth

Describe the issue you're reporting

Hello,

I'm trying to push metrics using the remote write protocol to an enpoint which require oauth2 authentication. But I can't and I have no much way to debug my problem. Here is my configuration:

receivers:
  hostmetrics:
    collection_interval: 30s
    scrapers:
      memory:

extensions:
  oauth2client:
    client_id: "<MY_ID>"
    client_secret: <MY_SECRET>
    token_url: "https://<MY_OAUTH2_PROVIDER>/token"
    endpoint_params:
      grant_type: "client_credentials"
    scopes:
    - openid
    timeout: 30s


exporters:

  debug:
    verbosity: detailed

  prometheusremotewrite/withauth:
    auth:
      authenticator: oauth2client
    endpoint: "https://<MY_REMOTE_WRITE_URL>/api/v1/write"

service:
  extensions: [oauth2client]
  telemetry:
    logs:
      level: debug
  pipelines:
    metrics:
      receivers: [hostmetrics
      processors: []
      exporters: [prometheusremotewrite/withauth]

The only logs that I get is:

otlp-exporter  | 2024-12-24T10:19:44.243Z       error   internal/queue_sender.go:103    Exporting failed. Dropping data.        {"kind": "exporter", "data_type": "metrics", "name": "prometheusremotewrite/withauth", "error": "Permanent error: Permanent error: context deadline exceeded", "dropped_items": 6}

So I don't have many hints to diagnose the issue. I don't know if it due to a oauth misconfiguration or anything else. Is there a way to get more logs about the requests status for example ?

Thank you for your help.

Copy link
Contributor

Pinging code owners:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant