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
> Application Insights Java 3.x listens for telemetry that's sent to the Application Insights [Classic API](api-custom-events-metrics.md). Similarly, Application Insights Node.js 3.x collects events created with the Application Insights [Classic API](api-custom-events-metrics.md). This makes upgrading easier and fills a gap in our custom telemetry support until all custom telemetry types are supported via the OpenTelemetry API.
@@ -1194,10 +1195,56 @@ with tracer.start_as_current_span("my request span", kind=SpanKind.SERVER) as sp
1194
1195
1195
1196
---
1196
1197
1197
-
<!--
1198
-
1199
1198
### Add Custom Events
1200
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.
0 commit comments