-
Notifications
You must be signed in to change notification settings - Fork 19
ph telemetry
Philip Helger edited this page May 18, 2026
·
1 revision
Vendor-neutral tracing abstraction. Provides a thin span API plus a ServiceLoader-based SPI for plugging in a concrete backend (OpenTelemetry, Jaeger, Zipkin, etc.). If no implementation is registered, a built-in no-op tracer is used so callers can write tracing code unconditionally.
Highlights:
-
Telemetry- static facade for starting spans; lazily resolves the SPI implementation and falls back to a no-op tracer when none is registered -
ITelemetrySpan- fluent span API with typed attribute setters, exception recording, and OK/ERROR status -
ITelemetryTracerSPI- SPI interface to be implemented and registered viaMETA-INF/servicesby a backend module -
ETelemetrySpanKind- mirrors OpenTelemetry'sSpanKind(INTERNAL,CLIENT,SERVER,PRODUCER,CONSUMER) -
Telemetry.withSpan (name, kind, body)- convenience that starts a span, records exceptions on it, and ends it in afinallyblock
Add the following to your pom.xml to use this artifact:
<dependency>
<groupId>com.helger.commons</groupId>
<artifactId>ph-telemetry</artifactId>
<version>x.y.z</version>
</dependency>Note: this module was introduced to ph-commons in v12.2.6.
On Twitter: Follow @philiphelger
Donation link: https://paypal.me/PhilipHelger
It is appreciated if you star the GitHub project if you like it.
-
Home
- ph-annotations
- ph-base
- ph-bc
- ph-cache
- ph-cli
- ph-collection
- ph-commons
- ph-config
- ph-config-json
- ph-csv
- ph-dao
- ph-datetime
- ph-diagnostics
- ph-graph
- ph-http
- ph-io
- ph-jaxb
- ph-jaxb-adapter
- ph-json
- ph-matrix
- ph-mime
- ph-scopes
- ph-security
- ph-settings
- ph-statistics
- ph-telemetry
- ph-text
- ph-tree
- ph-typeconvert
- ph-unittest-support
- ph-unittest-support-ext
- ph-url
- ph-wsclient
- ph-xml
- News and noteworthy
- License
- History