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
- Check out [platforms](./app-insights-overview.md#supported-languages) supported by Application Insights.
441
-
- Check out standard context properties collection [configuration](./configuration-with-applicationinsights-config.md#telemetry-initializers-aspnet).
442
-
- Explore [.NET trace logs in Application Insights](./asp-net-trace-logs.md).
443
-
- Explore [Java trace logs in Application Insights](./opentelemetry-add-modify.md?tabs=java##send-custom-telemetry-using-the-application-insights-classic-api).
444
-
- Learn about the [Azure Functions built-in integration with Application Insights](../../azure-functions/functions-monitoring.md?toc=/azure/azure-monitor/toc.json) to monitor functions executions.
445
-
- Learn how to [configure an ASP.NET Core](./asp-net.md) application with Application Insights.
446
-
- Learn how to [diagnose exceptions in your web apps with Application Insights](./asp-net-exceptions.md).
447
-
- Learn how to [extend and filter telemetry](./api-filtering-sampling.md).
448
-
- Use [sampling](./sampling.md) to minimize the amount of telemetry based on data model.
440
+
* Check out [platforms](./app-insights-overview.md#supported-languages) supported by Application Insights.
441
+
* Check out standard context properties collection [configuration](./configuration-with-applicationinsights-config.md#telemetry-initializers-aspnet).
442
+
* Explore [.NET trace logs in Application Insights](./asp-net-trace-logs.md).
443
+
* Explore [Java trace logs in Application Insights](./opentelemetry-add-modify.md?tabs=java#send-custom-telemetry-using-the-application-insights-classic-api).
444
+
* Learn about the [Azure Functions built-in integration with Application Insights](../../azure-functions/functions-monitoring.md?toc=/azure/azure-monitor/toc.json) to monitor functions executions.
445
+
* Learn how to [configure an ASP.NET Core](./asp-net.md) application with Application Insights.
446
+
* Learn how to [diagnose exceptions in your web apps with Application Insights](./asp-net-exceptions.md).
447
+
* Learn how to [extend and filter telemetry](./api-filtering-sampling.md).
448
+
* Use [sampling](./sampling.md) to minimize the amount of telemetry based on data model.
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/opentelemetry-add-modify.md
+33-33Lines changed: 33 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -280,7 +280,7 @@ You can collect more data automatically when you include instrumentation librari
280
280
To add a community library, use the `ConfigureOpenTelemetryMeterProvider` or `ConfigureOpenTelemetryTracerProvider` methods,
281
281
after adding the nuget package for the library.
282
282
283
-
The following example demonstrates how the [Runtime Instrumentation](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) can be added to collect extra metrics.
283
+
The following example demonstrates how the [Runtime Instrumentation](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) can be added to collect extra metrics:
The following example demonstrates how the [Runtime Instrumentation](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) can be added to collect extra metrics.
309
+
The following example demonstrates how the [Runtime Instrumentation](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) can be added to collect extra metrics:
310
310
311
311
```csharp
312
312
// Create a new OpenTelemetry meter provider and add runtime instrumentation and the Azure Monitor metric exporter.
@@ -326,7 +326,7 @@ You can't use commmunity instrumentation libraries with GraalVM Java native appl
326
326
327
327
#### [Node.js](#tab/nodejs)
328
328
329
-
Other OpenTelemetry Instrumentations are available [here](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node) and could be added using TraceHandler in ApplicationInsightsClient.
329
+
Other OpenTelemetry Instrumentations are available [here](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node) and could be added using TraceHandler in ApplicationInsightsClient:
330
330
331
331
```javascript
332
332
// Import the Azure Monitor OpenTelemetry plugin and OpenTelemetry API
@@ -456,7 +456,7 @@ describes the instruments and provides examples of when you might use each one.
456
456
457
457
##### [ASP.NET Core](#tab/aspnetcore)
458
458
459
-
Application startup must subscribe to a Meter by name.
459
+
Application startup must subscribe to a Meter by name:
460
460
461
461
```csharp
462
462
// Create a new ASP.NET Core web application builder.
@@ -476,7 +476,7 @@ var app = builder.Build();
476
476
app.Run();
477
477
```
478
478
479
-
The `Meter` must be initialized using that same name.
479
+
The `Meter` must be initialized using that same name:
480
480
481
481
```csharp
482
482
// Create a new meter named "OTel.AzureMonitor.Demo".
Application startup must subscribe to a Meter by name.
657
+
Application startup must subscribe to a Meter by name:
658
658
659
659
```csharp
660
660
// Create a new ASP.NET Core web application builder.
@@ -674,7 +674,7 @@ var app = builder.Build();
674
674
app.Run();
675
675
```
676
676
677
-
The `Meter` must be initialized using that same name.
677
+
The `Meter` must be initialized using that same name:
678
678
679
679
```csharp
680
680
// Create a new meter named "OTel.AzureMonitor.Demo".
@@ -766,7 +766,7 @@ public class Program {
766
766
```
767
767
##### [Java native](#tab/java-native)
768
768
769
-
1. Inject `OpenTelemetry`
769
+
1. Inject `OpenTelemetry`:
770
770
771
771
***Spring**
772
772
```java
@@ -784,7 +784,7 @@ public class Program {
784
784
OpenTelemetry openTelemetry;
785
785
```
786
786
787
-
1.Create the counter
787
+
1.Create the counter:
788
788
789
789
```Java
790
790
importio.opentelemetry.api.common.AttributeKey;
@@ -864,7 +864,7 @@ input()
864
864
865
865
##### [ASP.NET Core](#tab/aspnetcore)
866
866
867
-
Application startup must subscribe to a Meter by name.
867
+
Application startup must subscribe to a Meter by name:
868
868
869
869
```csharp
870
870
// Create a new ASP.NET Core web application builder.
@@ -884,7 +884,7 @@ var app = builder.Build();
884
884
app.Run();
885
885
```
886
886
887
-
The `Meter` must be initialized using that same name.
887
+
The `Meter` must be initialized using that same name:
888
888
889
889
```csharp
890
890
// Get the current process.
@@ -982,7 +982,7 @@ public class Program {
982
982
```
983
983
##### [Java native](#tab/java-native)
984
984
985
-
1. Inject `OpenTelemetry`
985
+
1. Inject `OpenTelemetry`:
986
986
987
987
***Spring**
988
988
```java
@@ -1000,7 +1000,7 @@ public class Program {
1000
1000
OpenTelemetry openTelemetry;
1001
1001
```
1002
1002
1003
-
1.Create a gauge
1003
+
1.Create a gauge:
1004
1004
1005
1005
```Java
1006
1006
importio.opentelemetry.api.common.AttributeKey;
@@ -1252,7 +1252,7 @@ catch(error){
1252
1252
1253
1253
#### [Python](#tab/python)
1254
1254
1255
-
The OpenTelemetry Python SDK is implemented in such a way that exceptions thrown are automatically captured and recorded. See the following code sample for an example of this behavior.
1255
+
The OpenTelemetry Python SDK is implemented in such a way that exceptions thrown are automatically captured and recorded. See the following code sample for an example of this behavior:
1256
1256
1257
1257
```python
1258
1258
# Import the necessary packages.
@@ -1443,7 +1443,7 @@ you can add your spans by using the OpenTelemetry API.
1443
1443
1444
1444
#### [Java native](#tab/java-native)
1445
1445
1446
-
1. Inject `OpenTelemetry`
1446
+
1. Inject `OpenTelemetry`:
1447
1447
1448
1448
***Spring**
1449
1449
```java
@@ -1621,11 +1621,11 @@ We recommend you use the OpenTelemetry APIs whenever possible, but there might b
1621
1621
1622
1622
#### [ASP.NET Core](#tab/aspnetcore)
1623
1623
1624
-
##### Events
1624
+
**Events**
1625
1625
1626
1626
1. Add `Microsoft.ApplicationInsights` to your application.
1627
1627
1628
-
1. Create a `TelemetryClient` instance.
1628
+
1. Create a `TelemetryClient` instance:
1629
1629
1630
1630
> [!NOTE]
1631
1631
> It's important to only create once instance of the TelemetryClient per application.
@@ -1635,19 +1635,19 @@ We recommend you use the OpenTelemetry APIs whenever possible, but there might b
// Add the user ID to the activity as a tag, but only if the activity is not null.
@@ -2254,7 +2254,7 @@ log.info({
2254
2254
2255
2255
#### [Python](#tab/python)
2256
2256
2257
-
The Python [logging](https://docs.python.org/3/howto/logging.html) library is [autoinstrumented](.\opentelemetry-add-modify.md?tabs=python#included-instrumentation-libraries). You can attach custom dimensions to your logs by passing a dictionary into the `extra` argument of your logs.
2257
+
ThePython [logging](https://docs.python.org/3/howto/logging.html) library is [autoinstrumented](.\opentelemetry-add-modify.md?tabs=python#included-instrumentation-libraries). You can attach custom dimensions to your logs by passing a dictionary into the `extra` argument of your logs:
2258
2258
2259
2259
```python
2260
2260
...
@@ -2477,7 +2477,7 @@ It's not possible to filter telemetry in Java native.
2477
2477
...
2478
2478
```
2479
2479
2480
-
1. Useacustomprocessor. Youcanuseacustomspanprocessortoexcludecertainspansfrombeingexported. Tomarkspanstonotbeexported, set `TraceFlag` to `DEFAULT`.
2480
+
1. Useacustomprocessor. Youcanuseacustomspanprocessortoexcludecertainspansfrombeingexported. Tomarkspanstonotbeexported, set `TraceFlag` to `DEFAULT`:
0 commit comments