Skip to content

Commit fc4524f

Browse files
committed
JavaDoc explaining default matching behavior
1 parent 0515195 commit fc4524f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/OtlpMeterRegistry.java

+24
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,35 @@ public Builder metricsSender(OtlpMetricsSender metricsSender) {
637637
return this;
638638
}
639639

640+
/**
641+
* Override the default matching behavior to use with
642+
* {@link OtlpConfig#histogramFlavorPerMeter()}. The default behavior is longest
643+
* dot-separated match wins. For example, if
644+
* {@link OtlpConfig#histogramFlavorPerMeter()} has keys {@literal http} and
645+
* {@literal http.server}, an ID with a name {@literal http.server.requests} would
646+
* match with the entry having key {@literal http.server}, whereas an ID with name
647+
* {@literal http.client.requests} would match with the entry having the key
648+
* {@literal http}.
649+
*
650+
* @see OtlpConfig#histogramFlavorPerMeter()
651+
*/
640652
public Builder histogramFlavorPerMeterLookup(HistogramFlavorPerMeterLookup histogramFlavorPerMeterLookup) {
641653
this.histogramFlavorPerMeterLookup = histogramFlavorPerMeterLookup;
642654
return this;
643655
}
644656

657+
/**
658+
* Override the default matching behavior to use with
659+
* {@link OtlpConfig#maxBucketsPerMeter()}. The default behavior is longest
660+
* dot-separated match wins. For example, if
661+
* {@link OtlpConfig#maxBucketsPerMeter()} has keys {@literal http} and
662+
* {@literal http.server}, an ID with a name {@literal http.server.requests} would
663+
* match with the entry having key {@literal http.server}, whereas an ID with name
664+
* {@literal http.client.requests} would match with the entry having the key
665+
* {@literal http}.
666+
*
667+
* @see OtlpConfig#maxBucketsPerMeter()
668+
*/
645669
public Builder maxBucketsPerMeterLookup(MaxBucketsPerMeterLookup maxBucketsPerMeterLookup) {
646670
this.maxBucketsPerMeterLookup = maxBucketsPerMeterLookup;
647671
return this;

0 commit comments

Comments
 (0)