-
Notifications
You must be signed in to change notification settings - Fork 4.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
[BUG] Azure.Monitor.OpenTelemetry.AspNetCore 1.0.0-beta.6 does not work #38687
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cijothomas @reyang @rajkumar-rangaraj @TimothyMothra @vishweshbankwar. |
Is the app not starting at all (i.e crashes with exception), or it starts and works fine, but takes much longer time? |
it does not crash, I assume it'll eventually start after it exhausted all retries and timeouts trying to get IMDS from VM, but I did not wait long enough. Either way, it seems VM resource detector is blocking and needs way smaller timeout and no retries. |
Since Resource must be added before building the Providers, this is going to be an issue. Any Detector taking time will add to the startup time.... (Azure/AWS all should have same challenges..) Some possible (not perfect) mitigations: It might be possible for the distro to detect that its is running in appservice (env var check), and then do not add VM detectors. Or modify the AzureVM detector itself to quickly bail out, similar to what legacy sdks do. |
open-telemetry/opentelemetry-dotnet-contrib#1307 |
it seems there is no timeout set on that client https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/src/OpenTelemetry.ResourceDetectors.Azure/AzureVmMetaDataRequestor.cs#L31 and the default value is 100 sec! the IMDS endpoint is local, so it's really reliable. 1 sec would probably be enough. It's something that would block onboarding and work in dev environment and has to be fixed. |
@vishweshbankwar That PR is from a month ago. Do you know when the next release will be? |
Thanks for investigating @lmolkova, would you be able to submit a PR for the quick fix? |
Not this week (and I'm OOf on the next one). The fix is short and simple, but the key part here is testing it - I wonder why it was not detected via automation. |
@TimothyMothra We can get the fix done and request for release next week. |
@lmolkova - Distro should still work with delayed start up time, do you see different behavior?
Are you referring to tests? |
I was not patient enough to wait and I assume it's unreasonable to expect production applications (not running on app serivce of AzureVM) start time to take 100 sec.
Yep, do we have integration tests for distro? If so, why we didn't detect it? |
The integration tests run in an Azure VM and don't have the delay. |
I believe this issue can be closed. The root cause was related to Timeouts for Azure VM Metadata service. This has been fixed in both the Exporter and ResourceDetector. |
Library name and version
Azure.Monitor.OpenTelemetry.AspNetCore 1.0.0-beta.6
Describe the bug
When using Azure.Monitor.OpenTelemetry.AspNetCore 1.0.0-beta.6 in .NET 7 minimal API ASP.NET Core app running on localhost, my application does not start within ~30 sec.
It works perfectly fine with Azure.Monitor.OpenTelemetry.AspNetCore 1.0.0-beta.5.
If I debug the application, I can see a bunch of
HttpRequestException
potentially trying to resolve resourcesExpected behavior
Application starts and reports telemetry
Actual behavior
Application does not start
Reproduction Steps
app:
Environment
No response
The text was updated successfully, but these errors were encountered: