Skip to content

Commit fe4476a

Browse files
committed
add telemetry.auto.name
1 parent dc5d76a commit fe4476a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AutoVersionResourceProvider.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,20 @@
1515
@AutoService(ResourceProvider.class)
1616
public class AutoVersionResourceProvider implements ResourceProvider {
1717

18+
private static final AttributeKey<String> TELEMETRY_AUTO_NAME =
19+
AttributeKey.stringKey("telemetry.auto.name");
1820
private static final AttributeKey<String> TELEMETRY_AUTO_VERSION =
1921
AttributeKey.stringKey("telemetry.auto.version");
2022

2123
@Override
2224
public Resource createResource(ConfigProperties config) {
2325
return AgentVersion.VERSION == null
2426
? Resource.empty()
25-
: Resource.create(Attributes.of(TELEMETRY_AUTO_VERSION, AgentVersion.VERSION));
27+
: Resource.create(
28+
Attributes.of(
29+
TELEMETRY_AUTO_NAME,
30+
"opentelemetry-javaagent",
31+
TELEMETRY_AUTO_VERSION,
32+
AgentVersion.VERSION));
2633
}
2734
}

0 commit comments

Comments
 (0)