You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/custom-endpoints.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,14 @@ ms.date: 07/26/2019
10
10
11
11
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.
12
12
13
+
> [!NOTE]
14
+
> [Connection strings](https://docs.microsoft.com/azure/azure-monitor/app/sdk-connection-string?tabs=net) are the new preferred method of setting custom endpoints within Application Insights.
15
+
16
+
---
17
+
13
18
## SDK code changes
14
19
15
-
### .NET with applicationinsights.config
20
+
#[.NET](#tab/net)
16
21
17
22
> [!NOTE]
18
23
> 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.
@@ -37,7 +42,7 @@ To send data from Application Insights to certain regions, you'll need to overri
37
42
</ApplicationInsights>
38
43
```
39
44
40
-
### ASP.NET Core
45
+
#[.NET Core](#tab/netcore)
41
46
42
47
Modify the appsettings.json file in your project as follows to adjust the main endpoint:
43
48
@@ -65,6 +70,8 @@ using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPuls
65
70
//Place in the ConfigureServices method. Place this before services.AddApplicationInsightsTelemetry("instrumentation key"); if it's present
66
71
```
67
72
73
+
# [Azure Functions](#tab/functions)
74
+
68
75
### Azure Functions v2.x
69
76
70
77
Install the following packages in your function project:
@@ -116,7 +123,7 @@ namespace Example
116
123
}
117
124
```
118
125
119
-
### Java
126
+
#[Java](#tab/java)
120
127
121
128
Modify the applicationinsights.xml file to change the default endpoint address.
122
129
@@ -151,7 +158,7 @@ Modify the `application.properties` file and add:
Live Metrics Endpoint: "QuickPulse_Endpoint_Address"
171
178
```
172
179
173
-
### JavaScript
180
+
#[JavaScript](#tab/js)
174
181
175
182
```javascript
176
183
<script type="text/javascript">
@@ -183,10 +190,12 @@ Live Metrics Endpoint: "QuickPulse_Endpoint_Address"
183
190
</script>
184
191
```
185
192
186
-
### Python
193
+
#[Python](#tab/python)
187
194
188
195
For guidance on modifying the ingestion endpoint for the opencensus-python SDK consult the [opencensus-python repo.](https://github.com/census-instrumentation/opencensus-python/blob/af284a92b80bcbaf5db53e7e0813f96691b4c696/contrib/opencensus-ext-azure/opencensus/ext/azure/common/__init__.py)
189
196
197
+
---
198
+
190
199
## Regions that require endpoint modification
191
200
192
201
Currently the only regions that require endpoint modifications are [Azure Government](https://docs.microsoft.com/azure/azure-government/documentation-government-services-monitoringandmanagement#application-insights) and [Azure China](https://docs.microsoft.com/azure/china/resources-developer-guide).
0 commit comments