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-add-modify.md
+27-49Lines changed: 27 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1195,56 +1195,10 @@ with tracer.start_as_current_span("my request span", kind=SpanKind.SERVER) as sp
1195
1195
1196
1196
---
1197
1197
1198
-
### Add Custom Events
1199
-
1200
-
The OpenTelemetry Events API is still under development. In the meantime, there are workarounds for each language to allow sending of "custom events", which populate the customEvents table in Application Insights.
1201
-
1202
-
#### [ASP.NET Core](#tab/aspnetcore)
1203
-
1204
-
Currently unavailable.
1205
-
1206
-
#### [.NET](#tab/net)
1207
-
1208
-
Currently unavailable.
1209
-
1210
-
#### [Java](#tab/java)
1211
-
1212
-
Currently unavailable.
1213
-
1214
-
#### [Node.js](#tab/nodejs)
1215
-
1216
-
Currently unavailable.
1217
-
1218
-
#### [Python](#tab/python)
1219
-
1220
-
Until the OpenTelemetry Events API is stable, the [Azure Monitor Events Extension](https://pypi.org/project/azure-monitor-events-extension/0.1.0/) can be used in conjunction with the Azure Monitor OpenTelemetry Distro to send customEvents to Application Insights.
1221
-
1222
-
Install the distro and the extension:
1223
-
1224
-
```console
1225
-
pip install azure-monitor-opentelemetry
1226
-
pip install azure-monitor-events-extension
1227
-
```
1228
-
1229
-
Use the `track_event` API offered in the extension to send customEvents.
1230
-
1231
-
```python
1232
-
...
1233
-
from azure.monitor.events.extension import track_event
1234
-
from azure.monitor.opentelemetry import configure_azure_monitor
1235
-
1236
-
configure_azure_monitor()
1237
-
1238
-
# Use the track_event() api to send custom event telemetry
The OpenTelemetry Logs/Events API is still under development. In the meantime, you can use the OpenTelemetry Span API to create "Span Events", which populate the traces table in Application Insights. The string passed in to addEvent() is saved to the message field within the trace.
@@ -1419,7 +1373,31 @@ Then use the `TelemetryClient` to send custom telemetry:
1419
1373
1420
1374
#### [Python](#tab/python)
1421
1375
1422
-
It isn't available in Python.
1376
+
Unlike the other languages, there does not exist an Application Insights SDK for Python. You will be able to achieve all your monitoring needs with the Azure Monitor OpenTelemetry Distro, except for sending `customEvents`. Until the OpenTelemetry Events API is stable, the [Azure Monitor Events Extension](https://pypi.org/project/azure-monitor-events-extension/0.1.0/) can be used in conjunction with the Azure Monitor OpenTelemetry Distro to send `customEvents` to Application Insights.
1377
+
1378
+
Install the distro and the extension:
1379
+
1380
+
```console
1381
+
pip install azure-monitor-opentelemetry
1382
+
pip install azure-monitor-events-extension
1383
+
```
1384
+
1385
+
Use the `track_event` API offered in the extension to send customEvents.
1386
+
1387
+
```python
1388
+
...
1389
+
from azure.monitor.events.extension import track_event
1390
+
from azure.monitor.opentelemetry import configure_azure_monitor
1391
+
1392
+
configure_azure_monitor()
1393
+
1394
+
# Use the track_event() api to send custom event telemetry
0 commit comments