Skip to content

Commit 2850941

Browse files
Merge pull request #247616 from AaronMaxwell/aaronmax-connection-string-secret-fix-2
Removing inaccurate connection string guidance
2 parents e050b8d + 46761f3 commit 2850941

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

articles/azure-monitor/app/sdk-connection-string.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ A connection string consists of a list of settings represented as key-value pair
5959
#### Syntax
6060

6161
- `InstrumentationKey` (for example, 00000000-0000-0000-0000-000000000000).
62-
This is a *required* field.
62+
`InstrumentationKey` is a *required* field.
6363
- `Authorization` (for example, ikey). This setting is optional because today we only support ikey authorization.
6464
- `EndpointSuffix` (for example, applicationinsights.azure.cn).
65-
Setting the endpoint suffix will instruct the SDK on which Azure cloud to connect to. The SDK will assemble the rest of the endpoint for individual services.
65+
Setting the endpoint suffix tells the SDK which Azure cloud to connect to. The SDK assembles the rest of the endpoint for individual services.
6666
- Explicit endpoints.
6767
Any service can be explicitly overridden in the connection string:
6868
- `IngestionEndpoint` (for example, `https://dc.applicationinsights.azure.com`)
@@ -105,7 +105,7 @@ Here are some examples of connection strings.
105105

106106
`InstrumentationKey=00000000-0000-0000-0000-000000000000;EndpointSuffix=ai.contoso.com;`
107107

108-
In this example, the connection string specifies the endpoint suffix and the SDK will construct service endpoints:
108+
In this example, the connection string specifies the endpoint suffix and the SDK constructs service endpoints:
109109

110110
- Authorization scheme defaults to "ikey"
111111
- Instrumentation key: 00000000-0000-0000-0000-000000000000
@@ -119,7 +119,7 @@ In this example, the connection string specifies the endpoint suffix and the SDK
119119

120120
`InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://custom.com:111/;LiveEndpoint=https://custom.com:222/;ProfilerEndpoint=https://custom.com:333/;SnapshotEndpoint=https://custom.com:444/;`
121121

122-
In this example, the connection string specifies explicit overrides for every service. The SDK will use the exact endpoints provided without modification:
122+
In this example, the connection string specifies explicit overrides for every service. The SDK uses the exact endpoints provided without modification:
123123

124124
- Authorization scheme defaults to "ikey"
125125
- Instrumentation key: 00000000-0000-0000-0000-000000000000
@@ -180,9 +180,6 @@ Connection string: `APPLICATIONINSIGHTS_CONNECTION_STRING`
180180
builder.Services.AddApplicationInsightsTelemetry(options: options);
181181
```
182182

183-
> [!NOTE]
184-
> When deploying applications to Azure in production scenarios, consider placing connection strings or other configuration secrets in secure locations such as App Service configuration settings or Azure Key Vault. Avoid including secrets in your application code or checking them into source control where they might be exposed or misused. The preceding code example will also work if the connection string is stored in App Service configuration settings. Learn more about [configuring App Service settings](/azure/app-service/configure-common).
185-
186183
# [.NET Framework](#tab/dotnet-framework)
187184

188185
Set the property [TelemetryConfiguration.ConnectionString](https://github.com/microsoft/ApplicationInsights-dotnet/blob/add45ceed35a817dc7202ec07d3df1672d1f610d/BASE/src/Microsoft.ApplicationInsights/Extensibility/TelemetryConfiguration.cs#L271-L274) or [ApplicationInsightsServiceOptions.ConnectionString](https://github.com/microsoft/ApplicationInsights-dotnet/blob/81288f26921df1e8e713d31e7e9c2187ac9e6590/NETCORE/src/Shared/Extensions/ApplicationInsightsServiceOptions.cs#L66-L69).

0 commit comments

Comments
 (0)