Skip to content

Commit 116d218

Browse files
authored
Merge pull request #112104 from mrbullwinkle/mrb_04_20_2020_connection_strings
update doc to reference connection strings
2 parents efad7fe + 4ac2d8f commit 116d218

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

articles/azure-monitor/app/custom-endpoints.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ ms.date: 07/26/2019
1010

1111
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.
1212

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+
1318
## SDK code changes
1419

15-
### .NET with applicationinsights.config
20+
# [.NET](#tab/net)
1621

1722
> [!NOTE]
1823
> 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
3742
</ApplicationInsights>
3843
```
3944

40-
### ASP.NET Core
45+
# [.NET Core](#tab/netcore)
4146

4247
Modify the appsettings.json file in your project as follows to adjust the main endpoint:
4348

@@ -65,6 +70,8 @@ using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPuls
6570
//Place in the ConfigureServices method. Place this before services.AddApplicationInsightsTelemetry("instrumentation key"); if it's present
6671
```
6772

73+
# [Azure Functions](#tab/functions)
74+
6875
### Azure Functions v2.x
6976

7077
Install the following packages in your function project:
@@ -116,7 +123,7 @@ namespace Example
116123
}
117124
```
118125

119-
### Java
126+
# [Java](#tab/java)
120127

121128
Modify the applicationinsights.xml file to change the default endpoint address.
122129

@@ -151,7 +158,7 @@ Modify the `application.properties` file and add:
151158
azure.application-insights.channel.in-process.endpoint-address= TelemetryChannel_Endpoint_Address
152159
```
153160

154-
### Node.js
161+
# [Node.js](#tab/nodejs)
155162

156163
```javascript
157164
var appInsights = require("applicationinsights");
@@ -170,7 +177,7 @@ Profile Endpoint: "Profile_Query_Endpoint_address"
170177
Live Metrics Endpoint: "QuickPulse_Endpoint_Address"
171178
```
172179

173-
### JavaScript
180+
# [JavaScript](#tab/js)
174181

175182
```javascript
176183
<script type="text/javascript">
@@ -183,10 +190,12 @@ Live Metrics Endpoint: "QuickPulse_Endpoint_Address"
183190
</script>
184191
```
185192

186-
### Python
193+
# [Python](#tab/python)
187194

188195
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)
189196

197+
---
198+
190199
## Regions that require endpoint modification
191200

192201
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

Comments
 (0)