Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include OpenTelemetry metrics plugin into OTel agent #36537

Open
lmolkova opened this issue Aug 25, 2023 · 1 comment
Open

Include OpenTelemetry metrics plugin into OTel agent #36537

lmolkova opened this issue Aug 25, 2023 · 1 comment
Assignees
Labels
Azure.Core azure-core OpenTelemetry OpenTelemetry instrumentation

Comments

@lmolkova
Copy link
Member

lmolkova commented Aug 25, 2023

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.

We can consider adding the plugin to otel agent after open-telemetry/semantic-conventions#163 is finalized.

@lmolkova lmolkova added Azure.Core azure-core OpenTelemetry OpenTelemetry instrumentation labels Aug 25, 2023
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 25, 2023
@lmolkova lmolkova removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 25, 2023
@lmolkova lmolkova self-assigned this Aug 25, 2023
@lmolkova
Copy link
Member Author

/cc @trask JFYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core azure-core OpenTelemetry OpenTelemetry instrumentation
Projects
Status: No status
Development

No branches or pull requests

1 participant