Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Exporter.Console] Add support for ActivitySource.Version #5472

Merged

Conversation

Kielek
Copy link
Contributor

@Kielek Kielek commented Mar 25, 2024

Fixes #
Design discussion issue #

Changes

[Exporter.Console] Add support for ActivitySource.Version

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • [ ] Unit tests added/updated No tests for similar functionalities.
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • [ ] Changes in public API reviewed (if applicable)

@Kielek Kielek requested a review from a team March 25, 2024 12:44
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 85.51%. Comparing base (6250307) to head (b0d42ca).
Report is 150 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5472      +/-   ##
==========================================
+ Coverage   83.38%   85.51%   +2.13%     
==========================================
  Files         297      290       -7     
  Lines       12531    12608      +77     
==========================================
+ Hits        10449    10782     +333     
+ Misses       2082     1826     -256     
Flag Coverage Δ
unittests ?
unittests-Solution-Experimental 85.47% <50.00%> (?)
unittests-Solution-Stable 85.48% <50.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...emetry.Exporter.Console/ConsoleActivityExporter.cs 48.33% <50.00%> (+0.05%) ⬆️

... and 63 files with indirect coverage changes

@@ -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}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want Activity.ActivitySourceVersion instead of Activity.Source.Version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same convention as for ActivitySourceName

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It maybe beneficial to use ActivitySourceVersion(aka Tracer version) to make it easier to realize that ActivitySource and Tracer are the same concept.
AND/OR use InstrumentationScope wording?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am less concerned about wording as it is mostly for debugging purposes. It should be fine to have it this value in any form.

I can make additional changes in this PR on follow up PR if we have agreement. It will be great to include this fix on 1.8.0 release so I would like to avoid long discussion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a non-blocking comment. We do have another task to revisit console output format, so any additional improvements can be addressed as part of that.

@CodeBlanch CodeBlanch merged commit 717c322 into open-telemetry:main Mar 28, 2024
31 checks passed
@Kielek Kielek deleted the exporter.console-activitysource-version branch March 28, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants