[FEATURE REQ]/[BUG] [Distributed tracing] Report failures properly #33080
Labels
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
Monitor
Monitor, Monitor Ingestion, Monitor Query
OpenTelemetry
OpenTelemetry instrumentation (not Monitor-specific)
Library name
Azure.Core
Please describe the feature.
Apparently,
Scope.Failed(ex)
does not work on OTel path (forActivitySource
). We need to useActivity.SetStatus
method there.Also, we should add something like
Scope.Failed(string)
that would set error with optional description when there is no exception to report, like inRequestActivityPolicy
-otel.status_code
was an old workaround and is not expected to work in a generic caseWe need to set error conditionally in
RequestActivityPolicy
depending onRequestOptions
and don't fail HTTP activity when configured so.The text was updated successfully, but these errors were encountered: