Skip to content

Commit 0dc581b

Browse files
Merge pull request #247656 from AaronMaxwell/aaronmax-otel-add-modify-filter
Retitle and update headings
2 parents 3a8b1ba + 3ac8f1e commit 0dc581b

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

articles/azure-monitor/app/opentelemetry-add-modify.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Add and modify Azure Monitor OpenTelemetry for .NET, Java, Node.js, and Python applications
3-
description: This article provides guidance on how to add and modify OpenTelemetry for applications using Azure Monitor.
2+
title: Add, modify, and filter Azure Monitor OpenTelemetry for .NET, Java, Node.js, and Python applications
3+
description: This article provides guidance on how to add, modify, and filter OpenTelemetry for applications using Azure Monitor.
44
ms.topic: conceptual
55
ms.date: 06/22/2023
66
ms.devlang: csharp, javascript, typescript, python
77
ms.custom: devx-track-dotnet, devx-track-extended-java, devx-track-python
88
ms.reviewer: mmcc
99
---
1010

11-
# Add and modify OpenTelemetry
11+
# Add, modify, and filter OpenTelemetry
1212

13-
This article provides guidance on how to add and modify OpenTelemetry for applications using [Azure Monitor Application Insights](app-insights-overview.md#application-insights-overview).
13+
This article provides guidance on how to add, modify, and filter OpenTelemetry for applications using [Azure Monitor Application Insights](app-insights-overview.md#application-insights-overview).
1414

1515
To learn more about OpenTelemetry concepts, see the [OpenTelemetry overview](opentelemetry-overview.md) or [OpenTelemetry FAQ](/azure/azure-monitor/faq#opentelemetry).
1616

@@ -1599,11 +1599,11 @@ logger.warning("WARNING: Warning log with properties", extra={"key1": "value1"})
15991599

16001600
---
16011601

1602-
### Filter telemetry
1602+
## Filter telemetry
16031603

16041604
You might use the following ways to filter out telemetry before it leaves your application.
16051605

1606-
#### [ASP.NET Core](#tab/aspnetcore)
1606+
### [ASP.NET Core](#tab/aspnetcore)
16071607

16081608
1. Many instrumentation libraries provide a filter option. For guidance, see the readme files of individual instrumentation libraries:
16091609
- [ASP.NET Core](https://github.com/open-telemetry/opentelemetry-dotnet/blob/1.0.0-rc9.14/src/OpenTelemetry.Instrumentation.AspNetCore/README.md#filter)
@@ -1644,7 +1644,7 @@ You might use the following ways to filter out telemetry before it leaves your a
16441644

16451645
1. If a particular source isn't explicitly added by using `AddSource("ActivitySourceName")`, then none of the activities created by using that source are exported.
16461646

1647-
#### [.NET](#tab/net)
1647+
### [.NET](#tab/net)
16481648

16491649
1. Many instrumentation libraries provide a filter option. For guidance, see the readme files of individual instrumentation libraries:
16501650
- [ASP.NET](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNet-1.0.0-rc9.8/src/OpenTelemetry.Instrumentation.AspNet/README.md#filter)
@@ -1680,11 +1680,11 @@ You might use the following ways to filter out telemetry before it leaves your a
16801680
1. If a particular source isn't explicitly added by using `AddSource("ActivitySourceName")`, then none of the activities created by using that source are exported.
16811681

16821682

1683-
#### [Java](#tab/java)
1683+
### [Java](#tab/java)
16841684

16851685
See [sampling overrides](java-standalone-config.md#sampling-overrides-preview) and [telemetry processors](java-standalone-telemetry-processors.md).
16861686

1687-
#### [Node.js](#tab/nodejs)
1687+
### [Node.js](#tab/nodejs)
16881688

16891689
1. Exclude the URL option provided by many HTTP instrumentation libraries.
16901690

@@ -1735,7 +1735,7 @@ Use the add [custom property example](#add-a-custom-property-to-a-span), but rep
17351735
}
17361736
```
17371737

1738-
#### [Python](#tab/python)
1738+
### [Python](#tab/python)
17391739

17401740
1. Exclude the URL with the `OTEL_PYTHON_EXCLUDED_URLS` environment variable:
17411741
```
@@ -1801,11 +1801,11 @@ Use the add [custom property example](#add-a-custom-property-to-a-span), but rep
18011801

18021802
<!-- For more information, see [GitHub Repo](link). -->
18031803

1804-
### Get the trace ID or span ID
1804+
## Get the trace ID or span ID
18051805

18061806
You might want to get the trace ID or span ID. If you have logs sent to a destination other than Application Insights, consider adding the trace ID or span ID. Doing so enables better correlation when debugging and diagnosing issues.
18071807

1808-
#### [ASP.NET Core](#tab/aspnetcore)
1808+
### [ASP.NET Core](#tab/aspnetcore)
18091809

18101810
> [!NOTE]
18111811
> The `Activity` and `ActivitySource` classes from the `System.Diagnostics` namespace represent the OpenTelemetry concepts of `Span` and `Tracer`, respectively. That's because parts of the OpenTelemetry tracing API are incorporated directly into the .NET runtime. To learn more, see [Introduction to OpenTelemetry .NET Tracing API](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Api/README.md#introduction-to-opentelemetry-net-tracing-api).
@@ -1816,7 +1816,7 @@ string traceId = activity?.TraceId.ToHexString();
18161816
string spanId = activity?.SpanId.ToHexString();
18171817
```
18181818

1819-
#### [.NET](#tab/net)
1819+
### [.NET](#tab/net)
18201820

18211821
> [!NOTE]
18221822
> The `Activity` and `ActivitySource` classes from the `System.Diagnostics` namespace represent the OpenTelemetry concepts of `Span` and `Tracer`, respectively. That's because parts of the OpenTelemetry tracing API are incorporated directly into the .NET runtime. To learn more, see [Introduction to OpenTelemetry .NET Tracing API](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Api/README.md#introduction-to-opentelemetry-net-tracing-api).
@@ -1827,7 +1827,7 @@ string traceId = activity?.TraceId.ToHexString();
18271827
string spanId = activity?.SpanId.ToHexString();
18281828
```
18291829

1830-
#### [Java](#tab/java)
1830+
### [Java](#tab/java)
18311831

18321832
You can use `opentelemetry-api` to get the trace ID or span ID.
18331833

@@ -1851,7 +1851,7 @@ You can use `opentelemetry-api` to get the trace ID or span ID.
18511851
String spanId = span.getSpanContext().getSpanId();
18521852
```
18531853

1854-
#### [Node.js](#tab/nodejs)
1854+
### [Node.js](#tab/nodejs)
18551855

18561856
Get the request trace ID and the span ID in your code:
18571857

@@ -1862,7 +1862,7 @@ Get the request trace ID and the span ID in your code:
18621862
let traceId = trace.getActiveSpan().spanContext().traceId;
18631863
```
18641864

1865-
#### [Python](#tab/python)
1865+
### [Python](#tab/python)
18661866

18671867
Get the request trace ID and the span ID in your code:
18681868

0 commit comments

Comments
 (0)