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

FastAPI Instrumentor not populating attributes required for Azure exporter #427

Closed
gautam-ergo opened this issue Apr 8, 2021 · 1 comment · Fixed by #478
Closed

FastAPI Instrumentor not populating attributes required for Azure exporter #427

gautam-ergo opened this issue Apr 8, 2021 · 1 comment · Fixed by #478
Labels
bug Something isn't working triaged

Comments

@gautam-ergo
Copy link

Describe your environment

Package Version - azure-monitor-opentelemetry-exporter = {version = "^1.0.0-beta.3", allow-prereleases = true}
opentelemetry-instrumentation-fastapi = "^0.19b0"
Operating System - macOS Mojave v10.14.6

Python Version - v3.9.0

Steps to reproduce
When using the azure-monitor-opentelemetry-exporter in conjunction with opentelemetry-instrumentation-fastapi
the response code is not populated by the exporter, raised this issue with Azure monitor team and was redirected here;

Looking at the output, it seems like the spans are missing some attributes. This is probably an issue in the opentelemetry-instrumentation-asgi, could you file an issue here for this problem specifically? Basically, the exporter sees if http.status_code is populated in the span attributes to populate response_Code in app insights. Since the attribute is not there, this is why you are seeing 0s. Normally, it is up to the instrumentation to populate this.

Azure monitor issue#17839

Spans obtained from console exporter:

  • one for successful - 201 request
  • one for failed - 422 request
  • one on exit

json.zip

Screen grab from Azure App Insights indication reponse code as 0:

image

What is the expected behavior?
Compatibility with Azure monitor exporter

Additional context
Detailed context for this issue

Azure monitor issue#17839

Please let me know in case of additional info required.

Thanks.

@gautam-ergo gautam-ergo added the bug Something isn't working label Apr 8, 2021
@github-actions
Copy link

github-actions bot commented May 9, 2021

This issue was marked stale due to lack of activity. It will be closed in 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants