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

Use shared slices instead of references to owned vectors as return types #1729

Conversation

utpilla
Copy link
Contributor

@utpilla utpilla commented May 10, 2024

Changes

  • Use shared slices (a more abstract type) instead of references to owned vectors as the return types of TracerProvider.span_processors() and LoggerProvider.log_processors()
  • Shared slices offer enough information for the callers of these methods and hides implementation details

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@utpilla utpilla requested a review from a team May 10, 2024 00:45
Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.3%. Comparing base (348ec9e) to head (1cde7a3).
Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1729     +/-   ##
=======================================
+ Coverage   71.0%   71.3%   +0.3%     
=======================================
  Files        135     136      +1     
  Lines      20751   20840     +89     
=======================================
+ Hits       14746   14879    +133     
+ Misses      6005    5961     -44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@utpilla utpilla changed the title Use slices instead of references to owned vectors as return types Use shared slices instead of references to owned vectors as return types May 10, 2024
Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

Agree with the change. Please do update changelog with a breaking change warning (affecting plugin authors only), and as a follow up, lets trim all unnecessary public APIs to better handle this in future.

(Assuming this is indeed a breaking change due to pub fn in providers)

@cijothomas cijothomas merged commit 736712d into open-telemetry:main May 10, 2024
20 checks passed
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.

4 participants