eclipse / microprofile-telemetry

microprofile telemetry
Apache License 2.0
16 stars 16 forks source link

Test mp.telemetry.tracing.enabled #30

Closed fmhwong closed 1 year ago

fmhwong commented 2 years ago

Fixes https://github.com/eclipse/microprofile-telemetry/issues/29

Added tests for

Renamed mp.telemetry.trace.enabled to mp.telemetry.tracing.enabled in the spec

Signed-off-by: Felix Wong fmhwong@ca.ibm.com

radcortez commented 2 years 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.

brunobat commented 2 years ago

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.

Emily-Jiang commented 2 years ago

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.

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.

fmhwong commented 1 year ago

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.