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

Remove Cow from InstrumentationScope #2275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stormshield-fabs
Copy link
Contributor

@stormshield-fabs stormshield-fabs commented Nov 5, 2024

Fixes #2246

Changes

Removed the InstrumentationScope attributes from the public API and replaced them with getters.

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)

@stormshield-fabs stormshield-fabs requested a review from a team as a code owner November 5, 2024 16:38
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.

From Community Call:

  1. Lets keep builder as-is (i.e accept Cow.. )
  2. Hide fields from InstrumentationScope and offer pub getters.

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 59.25926% with 44 lines in your changes missing coverage. Please review.

Project coverage is 79.5%. Comparing base (91f44ff) to head (7c69e5c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-sdk/src/metrics/meter.rs 0.0% 17 Missing ⚠️
opentelemetry-stdout/src/trace/exporter.rs 0.0% 7 Missing ⚠️
opentelemetry-stdout/src/metrics/exporter.rs 0.0% 4 Missing ⚠️
opentelemetry-proto/src/transform/common.rs 57.1% 3 Missing ⚠️
opentelemetry-stdout/src/common.rs 0.0% 3 Missing ⚠️
opentelemetry-proto/src/transform/logs.rs 33.3% 2 Missing ⚠️
opentelemetry-proto/src/transform/metrics.rs 0.0% 2 Missing ⚠️
opentelemetry-proto/src/transform/trace.rs 0.0% 2 Missing ⚠️
opentelemetry-sdk/src/metrics/instrument.rs 60.0% 2 Missing ⚠️
opentelemetry-sdk/src/trace/tracer.rs 0.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2275     +/-   ##
=======================================
- Coverage   79.5%   79.5%   -0.1%     
=======================================
  Files        121     121             
  Lines      20960   20968      +8     
=======================================
+ Hits       16671   16676      +5     
- Misses      4289    4292      +3     

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

@@ -462,6 +462,28 @@ impl InstrumentationScope {
attributes: None,
}
}

/// Instrumentation library name.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Use the word "return" in the documentation for all the getters.

Suggested change
/// Instrumentation library name.
/// Returns the instrumentation library name.

Copy link
Contributor

@utpilla utpilla left a comment

Choose a reason for hiding this comment

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

Looks good with a CHANGELOG entry.

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.

Instrumentation Scope and cloning
3 participants