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-enable.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Please consider carefully whether this preview is right for you. It **enables di
35
35
- Ability to override [Operation Name](correlation.md#data-model-for-telemetry-correlation)
36
36
- Ability to manually set User ID or Authenticated User ID
37
37
- Propagating Operation Name to Dependency Telemetry
38
-
-Distributed Tracing context propagation (instrumentationlibraries) through Azure Functions Worker
38
+
-[Instrumentation libraries](#instrumentation-libraries)support on Azure Functions
39
39
40
40
Those who require a full-feature experience should use the existing Application Insights [ASP.NET](asp-net.md) or [ASP.NET Core](asp-net-core.md) SDK until the OpenTelemetry-based offering matures.
41
41
@@ -76,7 +76,7 @@ Please consider carefully whether this preview is right for you. It **enables di
76
76
- Ability to override [Operation Name](correlation.md#data-model-for-telemetry-correlation)
77
77
- Ability to manually set User ID or Authenticated User ID
78
78
- Propagating Operation Name to Dependency Telemetry
79
-
-Distributed Tracing context propagation (instrumentationlibraries) through Azure Functions Worker
79
+
-[Instrumentation libraries](#instrumentation-libraries)support on Azure Functions
80
80
81
81
Those who require a full-feature experience should use the existing [Application Insights Python-OpenCensus SDK](opencensus-python.md) until the OpenTelemetry-based offering matures.
The following code demonstrates enabling OpenTelemetry in a C# console application by setting up OpenTelemetry TracerProvider. This code must be in the application startup. For ASP.NET Core, it is done typically in the `ConfigureServices` method of application `Startup` class. For ASP.NET applications, it is done typically in `Global.aspx.cs`.
173
+
The following code demonstrates enabling OpenTelemetry in a C# console application by setting up OpenTelemetry TracerProvider. This code must be in the application startup. For ASP.NET Core, it is done typically in the `ConfigureServices` method of application `Startup` class. For ASP.NET applications, it is done typically in `Global.asax.cs`.
174
174
175
175
```csharp
176
176
usingSystem.Diagnostics;
@@ -465,7 +465,7 @@ Span attributes can be added using either of the following two ways.
465
465
1. Using options provided by [instrumentation libraries](#instrumentation-libraries).
466
466
2. Adding a custom span processor.
467
467
468
-
These attributes may include adding a custom business property to your telemetry. You may also use attributes to set optional fields in the Application Insights Schema such as User ID or Client IP.
468
+
These attributes may include adding a custom property to your telemetry. You may also use attributes to set optional fields in the Application Insights Schema such as Client IP.
469
469
470
470
> [!TIP]
471
471
> The advantage of using "options provided by instrumentation libraries" (when available) is that the entire context is available, meaning users can select to add or filter additional attributes. For example, the enrich option the HttpClient instrumentation library includes giving users access to the httpRequestMessage itself, to select anything from it and store it as an attribute.
@@ -594,6 +594,7 @@ You can populate the _client_IP_ field for requests by setting `http.client_ip`
594
594
Use the add [custom property example](#add-custom-property), except change out the following lines of code in `ActivityEnrichingProcessor.cs`:
595
595
596
596
```C#
597
+
// only applicable in case of activity.Kind == Server
0 commit comments