You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using tracing shaded into otel/appinsights agent, we put instances of shaded OTel-context into SDK-context.
When unshaded metrics plugin is used, it works with instances of unshaded OTel-context, but gets shaded one created by tracing plugin from SDK-context.
As a result, exemplars could be broken and users get a couple of warning messages in the logs.
// TODO (limolkova) The context we have here is created by azure-core-tracing-opentelemetry.
// but if otel or appinsights agents are used, the azure-core-tracing-opentelemetry is shaded and records shaded context.
// if azure-core-metrics-opentelemetry is NOT shaded, we won't be able to reuse this context since it's not compatible.
// I.e. it works fine if both are shaded or not shaded and warns (once) if just one of them is shaded.
// We should fix this by adding azure-core-metrics-opentelemetry to otel agent
// In the meantime, it's ok - we return current context and exemplars should work reasonably well.
There is nothing on the SDK side that can be done and we expect users to either have both metrics and tracing plugins included in the agent or use both of them explicitly. Mixing different ways would have above drawbacks.
When using tracing shaded into otel/appinsights agent, we put instances of shaded OTel-context into SDK-context.
When unshaded metrics plugin is used, it works with instances of unshaded OTel-context, but gets shaded one created by tracing plugin from SDK-context.
As a result, exemplars could be broken and users get a couple of warning messages in the logs.
azure-sdk-for-java/sdk/core/azure-core-metrics-opentelemetry/src/main/java/com/azure/core/metrics/opentelemetry/OpenTelemetryUtils.java
Lines 57 to 62 in 0afa866
There is nothing on the SDK side that can be done and we expect users to either have both metrics and tracing plugins included in the agent or use both of them explicitly. Mixing different ways would have above drawbacks.
We can consider adding the plugin to otel agent after open-telemetry/semantic-conventions#163 is finalized.
The text was updated successfully, but these errors were encountered: