Closed fmhwong closed 1 year ago
OpenTelemetry already has configuration to enable / disable: https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
We may want to use that configuration instead.
We should just make sure those configs can be done through MP Config. Meaning that from a MP compliant library, OTel libs can be transparently configured, using the OTel defined properties.
OTel can be fully disabled if otel.experimental.sdk.enabled=false
is used.
For tracing specifically, if we set otel.traces.exporter=none
no traces will be sent. Not sure if this means no work will be performed doing tracing.
There is no obvious switch to turn on and off tracing, metrics and logging independently. We can propose that, however, us committing to it inside MP is complex and also a divergence from the OTel spec that we would have to maintain. I would prefer to contribute that, if we must have those switches.
We should just make sure those configs can be done through MP Config. Meaning that from a MP compliant library, OTel libs can be transparently configured, using the OTel defined properties.
OTel can be fully disabled if
otel.experimental.sdk.enabled=false
is used. For tracing specifically, if we setotel.traces.exporter=none
no traces will be sent. Not sure if this means no work will be performed doing tracing. There is no obvious switch to turn on and off tracing, metrics and logging independently. We can propose that, however, us committing to it inside MP is complex and also a divergence from the OTel spec that we would have to maintain. I would prefer to contribute that, if we must have those switches.
I think in OTel, they treated three things as interconnected. Maybe it is safer to disable all of them instead of separately. IIUC, for otel.traces.exporter=none
just means no traces will be sent but the traces will still be generated unless otel.experimental.sdk.enabled=false
is set.
Renamed mp.telemetry.tracing.enabled
to otel.experimental.sdk.enabled
. Undo the changes in the asciidoc as this will be changed in PR https://github.com/eclipse/microprofile-telemetry/pull/31.
Fixes https://github.com/eclipse/microprofile-telemetry/issues/29
Added tests for
mp.telemetry.tracing.enabled
not setmp.telemetry.tracing.enabled=true
mp.telemetry.tracing.enabled=false
Renamed
mp.telemetry.trace.enabled
tomp.telemetry.tracing.enabled
in the specSigned-off-by: Felix Wong fmhwong@ca.ibm.com