Skip to content

Commit

Permalink
[Exporter.Console] Add support for ActivitySource.Version (#5472)
Browse files Browse the repository at this point in the history
Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
  • Loading branch information
Kielek and CodeBlanch committed Mar 28, 2024
1 parent 5e0b7bf commit 717c322
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Console/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Added support for `ActivitySource.Version` property.
([#5472](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5472))

## 1.8.0-rc.1

Released 2024-Mar-27
Expand Down
5 changes: 5 additions & 0 deletions src/OpenTelemetry.Exporter.Console/ConsoleActivityExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ public override ExportResult Export(in Batch<Activity> batch)
}

this.WriteLine($"Activity.ActivitySourceName: {activity.Source.Name}");
if (!string.IsNullOrEmpty(activity.Source.Version))
{
this.WriteLine($"Activity.ActivitySourceVersion: {activity.Source.Version}");
}

this.WriteLine($"Activity.DisplayName: {activity.DisplayName}");
this.WriteLine($"Activity.Kind: {activity.Kind}");
this.WriteLine($"Activity.StartTime: {activity.StartTimeUtc:yyyy-MM-ddTHH:mm:ss.fffffffZ}");
Expand Down

0 comments on commit 717c322

Please sign in to comment.