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/opentelemetry-configuration.md
+61-4Lines changed: 61 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,42 @@ A connection string in Application Insights defines the target location for send
20
20
21
21
### [.NET](#tab/net)
22
22
23
-
Currently unavailable.
23
+
Use one of the following three ways to configure the connection string:
24
+
25
+
- Add `UseAzureMonitor()` to your application startup. Depending on your version of .NET, this will be in either your `startup.cs` or `program.cs` class.
| `OTEL_RESOURCE_ATTRIBUTES` |Key-valuepairstobeusedasresourceattributes. Seethe [ResourceSDKspecification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.5.0/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable) for more details. |
456
+
| `OTEL_SERVICE_NAME` |Setsthevalueofthe `service.name` resourceattribute. If `service.name` isalsoprovidedin `OTEL_RESOURCE_ATTRIBUTES`, then `OTEL_SERVICE_NAME` takesprecedence. |
@@ -1314,11 +1270,11 @@ To add span attributes, use either of the following two ways:
1314
1270
* Add a custom span processor.
1315
1271
1316
1272
> [!TIP]
1317
-
> The advantage of using options provided by instrumentation libraries, when they're available, is that the entire context is available. As a result, users can select to add or filter more attributes. For example, the enrich option in the HttpClient instrumentation library gives users access to the httpRequestMessageitself. They can select anything from it and store it as an attribute.
1273
+
> The advantage of using options provided by instrumentation libraries, when they're available, is that the entire context is available. As a result, users can select to add or filter more attributes. For example, the enrich option in the HttpClient instrumentation library gives users access to the [HttpRequestMessage](/dotnet/api/system.net.http.httprequestmessage) and the [HttpResponseMessage](/dotnet/api/system.net.http.httpresponsemessage)itself. They can select anything from it and store it as an attribute.
1318
1274
1319
1275
1. Many instrumentation libraries provide an enrich option. For guidance, see the readme files of individual instrumentation libraries:
- [HttpClient and HttpWebRequest](https://github.com/open-telemetry/opentelemetry-dotnet/blob/1.0.0-rc9.14/src/OpenTelemetry.Instrumentation.Http/README.md#enrich)
0 commit comments