Skip to content

TelemetryConfiguration.Active #206

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@ current active *telemetry configuration* which is already initialised in most ap
Functions etc.:

```csharp
// TelemetryConfiguration.Active is obsolete
// https://github.com/microsoft/ApplicationInsights-dotnet/pull/1148
Comment on lines +13 to +14

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// TelemetryConfiguration.Active is obsolete
// https://github.com/microsoft/ApplicationInsights-dotnet/pull/1148

No need to add this for readme

var log = new LoggerConfiguration()
.WriteTo.ApplicationInsights(TelemetryConfiguration.Active, TelemetryConverter.Traces)
.WriteTo.ApplicationInsights(TelemetryConfiguration.CreateDefault(), TelemetryConverter.Traces)
.CreateLogger();
```

.. or as `EventTelemetry`:

```csharp
// TelemetryConfiguration.Active is obsolete
// https://github.com/microsoft/ApplicationInsights-dotnet/pull/1148
Comment on lines +23 to +24

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// TelemetryConfiguration.Active is obsolete
// https://github.com/microsoft/ApplicationInsights-dotnet/pull/1148

No need to add this for readme

var log = new LoggerConfiguration()
.WriteTo.ApplicationInsights(TelemetryConfiguration.Active, TelemetryConverter.Events)
.WriteTo.ApplicationInsights(TelemetryConfiguration.CreateDefault(), TelemetryConverter.Events)
.CreateLogger();
```

Expand Down