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

Example code for Blazor Server-Side? #8548

Closed
crmckinnon opened this issue Jun 1, 2022 · 1 comment
Closed

Example code for Blazor Server-Side? #8548

crmckinnon opened this issue Jun 1, 2022 · 1 comment
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@crmckinnon
Copy link

crmckinnon commented Jun 1, 2022

Hi,

I'm curious if there is any example code for setting up Cloud Trace for Blazor Server-Side?

I've been trying to get it working using the following code example:
#6367 (comment)

And the common Razor component used by this library:
https://github.com/IvanJosipovic/BlazorApplicationInsights/
https://github.com/IvanJosipovic/BlazorApplicationInsights/blob/master/src/BlazorApplicationInsights/ApplicationInsightsComponent.razor.cs

I currently seem to always get a NullManagedTracer at this point.

@amanda-tarafa amanda-tarafa self-assigned this Jun 1, 2022
@amanda-tarafa amanda-tarafa added the type: question Request for information or clarification. Not an issue. label Jun 1, 2022
@amanda-tarafa
Copy link
Contributor

I'm sorry but we don't explicitly support Blazor so there's no guarantee that it will work out of the box.

The sample code you referenced should serve as the basis for specific implementations but maybe you are missing what would be the Middleware equivalent in Blazor? That's what should capture the incoming trace and initialize the tracer with it. I'm sorry I'm not familiar enough with Blazor to help you there.

I'll be closing this issue now as there's not much more we can do here, but do feel free to create new issues if you have trouble with the Diagnostics library independent from Blazor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants