Skip to content

yegor-usoltsev/opentelemetry-java-auto-peer-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opentelemetry-java-auto-peer-service

Build Status Codecov GitHub Release

An extension for the OpenTelemetry Java agent designed to enrich HTTP client spans. It does this by automatically setting the peer.service attribute based on the server.address attribute.

This extension acts as an alternative to the built-in otel.instrumentation.common.peer-service-mapping, which maps hostnames/IPs directly to a peer service name.

The build produces a single JAR: opentelemetry-java-auto-peer-service.jar. Use it as an extension for the OpenTelemetry Java agent to customize how peer service names are assigned.

Usage

Download the latest JAR and launch your application with the following command:

wget https://github.com/yegor-usoltsev/opentelemetry-java-auto-peer-service/releases/latest/download/opentelemetry-java-auto-peer-service.jar

java -javaagent:opentelemetry-javaagent.jar \
     -Dotel.javaagent.extensions=opentelemetry-java-auto-peer-service.jar \
     -jar app.jar

Versioning

This project uses Semantic Versioning

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

MIT

About

An extension for the OpenTelemetry Java agent designed to enrich HTTP client spans

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages