Skip to content

Receiver : Prometheus : Authorization Password not replaced #40916

@joaolcorreia

Description

@joaolcorreia

Component(s)

No response

What happened?

Description

When you have a receiver prometheus that requires authentication the password is not being adding to the header authorization: Basic xxxxxxx

The xxxxx is replaces the username: and shows instead of replacing the password given in the config file

Steps to Reproduce

Configure a prometheus receiver with authentication pointing to Pipedream and inspect the headers.

receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: 'warpstream'
          metrics_path: '/api/v1/monitoring/prometheus/virtual_clusters/xxxxxx'
          scheme: https
          basic_auth:
            username: prometheus
            password: "xxxxxxxxx"
          scrape_interval: 60s
          static_configs:
            - targets: ['xxxxx.m.pipedream.net']
              labels:
                service: 'warpstream'
                environment: 'production'

Expected Result

You should see username:password base 64 encoded

Actual Result

You see username:<secret> you see <secret> instead of the actual secret.

Collector version

latest

Environment information

Environment

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

OpenTelemetry Collector configuration

Log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existsreceiver/prometheusPrometheus receiver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions