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
As a workaround, setting the status of an Activity was provided by the .NET OpenTelemetry API via the Activity.SetStatusextension method in the OpenTelemetry.Trace namespace. Internally, this extension method added the status as tags on the Activity: otel.status_code and otel.status_description.
Note that this is not a breaking change -
to maintain backward compatibility, the exporters would fall back to use the tags:otel.status_code and otel.status_description, which were set with Activity Extension method to infer status.
Describe alternatives you've considered.
Adding support to set Activity Status natively onto the core SDK: prototype.
Compared to add support to native Activity status onto the core SDK, the pros of supporting it in all Exporters are:
Preventing performance penalty in enumerating all the activity tags in the core SDK.
Less maintenance/migration effort when the time comes on stop supporting setting status via activity tags.
Feature summary
Prior to DiagnosticSource version 6.0.0, there is no native support from Activity class to set ActivityStatus and StatusDescription.
As a workaround, setting the status of an Activity was provided by the .NET OpenTelemetry API via the
Activity.SetStatus
extension method in theOpenTelemetry.Trace
namespace. Internally, this extension method added the status as tags on the Activity:otel.status_code
andotel.status_description
.Starting from version 6.0.0 in DiagnosticSource, there are two new properties added to Activity class - Status and StatusDescription.
To add support for setting status on
Activity
class with SetStatus(ActivityStatusCode, String) API, the below code changes on all core Exporters were made:(Console Exporter as proof of concept, Zipkin Exporter, Jaeger Exporter and OTLP Exporter).
Note that this is not a breaking change -
to maintain backward compatibility, the exporters would fall back to use the tags:
otel.status_code
andotel.status_description
, which were set withActivity Extension
method to infer status.Describe alternatives you've considered.
Adding support to set Activity Status natively onto the core SDK: prototype.
Compared to add support to native Activity status onto the core SDK, the pros of supporting it in all Exporters are:
Additional Context
Related to #2569.
The text was updated successfully, but these errors were encountered: