Application Insights overriding default endpoints
To send data from Application Insights to certain regions, you'll need to override the default endpoint addresses. Each SDK requires slightly different modifications, all of which are described in this article. These changes require adjusting the sample code and replacing the placeholder values for QuickPulse_Endpoint_Address, TelemetryChannel_Endpoint_Address, and Profile_Query_Endpoint_address with the actual endpoint addresses for your specific region. The end of this article contains links to the endpoint addresses for regions where this configuration is required.
Note
On March 31st, 2025, support for instrumentation key ingestion will end. Instrumentation key ingestion will continue to work, but we’ll no longer provide updates or support for the feature. Transition to connection strings to take advantage of new capabilities.
SDK code changes
Note
The applicationinsights.config file is automatically overwritten anytime a SDK upgrade is performed. After performing an SDK upgrade be sure to re-enter the region specific endpoint values.
<ApplicationInsights>
...
<TelemetryModules>
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector">
<QuickPulseServiceEndpoint>Custom_QuickPulse_Endpoint_Address</QuickPulseServiceEndpoint>
</Add>
</TelemetryModules>
...
<TelemetrySinks>
<Add Name = "default">
<TelemetryChannel>
<EndpointAddress>TelemetryChannel_Endpoint_Address</EndpointAddress>
</TelemetryChannel>
</Add>
</TelemetrySinks>
...
<ApplicationIdProvider Type="Microsoft.ApplicationInsights.Extensibility.Implementation.ApplicationId.ApplicationInsightsApplicationIdProvider, Microsoft.ApplicationInsights">
<ProfileQueryEndpoint>Profile_Query_Endpoint_address</ProfileQueryEndpoint>
</ApplicationIdProvider>
...
</ApplicationInsights>
Regions that require endpoint modification
Currently the only regions that require endpoint modifications are Azure Government and Azure China.
| Region | Endpoint Name | Value |
|---|---|---|
| Azure China | Telemetry Channel | https://dc.applicationinsights.azure.cn/v2/track |
| Azure China | QuickPulse (Live Metrics) | https://live.applicationinsights.azure.cn/QuickPulseService.svc |
| Azure China | Profile Query | https://dc.applicationinsights.azure.cn/api/profiles/{0}/appId |
| Azure Government | Telemetry Channel | https://dc.applicationinsights.us/v2/track |
| Azure Government | QuickPulse (Live Metrics) | https://quickpulse.applicationinsights.us/QuickPulseService.svc |
| Azure Government | Profile Query | https://dc.applicationinsights.us/api/profiles/{0}/appId |
If you currently use the Application Insights REST API which is normally accessed via `api.applicationinsights.io' you will need to use an endpoint that is local to your region:
| Region | Endpoint Name | Value |
|---|---|---|
| Azure China | REST API | api.applicationinsights.azure.cn |
| Azure Government | REST API | api.applicationinsights.us |
Next steps
- To learn more about the custom modifications for Azure Government, consult the detailed guidance for Azure monitoring and management.
- To learn more about Azure China, consult the Azure China Playbook.
Povratne informacije
Pošalјite i prikažite povratne informacije za