-
-
Notifications
You must be signed in to change notification settings - Fork 7
Signal Tracers
Bozhidar Zashev edited this page Jun 1, 2025
·
3 revisions
By signals you can trace an event happening within your components in detail, that can be tracked by its name or custom data. All calls are processed in a different thread and are not influencing your method execution time. Signals can be called not only from Blazor components but also from other service methods.
Here is an example:
private void _countTest()
{
_counter++;
WvBlazorTraceService.OnSignal(caller: this, signalName: "counter");
}The method has the following arguments for fine tuning the trace:
| argument | type | default | description |
|---|---|---|---|
| caller | object (required) | none | the caller instance that calls the method. Usually provided with 'this' |
| signalName | string (required) | none | Unique identifier of the signal |
| instanceTag | string? | null | NULL by default, will group all instances of the caller in the trace. To tag each separate instance of the caller you need to provide unique tag for it. |
| customData | string? | null | custom string or JSON that you need stored with each call for more advanced tracing |
| options | WvTraceSignalOptions | new() | setting up the limits, exceeding which will be presented by the service as a problem |
| methodName | string | automatic | Automatically initialized by [CallerMemberName] atttribute. Override only if you need to. |
The options WvTraceSignalOptions model has the following properties:
| argument | type | default | description |
|---|---|---|---|
| CallLimit | long | 10 | How many calls is OK for this method. |