ServerTelemetryChannel
When I added support for connection strings, I introduced a bug in ServerTelemetryChannel as reported here ServerTelemetryChannel does not respect what is passed via ApplicationInsights.config #1637
public void Initialize ( TelemetryConfiguration configuration )
{
if ( configuration == null )
{
throw new ArgumentNullException ( nameof ( configuration ) ) ;
}
this . Transmitter . Initialize ( ) ;
this . EndpointAddress = new Uri ( configuration . EndpointContainer . Ingestion , "v2/track" ) . AbsoluteUri ;
// ApplyPolicies will synchronously get list of file names from disk and calculate size
// Creating task to improve application startup time
ExceptionHandler . Start ( ( ) => { return Task . Run ( ( ) => this . Transmitter . ApplyPolicies ( ) ) ; } ) ;
this . isInitialized = true ;
}
ServerTelemetryChannel is erroneously overwriting the Endpoint address on Initialization.
QuickPulseTelemetryModule
QuickPulseTelemetryModule needs additional work to support manual configuration.
This example from the apmtips blog does not work for connection strings.
TelemetryConfiguration configuration = new TelemetryConfiguration();
configuration.InstrumentationKey = "9d3ebb4f-7a11-4fb1-91ac-7ca8a17a27eb";
QuickPulseTelemetryProcessor processor = null;
configuration.TelemetryProcessorChainBuilder
.Use((next) =>
{
processor = new QuickPulseTelemetryProcessor(next);
return processor;
})
.Build();
var QuickPulse = new QuickPulseTelemetryModule();
QuickPulse.Initialize(configuration);
QuickPulse.RegisterTelemetryProcessor(processor);
When I added support for connection strings, I introduced a bug in ServerTelemetryChannel as reported here ServerTelemetryChannel does not respect what is passed via ApplicationInsights.config #1637
ApplicationInsights-dotnet/BASE/src/ServerTelemetryChannel/ServerTelemetryChannel.cs
Lines 317 to 333 in b7cc9ff
ServerTelemetryChannel is erroneously overwriting the Endpoint address on Initialization.
QuickPulseTelemetryModule needs additional work to support manual configuration.
This example from the apmtips blog does not work for connection strings.