Skip to content

Commit

Permalink
add telemetry.auto.name
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Jul 27, 2023
1 parent dc5d76a commit fe4476a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@
@AutoService(ResourceProvider.class)
public class AutoVersionResourceProvider implements ResourceProvider {

private static final AttributeKey<String> TELEMETRY_AUTO_NAME =
AttributeKey.stringKey("telemetry.auto.name");
private static final AttributeKey<String> TELEMETRY_AUTO_VERSION =
AttributeKey.stringKey("telemetry.auto.version");

@Override
public Resource createResource(ConfigProperties config) {
return AgentVersion.VERSION == null
? Resource.empty()
: Resource.create(Attributes.of(TELEMETRY_AUTO_VERSION, AgentVersion.VERSION));
: Resource.create(
Attributes.of(
TELEMETRY_AUTO_NAME,
"opentelemetry-javaagent",
TELEMETRY_AUTO_VERSION,
AgentVersion.VERSION));
}
}

0 comments on commit fe4476a

Please sign in to comment.