Open
Description
Try some basic otel event stuff like
from azure.monitor.opentelemetry import configure_azure_monitor
from opentelemetry._events import get_event_logger, Event
configure_azure_monitor()
event_logger = get_event_logger(__name__)
event_logger.emit(Event(
name="example_event",
attributes={"key": "value"}
))
it won't export this log, but I can see a couple of different errors (either one or another, not both at the same time):


So the backend rejected the message. Which is wrong - OTel events don't require a body. But if it's hard/impossible to change, then the exporter should set some default body.
This is a workaround
event_logger.emit(Event(
name="example_event",
attributes={"key": "value"},
body="dummy body to avoid Azure Monitor dropping the event without a message",
))