Replies: 4 comments 1 reply
-
I've played around and see that if I don't add the tracers into the list in io.quarkus.opentelemetry.runtime.tracing.intrumentation.InstrumentationRecorder then I get exactly the behaviour I want. I am so lost when it comes to the recorders and how to get config params etc. @geoand please please do you have a minute to do something like this for me (replacing my pseudocode with actual calls to get config). This small change will give us the flexibility to turn tracers off for situations like mine :-) @Recorder
public class InstrumentationRecorder {
public static final OpenTelemetryVertxTracingFactory FACTORY = new OpenTelemetryVertxTracingFactory();
/* RUNTIME INIT */
public RuntimeValue<OpenTelemetryVertxTracer> createTracers(RuntimeValue<OpenTelemetry> openTelemetry) {
List<InstrumenterVertxTracer<?, ?>> instrumenterVertxTracers = new ArrayList<>();
if (!"true".equals(getConfig("quarkus.otel.http.disabled"))) {
instrumenterVertxTracers.add(new HttpInstrumenterVertxTracer(openTelemetry.getValue()));
}
if (!"true".equals(getConfig("quarkus.otel.eventbus.disabled"))) {
instrumenterVertxTracers.add(new EventBusInstrumenterVertxTracer(openTelemetry.getValue()));
}
// TODO - Selectively register this in the recorder if the SQL Client is available.
if (!"true".equals(getConfig("quarkus.otel.sql.disabled"))) {
instrumenterVertxTracers.add(new SqlClientInstrumenterVertxTracer(openTelemetry.getValue()));
}
return new RuntimeValue<>(new OpenTelemetryVertxTracer(instrumenterVertxTracers));
} |
Beta Was this translation helpful? Give feedback.
-
I'm on PTO, so I'll have a look next week |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Brilliant!!! Thanks so much and I hope you enjoyed your leave.
…On Mon, Aug 21, 2023 at 9:41 AM Georgios Andrianakis < ***@***.***> wrote:
@bcluap <https://github.com/bcluap> IIUC #35431
<#35431> is what you want
—
Reply to this email directly, view it on GitHub
<#35376 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGMB23OWEG6HMN7QE2CIIILXWMGLBANCNFSM6AAAAAA3SROPPQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to control starting and closing spans myself in my own JAX-RS filters as I have some requirements that VertX spans do not cover (e.g. VertX closes the span before the body has been fully sent so I cant add the body as a tag on the span). I have my own spans working but as a result Quarkus is scratching its head cause I'm setting the active span to my own in filters. E.g. I see lots of warning this: "Context in storage not the expected context, Scope.close was not called correctly".
Is it possible through a hack or anything I can do to tell Quarkus/VertX that I want to be able to inject tracers and use open telemetry but don't want Quarkus to start any spans itself when HTTP requests come in?
Beta Was this translation helpful? Give feedback.
All reactions