Skip to content

Conversation

@bantonsson
Copy link
Contributor

Changes

Running cargo test --all locally fails in the doc tests with:

---- opentelemetry-semantic-conventions/src/resource.rs - resource (line 16) stdout ----
error[E0425]: cannot find value `SERVICE_NAMESPACE` in module `semconv::resource`
    --> opentelemetry-semantic-conventions/src/resource.rs:25:42
     |
12   |         KeyValue::new(semconv::resource::SERVICE_NAMESPACE, "my-namespace"),
     |                                          ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `SERVICE_NAME`
     |

This removes the SERVICE_NAMESPACE resource from the doc test, since it is now behind the non default feature semconv_experimental, making the doc test fail. It also updates the metrics template to use the build() method instead of the renamed init()

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)

@bantonsson bantonsson requested a review from a team as a code owner November 26, 2024 09:29
@codecov
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.5%. Comparing base (1541a33) to head (6120df3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2346   +/-   ##
=====================================
  Coverage   79.5%   79.5%           
=====================================
  Files        123     123           
  Lines      21365   21365           
=====================================
  Hits       17004   17004           
  Misses      4361    4361           

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

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.

Thanks. Need one more eyes to help review before merge.

@cijothomas cijothomas merged commit 9a85ce1 into open-telemetry:main Nov 26, 2024
22 of 23 checks passed
@bantonsson bantonsson deleted the ban/fix-doc-tests branch November 26, 2024 17:05
pitoniak32 pushed a commit to pitoniak32/opentelemetry-rust that referenced this pull request Dec 4, 2024
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.

3 participants