-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
OpenTelemetry Container App AzureVMResourceDetector Exception #33295
Comments
When I comment out the following part, the container replica is healthy, I can call the API.
The error also appears using |
Hey, thanks for the feedback. @lzchen. @jeremydvoss, do you know what's causing this issue? |
@pvaneck No. The problem here is that for some reason the error is not actually explained. Notice the double-space where the error message should show. It is as if a blank "Exception()" is called somewhere. That being said, OpenTelemetry Resource is designed to call the detectors and ignore it if it fails. So, this does not affect the app running. |
We have release azure-monitor-opentelemetry=1.1.1 . This includes the ability to disable resource detectors. For instance, in order to disable the VM detector, but leave the App Service detector on, the customer can set their environment variable OTEL_EXPERIMENTAL_RESOURCE_DETECTORS="azure_app_service" Let me know if this solves the problem. |
Thanks @jeremydvoss, for now we deployed version |
Hi @Freshchris01. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
what to set in azure container apps? OTEL_EXPERIMENTAL_RESOURCE_DETECTORS="azure_app_service" |
Yes set it to the same value for now. This is just a workaround to block the error message from appearing. |
Yes set it to the same value for now. This is just a workaround to block the error message from appearing. yes, we are using OTEL_EXPERIMENTAL_RESOURCE_DETECTORS="azure_app_service" locally as well since we are using a local app insights too |
Hi @Freshchris01, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Just writing to say I have the same issue. Almost exact same setup as OP. |
@Freshchris01 Please try with the latest version of opentelemetry-resource-detector-azure==0.1.1 |
Hi @Freshchris01, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
The new azure-monitor-opentelemetry==1.2.0 includes a couple improvements to the resource detector. If you are still having issues, upgrade to this version and let us know if your issue persists. |
Hello, it still exists but the function app does not fail. However, I can't be certain if that is preventing logs to be propagated to the Application insights (in my case). |
@vipinanandcpp |
Regarding the confusing warning message itself, I believe I have discovered the source: The concurrent.futures system that the OpenTelemetry SDK is using to run the resource detectors is not working correctly for processes that can take longer than 5 seconds. I have made an issue in the OTel repo to track this. Again this is unrelated to whether your telemetry is exporting or not. |
The issue stems from an unclear timeout in the OTel SDK. My fix will be in the next release. In order to not trigger the 5 second timeout, the VM Resource Detector now sets its own timeout to 4s. Please update to opentelemetry-resource-detector-azure=0.1.3 |
Describe the bug
Auto instrumentation of FastAPI Python in Azure Container App results in a error:
WARNING:Exception in detector <opentelemetry.resource.detector.azure.vm.AzureVMResourceDetector object at 0x7f011e043ac0>, ignoring
The error pointing to the AzureVM detector seems random to me.
To Reproduce
Steps to reproduce the behavior:
APPLICATIONINSIGHTS_CONNECTION_STRING
to a valid app insights instanceWARNING:Exception in detector <opentelemetry.resource.detector.azure.vm.AzureVMResourceDetector object at 0x7f011e043ac0>, ignoring
main.py:
Dockerfile:
requirements.txt:
Expected behavior
The container app sends logs and metrics to Azure Monitor and the replica is healthy.
Screenshots
The text was updated successfully, but these errors were encountered: