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

[Azure Python SDK] Implement tracing of Azure Python SDK using azure-core-tracing #1889

Open
cpiment opened this issue Aug 18, 2023 · 1 comment
Labels

Comments

@cpiment
Copy link

cpiment commented Aug 18, 2023

Is your feature request related to a problem? Please describe.
Since whole Azure Python SDK is traced using azure-core-tracing abstract tracing, an ElasticAPM Span implementation could be generated so all Azure libraries would be traced in APM "for free"

This is already done with OpenTelemetry using this code:

  from azure.core.settings import settings
  from azure.core.tracing.ext.opentelemetry_span import OpenTelemetrySpan
  settings.tracing_implementation = OpenTelemetrySpan

An ElasticAPMSpan class that inherits from HttpSpanMixin could be implemented. This could be based in current OpenTelemetrySpan

I have seen that some Azure integrations are being done here: elastic/apm#410. The enhancement I suggest would cover those integrations and many more, since the tracing is already implemented in the whole Azure Python SDK.

Describe the solution you'd like
I would like an Azure SDK tracing implementation that could allow me to do this:

  from azure.core.settings import settings
  from elasticapm.contrib.serverless.azure import ElasticAPMSpan
  settings.tracing_implementation = ElasticAPMSpan

So I could take advantage of the already traced Azure SDK code.

Describe alternatives you've considered

  • I haved tried to set the OpenTelemetry API Bridge but it will not work in this case since OpenTelemetrySpan recovers the tracer from the global OpenTelemetry tracer which is not set in the bridge.
  • Another option would be to use OpenTelemetry API and OTLP gRPC exporter to send traces to APM Server. That works and I have used it successfully in other projects, but there is no OpenTelemetry instrumentation of Azure Functions and elasticapm.contrib.serverless.azure.ElasticAPMExtension works best in my current use case.
@github-actions github-actions bot added agent-python community Issues opened by the community triage Issues awaiting triage labels Aug 18, 2023
@basepi
Copy link
Contributor

basepi commented Aug 23, 2023

Thanks for the request! We would definitely like to have this instrumented eventually.

@basepi basepi added feature instrumentation and removed triage Issues awaiting triage labels Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants