Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Sibly [chullybun] <eric.sibly@avanade.com>
  • Loading branch information
chullybun authored Oct 12, 2023
1 parent 15e4765 commit 660e7d5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/CoreEx.Azure/ServiceBus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,14 @@ To get further insights into the processing of the messages an [`IEventSubscribe
An example implementation for Azure Application Insights would be similar to as follows:

``` csharp
public class AppInsightInstrumentation : EventSubscriberInstrumentationBase
{
private readonly TelemetryClient _telemetryClient;

public AppInsightInstrumentation(TelemetryClient telemetryClient)
=> _telemetryClient = telemetryClient ?? throw new ArgumentNullException(nameof(telemetryClient));

```
public override void Instrument(ErrorHandling? errorHandling = null, Exception? exception = null)
=> _telemetryClient.TrackEvent(GetInstrumentName("Subscriber", errorHandling, exception));
}
```

0 comments on commit 660e7d5

Please sign in to comment.