Skip to content

Application Insights SDK sending data to unexpected endpoint, why? #2983

@xiaomi7732

Description

@xiaomi7732

We have some legacy code that parse and set the endpoint manually, for example:

            _telemetryConfig = TelemetryConfiguration.CreateDefault();
            var telemetryChannel = new ServerTelemetryChannel();
            // Set to: `https://westus2-2.in.applicationinsights.azure.com/v2/track/`, the app insights is in west us 2.
            telemetryChannel.EndpointAddress = Endpoints.AdaptIngestionEndpoint(endpointAddress).AbsoluteUri;

            _telemetryConfig.TelemetryChannel = telemetryChannel;
            // We understand that ikey is obsoleted. Should use connection string instead.
            _telemetryConfig.InstrumentationKey = instrumentationKey;

            var identityTelemetryModule = new ApplicationInsightsIdentityTelemetryModule();
            identityTelemetryModule.Initialize(_telemetryConfig); // Setup the Credential Envlope

            telemetryChannel.Initialize(_telemetryConfig);

            _client = new TelemetryClient(_telemetryConfig);
...
  • AAD auth is enabled.

The behavior that we have been seeing, is that at the beginning of the app running, telemetries are ingested successfully to the correct region, the effect endpoint is https://westus2-2.in.applicationinsights.azure.com/v2.1/track.

However, after a couple of hours running, the payloads will be sent to east us 2, and got dropped on the breeze side:

Image

What could cause this behavior? Will using the connection string instead fixing the issue for us?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions