eclipse-vertx / vertx-tracing

Vertx integration with tracing libraries
Other
42 stars 34 forks source link

OpenTelemetry: fallback to default storage when not on a Vert.x thread #71

Closed tsegismont closed 11 months ago

tsegismont commented 11 months ago

The VertxContextStorageProvider is chosen by OpenTelemetry via the service loader mechanism.

While it is mandatory to use context for storage of spans created on Vert.x threads, there may be parts of the application implemented without Vert.x.

In this case, the storage provider fails with NPE. Instead, it is better to fall back to the default storage mechanism, which uses thread local variables.