Skip to content

Missing job target labels #327

@Maros112358

Description

@Maros112358

Describe the bug
In sql_exporter 0.12.1, I used labels defined in jobs to add custom labels to my metrics. In sql_exporter 0.12.2, these labels do not work anymore. I am not sure if this was intentional change, but I still see labels in the source code

To Reproduce
Steps to reproduce the behavior:

  1. Start sql_exporter with config like below
  2. Go to /metrics

Expected behavior
I expected each and every metric to have label my_label_key=my_label_value.

Configuration
Example config:

jobs:
  - job_name: my_job
    collectors: [mssql_standard]
    static_configs:
      - targets:
          'my_target': 'connection_string'
        labels:
          my_label_key: my_label_value

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions