Skip to content

Improve constant label naming for target and jobs #325

@burningalchemist

Description

@burningalchemist

Currently, the label instance is populated with a target's name, which might look confusing. Given the fact that jobs also use instance for target names, we want to change label names for both in v0.13 for compatibility reasons.

We also want to make it configurable, so users can adjust the label name according to the available context.


Originally discussed in #324

Originally posted by rsommer September 18, 2023
Hi,

just a thought about the current label set when using jobs for targeting multiple logical databases in a single server.

Currently the target's key is exported as instance label. As of the prometheus docs, instance reflects host:port of the scraped target - which should(?) be the exporter host and it's port and is set by prometheus itself if not present. Wouldn't something like database or dbname be a more suitable label name in this case?

The final data in prometheus depends on whether honor_labels is true or false otherwise - so with the same exporter config the final data may differ if instance is used as label.

There was a comment regarding labels and upcoming changes in v0.13 - maybe this will be addressed with the next release?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions