Skip to content

Add optional preset_labels to Middleware::Collector metrics#254

Closed
JoshInLisbon wants to merge 1 commit intoprometheus:masterfrom
JoshInLisbon:preset_labels_for_middleware_collector_metrics
Closed

Add optional preset_labels to Middleware::Collector metrics#254
JoshInLisbon wants to merge 1 commit intoprometheus:masterfrom
JoshInLisbon:preset_labels_for_middleware_collector_metrics

Conversation

@JoshInLisbon
Copy link

Signed-off-by: Joshua Eichler-Summers joshua.summers@boardintelligence.com

Signed-off-by: Joshua Eichler-Summers <joshua.summers@boardintelligence.com>
@dmagliola
Copy link
Collaborator

Hello @JoshInLisbon,

Unless i'm misunderstanding the intention here, this looks like a re-do of #180 and #174.

Generally speaking, "the Prometheus way" is to set target labels on the Prometheus end, instead of reporting those labels from your app.

Tobias explains it well here

Based on this, I'm closing this PR as it goes against Prometheus Best Practices. Please reopen if I've misunderstood the intention here.

@dmagliola dmagliola closed this Apr 11, 2022
@hosamaly
Copy link

I think that it's quite restrictive to not accept preset labels. There is a reason why they exist in the API. Some values may not be available to Prometheus (e.g. an app's version). There may be other legitimate reasons to not use target labels, such as when a team doesn't have access to the Prometheus configuration.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants