Skip to content

[azuremonitorexporter] LogRecordToEnvelope does not handle exceptions #38432

Open
@cloudfy

Description

@cloudfy

Component(s)

exporter/azuremonitor

What happened?

Description

When using azuremonitor as exporter using the Otel Contrib distribution, exceptions which are logged per symantec definition of OpenTelemetry is forward to Azure Monitor as traces, not exceptions.

Steps to Reproduce

  1. Setup otel azuremonitor contrib.
  2. Configure span to include required attributes exception.type, exception.message
  3. Await data in application insights, and verify that no exceptions has been logged, but an entry in traces exists.

Expected Result

Log records of span specified as exceptions, end in the exceptions table.

Actual Result

Log records appear in traces table.

Suggested code change:

Alter log_to_envelope.go. Change LogRecordToEnvelope(*) to use contracts.NewExceptionData() when span attributes fulfill the symantec specification of an exception.

Collector version

v.0.120.0

Environment information

Environment

OS: Ubuntu 20.04 and Windows 11.102

OpenTelemetry Collector configuration

Log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions