Adding server telemetry channel, adaptive sampling and making Active as default configuraiton. #157
Conversation
…tive) and removing existing configure option to create config
…nal parameter to disable them.
"runtime": "clr", | ||
"version": "1.0.0-rc1-update1" | ||
"version": "1.0.0-rc1-update2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be update3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version corresponds to the dnx runtime. They have updated the run time version, and I referred to the latest available one.
@@ -38,10 +40,10 @@ public static IApplicationBuilder UseApplicationInsightsExceptionTelemetry(this | |||
return app.UseMiddleware<ExceptionTrackingMiddleware>(); | |||
} | |||
|
|||
public static void AddApplicationInsightsTelemetry(this IServiceCollection services, IConfiguration config, bool reuseActiveConfig = true) | |||
public static void AddApplicationInsightsTelemetry(this IServiceCollection services, IConfiguration config, bool disableDefaultAdaptiveSampling = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chatted with David, let's discuss this some more tomorrow before we merge to master.
- Consider wrapping this flag in a config structure to allow future changes
- Customers who onboarded to previous version with reuseActiveConfig will not be able to notice anything changed and the fact that now this flag has completely different meaning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let us discuss about using the config. However, "reuseActiveConfig" was never available for customers. It is always in develop, and we planned to have it in this merge to master.
Adding server telemetry channel, enabling sampling (with default adaptive) and removing existing configure option to create config.
config.TelemetryChannel
only in full framework, and if no other telemetry channel exists in services (in which case,config.TelemetryChannel
will be the existing channel in services).DisableSampling
when adding Application Insights through services ->services.AddApplicationInsightsTelemetry(config, true)
. This will not addAdaptiveSamplingTelemetryProcessor
which is added by default in the other case.services.AddApplicationInsightsTelemetry
to control the usage ofTelemetryConfiguration.Active
vsTelemetryConfiguration.CreateDefault()
is removed andActive
is used in all the scenarios.Note: By default, now, server telemetry channel will be used to send the telemetry, as opposed to InMemoryChannel. If customers have to use their specific channel, they can add channel to the services, and we pick that instead of our default channels.