Skip to content

Commit 00b5577

Browse files
change value to name
1 parent 5d33384 commit 00b5577

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

instrumentation/opentelemetry-instrumentation-annotations/opentelemetry-instrumentation-annotations-incubator/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/instrumentationannotations/incubator/CountedHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private static class MethodCounter {
5555
Counted countedAnnotation = method.getAnnotation(Counted.class);
5656
counter =
5757
METER
58-
.counterBuilder(countedAnnotation.value())
58+
.counterBuilder(countedAnnotation.name())
5959
.setDescription(countedAnnotation.description())
6060
.setUnit(countedAnnotation.unit())
6161
.build();

instrumentation/opentelemetry-instrumentation-annotations/opentelemetry-instrumentation-annotations-incubator/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/instrumentationannotations/incubator/MetricsAnnotationHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ private static String attributeName(Parameter parameter) {
5050
if (annotation == null) {
5151
return null;
5252
}
53-
String value = annotation.value();
54-
if (!value.isEmpty()) {
55-
return value;
53+
String name = annotation.name();
54+
if (!name.isEmpty()) {
55+
return name;
5656
} else if (parameter.isNamePresent()) {
5757
return parameter.getName();
5858
} else {

instrumentation/opentelemetry-instrumentation-annotations/opentelemetry-instrumentation-annotations-incubator/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/instrumentationannotations/incubator/TimedHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private static class MethodTimer {
7070
Timed timedAnnotation = method.getAnnotation(Timed.class);
7171
histogram =
7272
METER
73-
.histogramBuilder(timedAnnotation.value())
73+
.histogramBuilder(timedAnnotation.name())
7474
.setDescription(timedAnnotation.description())
7575
.setUnit("s")
7676
.build();

0 commit comments

Comments
 (0)