Skip to content

Commit

Permalink
Rename Prometheus API Collector.Type enum value UNTYPED to UNKNOWN (#…
Browse files Browse the repository at this point in the history
…2418)

The io.prometheus.client.Collector.Type enum' value UNTYPED was renamed to UNKNOWN, since the release 0.10.0 / 2021-01-25 of the Prometheus Java client library.

Co-authored-by: Sandro Rossi <sandro.rossi.nl@gmail.com>
  • Loading branch information
rossisandro and Sandro Rossi authored Jan 26, 2021
1 parent 86d5597 commit d1a09e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ public List<MetricFamilySamples> describe() {
case LONG_TASK_TIMER:
return Arrays.asList(
new MetricFamilySamples(conventionName, Type.HISTOGRAM, help, Collections.emptyList()),
new MetricFamilySamples(conventionName, Type.UNTYPED, help, Collections.emptyList()));
new MetricFamilySamples(conventionName, Type.UNKNOWN, help, Collections.emptyList()));

default:
return Collections.singletonList(
new MetricFamilySamples(conventionName, Type.UNTYPED, help, Collections.emptyList()));
new MetricFamilySamples(conventionName, Type.UNKNOWN, help, Collections.emptyList()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ protected <T> FunctionCounter newFunctionCounter(Meter.Id id, T obj, ToDoubleFun

@Override
protected Meter newMeter(Meter.Id id, Meter.Type type, Iterable<Measurement> measurements) {
Collector.Type promType = Collector.Type.UNTYPED;
Collector.Type promType = Collector.Type.UNKNOWN;
switch (type) {
case COUNTER:
promType = Collector.Type.COUNTER;
Expand Down

0 comments on commit d1a09e2

Please sign in to comment.