Skip to content

Commit

Permalink
add export status & description to console export
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishwesh Bankwar committed Nov 20, 2021
1 parent b32974c commit 562a898
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/OpenTelemetry.Exporter.Console/ConsoleActivityExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ public override ExportResult Export(in Batch<Activity> batch)
this.WriteLine($"Activity.Kind: {activity.Kind}");
this.WriteLine($"Activity.StartTime: {activity.StartTimeUtc:yyyy-MM-ddTHH:mm:ss.fffffffZ}");
this.WriteLine($"Activity.Duration: {activity.Duration}");

if (activity.Status != ActivityStatusCode.Unset)
{
this.WriteLine($"Activity.Status: {activity.Status}");
}

if (activity.StatusDescription != null)
{
this.WriteLine($"Activity.StatusDescription: {activity.StatusDescription}");
}

if (activity.TagObjects.Any())
{
this.WriteLine("Activity.TagObjects:");
Expand Down

0 comments on commit 562a898

Please sign in to comment.