Replies: 1 comment 2 replies
-
Thanks for the question! OpenTelemetry is not supported on Wasm yet, we're working on it, though. (open-telemetry/opentelemetry-dotnet#6379 and open-telemetry/opentelemetry-dotnet#2816) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
we're trying to add telemetry data to our app (which is mainly used as WebAssembly). We're using Azure Application Insights for visualization. And there we want to see (custom) end-to-end-transactions from a mouse-click on the frontend (for example) to all the things that are called on the backend.
Getting things ready on the backend is not really a big deal. With some modification in the middleware and the usage of an ActivitySource it's working as we excpect it.
But things are getting difficult on the frontend side. As far as i understood so far, it's not possible to use an ActivitySource on the frontend and send it directly to the azure endpoint, as we’re trying to make a HTTP request from our WebAssembly component to an external endpoint.
So the only chance we saw was to use the Application Insights JavaScript SDK. With the "trackTrace" method for example it's possible to create a trace that can be seen in the application insights instance. This works fine, but the problem is that every trace gets the same operation-id, so you don't have a way to define your own custom trace. In the end all traces have the same parent (as the operation-id only changes for different pages). I didn't find any way to have a new operation-id for every new custom action.
One workaround for this would be to set a custom operation-id and link the frontend- and backend traces according to these custom operation-ids. But this doesn't feel very comfortable as there would be some additional work also on the Azure side.
Another workaround would be to use an OpenTelemetry collector which first collects all the data and then send it to azure application insights. But before making this effort i wanted to start a discussion here to see if anyone succeeded in a simpler way.
(I had a short talk with @MartinZikmund in your booth at the DWX'25, and if I understood correctly the UNO team has some solution for using OpenTelemetry and Application Insights, but I'm not sure if this is also true for the frontend with custom end-to-end-transactions.
Francois sent this link which was very helpful for understanding things better:
https://newrelic.com/blog/how-to-relic/how-to-observe-your-blazor-webassembly-application-with-opentelemetry-and-real-user-monitoring?utm_source=employee&utm_medium=community&utm_campaign=global-fy25-q1-how-to-observe-your-blazor-webassembly-application-with-opentelemetry-and-real-user-monitoring&es_id=abb896b26c )
Thanks
Alex
Beta Was this translation helpful? Give feedback.
All reactions