Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
/ ServerCommon Public archive

Support already configured TelemetryConfiguration for LoggingSetup #324

Merged
merged 2 commits into from
Dec 10, 2019

Conversation

xavierdecoster
Copy link
Member

The LoggingSetup should no longer use the TelemetryConfiguration.Active static, and must support providing an already configured TelemetryConfiguration instance again.

Even though this method call is marked [Obsolete] for this SeriLog sink, there's currently no other way to pass in the active TelemetryConfiguration as configured in DI.

These SeriLog APIs are very likely to change again to support passing in the TelemetryConfiguration somehow, in light of TelemetryConfiguration.Active being deprecated by AI.

See also serilog-contrib/serilog-sinks-applicationinsights#121.

@@ -59,7 +59,7 @@ public TelemetryClientWrapper(TelemetryClient telemetryClient)
{
Timestamp = timestamp,
Name = metricName,
Value = value
Sum = value
Copy link
Member Author

Choose a reason for hiding this comment

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

Whilst at it: the MetricTelemetry.Value property is also obsolete and replaced by Sum

Copy link
Contributor

@skofman1 skofman1 left a comment

Choose a reason for hiding this comment

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

:shipit:

@xavierdecoster xavierdecoster merged commit b107552 into master Dec 10, 2019
@xavierdecoster xavierdecoster deleted the dev-loggingtoAI branch December 10, 2019 07:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants