javaquarkuscode-injectionopen-telemetryquarkus-extension

Inject own Logic into existing Quakus Extension


I want to add my Logic into a class (VertexTracesDelegator) of the Open Telemetry Quarkus Extension to get a Callback Method that executes some code.

Because I want to intercept the start and end of traces to measure the used cpu time for example.

Is it even possible to Inject Code into a part that you can't access?

I'm new to Quarkus but I believe something like Interceptors or things where you need to change something in the Code isn't possible.


Solution

  • I solved this Problem by implementing my own SpanProcessor.