-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Live metrics span processor causes Invalid URL internal error in NextJS #32684
Comments
I have made a workaround span processor which fixes the failing spans by appending http url if missing
|
There is a similar issue when accessing live metrics in Azure Application Insight
|
Thank you @AyronK for reporting the issue and the excellent workaround for the moment. I'll work on getting a fix out and update this thread when it's available. |
Hello Guys! I attached
ai-instrumentation.ts
instrumentation.js
src/app/api/auth/[...nextauth]/route.ts
Maybe I do something wrong? |
@stsiushkevich I don't think this has anything to do with this issue, this is not even a minimal reproduction setup as you're calling the tracking code from yet another plugin - next-auth. |
@JacksonWeber amazing, thank you for quick response! |
Describe the bug
A clear and concise description of what the bug is.
Enabling live metrics in
useAzureMonitor
causes NextJS app to critically fail whenever a live metrics connection is made in Azure Portal. The error happens regardless of Next version (tested both v15 and v14).To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Invalid URL
andwrite after end
internal error should not cause the application using @azure/monitor-opentelemetry to fail completely. In case of configuration error the plugin should gently handle the issue and close live metrics connection without failing the application using it.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Repository with minimal reproduction steps:
https://github.com/[AyronK/azure-open-telemetry-repro-steps](https://github.com/AyronK/azure-open-telemetry-repro-steps)
The problem must come from this method returning empty string in some cases
azure-sdk-for-js/sdk/monitor/monitor-opentelemetry/src/metrics/quickpulse/utils.ts
Lines 473 to 507 in ca7b1eb
azure-sdk-for-js/sdk/monitor/monitor-opentelemetry/src/metrics/quickpulse/utils.ts
Lines 230 to 231 in ca7b1eb
The text was updated successfully, but these errors were encountered: