Allow passing counter metric name to datapoint to show in case of validation error#1121
Open
AntuanRokanten wants to merge 1 commit intoprometheus:mainfrom
Open
Allow passing counter metric name to datapoint to show in case of validation error#1121AntuanRokanten wants to merge 1 commit intoprometheus:mainfrom
AntuanRokanten wants to merge 1 commit intoprometheus:mainfrom
Conversation
zeitlinger
reviewed
Oct 8, 2024
| package io.prometheus.metrics.model.snapshots; | ||
|
|
||
| public abstract class DataPointSnapshot { | ||
| private final String metricName; |
Member
There was a problem hiding this comment.
let's add https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305/3.0.2 (complile only) and annotate with @Nullable
| this(null, value, labels, exemplar, createdTimestampMillis, scrapeTimestampMillis); | ||
| } | ||
|
|
||
| public CounterDataPointSnapshot( |
Author
There was a problem hiding this comment.
not sure what you mean here, please elaborate
Member
There was a problem hiding this comment.
I think we don't need an overloaded ctor - you can just use the builder to pass the metric name
| return this; | ||
| } | ||
|
|
||
| public Builder metricName(String metricName) { |
Member
|
started to refactor in main...pass-metric-name-to-datapoint |
hey hi @zeitlinger , is there any progress about this PR? |
Member
no - I lost track of it. Feel free to give it a go 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@zeitlinger
WRT #1090