-
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.
Implement attributes advice for the rest of the instruments (#5722)
- Loading branch information
Mateusz Rzeszutek
authored
Aug 23, 2023
1 parent
32d591a
commit 4b06f09
Showing
25 changed files
with
547 additions
and
54 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
...c/main/java/io/opentelemetry/extension/incubator/metrics/DoubleGaugeAdviceConfigurer.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,16 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.common.AttributeKey; | ||
import java.util.List; | ||
|
||
/** Configure advice for implementation of {@code DoubleGauge}. */ | ||
public interface DoubleGaugeAdviceConfigurer { | ||
|
||
/** Specify the recommended set of attribute keys to be used for this gauge. */ | ||
DoubleGaugeAdviceConfigurer setAttributes(List<AttributeKey<?>> attributes); | ||
} |
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
17 changes: 17 additions & 0 deletions
17
...ava/io/opentelemetry/extension/incubator/metrics/DoubleUpDownCounterAdviceConfigurer.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.DoubleUpDownCounter; | ||
import java.util.List; | ||
|
||
/** Configure advice for implementation of {@link DoubleUpDownCounter}. */ | ||
public interface DoubleUpDownCounterAdviceConfigurer { | ||
|
||
/** Specify the recommended set of attribute keys to be used for this up down counter. */ | ||
DoubleUpDownCounterAdviceConfigurer setAttributes(List<AttributeKey<?>> attributes); | ||
} |
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
18 changes: 18 additions & 0 deletions
18
...rc/main/java/io/opentelemetry/extension/incubator/metrics/ExtendedDoubleGaugeBuilder.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.DoubleGaugeBuilder; | ||
import java.util.function.Consumer; | ||
|
||
/** Extended {@link DoubleGaugeBuilder} with experimental APIs. */ | ||
public interface ExtendedDoubleGaugeBuilder extends DoubleGaugeBuilder { | ||
|
||
/** Specify advice for gauge implementations. */ | ||
default DoubleGaugeBuilder setAdvice(Consumer<DoubleGaugeAdviceConfigurer> adviceConsumer) { | ||
return this; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...java/io/opentelemetry/extension/incubator/metrics/ExtendedDoubleUpDownCounterBuilder.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,19 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.metrics.DoubleUpDownCounterBuilder; | ||
import java.util.function.Consumer; | ||
|
||
/** Extended {@link DoubleUpDownCounterBuilder} with experimental APIs. */ | ||
public interface ExtendedDoubleUpDownCounterBuilder extends DoubleUpDownCounterBuilder { | ||
|
||
/** Specify advice for up down counter implementations. */ | ||
default DoubleUpDownCounterBuilder setAdvice( | ||
Consumer<DoubleUpDownCounterAdviceConfigurer> adviceConsumer) { | ||
return this; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...rc/main/java/io/opentelemetry/extension/incubator/metrics/ExtendedLongCounterBuilder.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.LongCounterBuilder; | ||
import java.util.function.Consumer; | ||
|
||
/** Extended {@link LongCounterBuilder} with experimental APIs. */ | ||
public interface ExtendedLongCounterBuilder extends LongCounterBuilder { | ||
|
||
/** Specify advice for counter implementations. */ | ||
default LongCounterBuilder setAdvice(Consumer<LongCounterAdviceConfigurer> adviceConsumer) { | ||
return this; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
.../src/main/java/io/opentelemetry/extension/incubator/metrics/ExtendedLongGaugeBuilder.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.LongGaugeBuilder; | ||
import java.util.function.Consumer; | ||
|
||
/** Extended {@link LongGaugeBuilder} with experimental APIs. */ | ||
public interface ExtendedLongGaugeBuilder extends LongGaugeBuilder { | ||
|
||
/** Specify advice for gauge implementations. */ | ||
default LongGaugeBuilder setAdvice(Consumer<LongGaugeAdviceConfigurer> adviceConsumer) { | ||
return this; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...n/java/io/opentelemetry/extension/incubator/metrics/ExtendedLongUpDownCounterBuilder.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,19 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.metrics.LongUpDownCounterBuilder; | ||
import java.util.function.Consumer; | ||
|
||
/** Extended {@link LongUpDownCounterBuilder} with experimental APIs. */ | ||
public interface ExtendedLongUpDownCounterBuilder extends LongUpDownCounterBuilder { | ||
|
||
/** Specify advice for up down counter implementations. */ | ||
default LongUpDownCounterBuilder setAdvice( | ||
Consumer<LongUpDownCounterAdviceConfigurer> adviceConsumer) { | ||
return this; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...c/main/java/io/opentelemetry/extension/incubator/metrics/LongCounterAdviceConfigurer.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.LongCounter; | ||
import java.util.List; | ||
|
||
/** Configure advice for implementation of {@link LongCounter}. */ | ||
public interface LongCounterAdviceConfigurer { | ||
|
||
/** Specify the recommended set of attribute keys to be used for this counter. */ | ||
LongCounterAdviceConfigurer setAttributes(List<AttributeKey<?>> attributes); | ||
} |
16 changes: 16 additions & 0 deletions
16
...src/main/java/io/opentelemetry/extension/incubator/metrics/LongGaugeAdviceConfigurer.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,16 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.extension.incubator.metrics; | ||
|
||
import io.opentelemetry.api.common.AttributeKey; | ||
import java.util.List; | ||
|
||
/** Configure advice for implementation of {@code LongGauge}. */ | ||
public interface LongGaugeAdviceConfigurer { | ||
|
||
/** Specify the recommended set of attribute keys to be used for this gauge. */ | ||
LongGaugeAdviceConfigurer setAttributes(List<AttributeKey<?>> attributes); | ||
} |
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
17 changes: 17 additions & 0 deletions
17
.../java/io/opentelemetry/extension/incubator/metrics/LongUpDownCounterAdviceConfigurer.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.LongUpDownCounter; | ||
import java.util.List; | ||
|
||
/** Configure advice for implementation of {@link LongUpDownCounter}. */ | ||
public interface LongUpDownCounterAdviceConfigurer { | ||
|
||
/** Specify the recommended set of attribute keys to be used for this up down counter. */ | ||
LongUpDownCounterAdviceConfigurer setAttributes(List<AttributeKey<?>> attributes); | ||
} |
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.