-
Notifications
You must be signed in to change notification settings - Fork 850
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add attributes advice API (just DoubleCounter for now)
- Loading branch information
Mateusz Rzeszutek
committed
Aug 10, 2023
1 parent
ea7b761
commit ee699ec
Showing
18 changed files
with
441 additions
and
46 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...r/src/main/java/io/opentelemetry/extension/incubator/metrics/CounterAdviceConfigurer.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.common.AttributeKey; | ||
import io.opentelemetry.api.metrics.DoubleCounter; | ||
import java.util.List; | ||
|
||
/** Configure advice for implementation of {@link DoubleCounter}. */ | ||
public interface CounterAdviceConfigurer { | ||
|
||
/** Specify the recommended set of attribute keys to be used for this counter. */ | ||
CounterAdviceConfigurer setAttributes(List<AttributeKey<?>> attributes); | ||
} |
18 changes: 18 additions & 0 deletions
18
.../main/java/io/opentelemetry/extension/incubator/metrics/ExtendedDoubleCounterBuilder.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.metrics.DoubleCounterBuilder; | ||
import java.util.function.Consumer; | ||
|
||
/** Extended {@link DoubleCounterBuilder} with experimental APIs. */ | ||
public interface ExtendedDoubleCounterBuilder extends DoubleCounterBuilder { | ||
|
||
/** Specify advice for counter implementations. */ | ||
default DoubleCounterBuilder setAdvice(Consumer<CounterAdviceConfigurer> adviceConsumer) { | ||
return this; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.