We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We should investigate better support for Blazor Server
Could include a new package, or might just need improved guidance docs.
Also related: #1685
The text was updated successfully, but these errors were encountered:
Hi,
is there any progress on this topic? Or maybe a best practice to implement a custom tracing?
I tried the following approach, but I'm not sure if this is correct. Every Page I want to include inherits from this page.
public abstract partial class AbstractPage { private ITransaction _transaction; private ISpan _span; private string _currentUri; public override Task SetParametersAsync(ParameterView parameters) { _currentUri = NavigationManager.Uri; Console.Write($@"SetParameters {_currentUri}"); _transaction = SentrySdk.StartTransaction( NavigationManager.Uri, // name NavigationManager.Uri // operation ); // Validate the cart _span = _transaction.StartChild( GetType().Name, // operation "init" // description ); // Set transaction on scope to associate with errors and get included span instrumentation // If there's currently an unfinished transaction, it may be dropped SentrySdk.ConfigureScope(scope => scope.Transaction = _transaction); return base.SetParametersAsync(parameters); } protected override Task OnInitializedAsync() { Console.Write($@"OnInitialized {_currentUri}"); return base.OnInitializedAsync(); } protected override Task OnAfterRenderAsync(bool firstRender) { if(firstRender) { Console.Write($@"OnAfterRender first {_currentUri}"); _span?.Finish(); _transaction?.Finish(); } else { Console.Write($@"OnAfterRender {_currentUri} "); } return base.OnAfterRenderAsync(firstRender); } }
Sorry, something went wrong.
No branches or pull requests
Problem Statement
We should investigate better support for Blazor Server
Solution Brainstorm
Could include a new package, or might just need improved guidance docs.
Also related: #1685
The text was updated successfully, but these errors were encountered: