This repository serves as a collection of examples of extending functionality of OpenTelemetry Java instrumentation agent. It demonstrates how to repackage the aforementioned agent adding custom functionality. For every extension point provided by OpenTelemetry Java instrumentation, this repository contains an example of its usage.
This repository has four main submodules:
custom
contains all custom functionality, SPI and other extensionsagent
contains the main repackaging functionality and, optionally, an entry point to the agent, if one wishes to customize thatinstrumentation
contains custom instrumentations added by vendorsmoke-tests
contains simple tests to verify that resulting agent builds and applies correctly
- DemoIdGenerator - custom
IdGenerator
- DemoPropagator - custom
TextMapPropagator
- DemoPropertySource - default configuration
- DemoSampler - custom
Sampler
- DemoSpanProcessor - custom
SpanProcessor
- DemoSpanExporter - custom
SpanExporter
- DemoServlet3Instrumentation - additional instrumentation