I’m learning OpenTelemetry hands-on by trying to incorporate manual instrumentation in my webapp to complement the automatic instrumentation provided by the Java agent. I have a question regarding the logger provider.
OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
.setLoggerProvider(null) // I want to use the same as that/those being used globally
.setMeterProvider((SdkMeterProvider) GlobalOpenTelemetry.getMeterProvider())
.setTracerProvider((SdkTracerProvider) GlobalOpenTelemetry.getTracerProvider())
.build();
In this code, I want to set up my manual instrumentation to use the same providers as that used by the automatic instrumentation Java agent. I can do this for meters and traces but not logging; it seems like this is an intentional decision. Is there a straightforward way to do this?