Skip to content

Commit

Permalink
Merge pull request #28 from Kielek/drop-otel.status
Browse files Browse the repository at this point in the history
Replace otel.status_code and otel.status_description by Activity.Status
  • Loading branch information
jbogard authored May 14, 2024
2 parents 906bafa + b235605 commit 7ce5c51
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ private void Handle(CommandSucceededEvent @event)
{
WithReplacedActivityCurrent(activity, () =>
{
activity.AddTag("otel.status_code", "OK");
activity.SetStatus(ActivityStatusCode.Ok);
activity.Stop();
});
}
Expand All @@ -100,8 +98,7 @@ private void Handle(CommandFailedEvent @event)
{
if (activity.IsAllDataRequested)
{
activity.AddTag("otel.status_code", "ERROR");
activity.AddTag("otel.status_description", @event.Failure.Message);
activity.SetStatus(ActivityStatusCode.Error, @event.Failure.Message);
activity.AddTag("exception.type", @event.Failure.GetType().FullName);
activity.AddTag("exception.message", @event.Failure.Message);
activity.AddTag("exception.stacktrace", @event.Failure.StackTrace);
Expand Down

0 comments on commit 7ce5c51

Please sign in to comment.