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

docs(opentelemetry-browser-detector): Use tree-shakeable string constants for semconv in Readme #4768

Merged
merged 8 commits into from
Jul 5, 2024

Conversation

JohannesHuster
Copy link
Contributor

Which problem is this PR solving?

Updates #4567

Short description of the changes

Replace deprecated imports from @opentelemetry/semantic-conventions with new (tree-shakeable) string constants for package @opentelemetry/opentelemetry-browser-detector. What I did:

  • Search for “@opentelemetry/semantic-conventions” in package path.
    • Add new imports and check that new and old strings match exactly.
    • Use new imports and remove old ones.

Type of change

  • Bug fix (non-breaking change which fixes an issue) (refactor)

How Has This Been Tested?

  • npm test

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
    • No new functionality
  • Documentation has been updated

@JohannesHuster JohannesHuster marked this pull request as ready for review June 5, 2024 13:27
@JohannesHuster JohannesHuster requested a review from a team June 5, 2024 13:27
Copy link
Member

@JamieDanielson JamieDanielson left a comment

Choose a reason for hiding this comment

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

Since this is only a change in the README, I think we are okay to describe this PR as "docs" instead of "refactor".

Also it looks like "@opentelemetry/semantic-conventions": "1.25.0" is in the package.json but I don't see it being used anywhere. I think we could uninstall it from this package (in this package directory run npm uninstall @opentelemetry/semantic-conventions). We will also find out if I'm missing it somewhere and this causes a test to fail.

@JohannesHuster JohannesHuster force-pushed the browser-detector-semconv branch from 196b1b2 to 9c3da62 Compare June 6, 2024 20:34
@JohannesHuster JohannesHuster changed the title refactor(opentelemetry-browser-detector): Use tree-shakeable string constants for semconv docs(opentelemetry-browser-detector): Use tree-shakeable string constants for semconv in Readme Jun 6, 2024
@JohannesHuster
Copy link
Contributor Author

@JamieDanielson Sounds good. Thanks for the pointers :-)

I pushed the changes and renamed commit, PR and changelog entry.

@@ -61,6 +61,7 @@ All notable changes to experimental packages in this project will be documented
* docs(instrumentation): better docs for supportedVersions option [#4693](https://github.com/open-telemetry/opentelemetry-js/pull/4693) @blumamir
* docs: align all supported versions to a common format [#4696](https://github.com/open-telemetry/opentelemetry-js/pull/4696) @blumamir
* refactor(examples): use new exported string constants for semconv in experimental/examples/opencensus-shim [#4763](https://github.com/open-telemetry/opentelemetry-js/pull/4763#pull) @Zen-cronic
* docs(opentelemetry-browser-detector): Use tree-shakeable string constants for semconv in Readme [#4768](https://github.com/open-telemetry/opentelemetry-js/pull/4768) @JohannesHuster
Copy link
Member

Choose a reason for hiding this comment

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

Sorry for the churn, this will need to move up into the Unreleased section now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JamieDanielson No worries, always good to see a release! I added the change as a new commit for now, to make reviewing easier, but I'm happy to rebase and remove some unnecessary commits before merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Failing tests are already being addressed here, I think: #4777

Copy link
Member

Choose a reason for hiding this comment

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

The test fix was merged so I've merged main here. Hopefully that passes now 🤞

Copy link
Member

Choose a reason for hiding this comment

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

Also just saw your other comment, no rebase is necessary 🙂 . Rebases can make it difficult to see what changes have occurred during review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perfect, thanks 🙂 Tests are looking good now 😌

Copy link

codecov bot commented Jun 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.11%. Comparing base (ecc88a3) to head (324299c).
Report is 32 commits behind head on main.

Current head 324299c differs from pull request most recent head bca064f

Please upload reports for the commit bca064f to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4768      +/-   ##
==========================================
+ Coverage   91.04%   91.11%   +0.06%     
==========================================
  Files          89      140      +51     
  Lines        1954     3027    +1073     
  Branches      416      677     +261     
==========================================
+ Hits         1779     2758     +979     
- Misses        175      269      +94     

see 51 files with indirect coverage changes

@trentm
Copy link
Contributor

trentm commented Jul 4, 2024

^^^ manual merge from main

Copy link
Contributor

@trentm trentm left a comment

Choose a reason for hiding this comment

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

Assuming tests pass, this LGTM.

@trentm
Copy link
Contributor

trentm commented Jul 4, 2024

I'll give it a day in case @JamieDanielson wants to add anything else, then I'll merge this.
Thanks, @JohannesHuster

@trentm trentm added this pull request to the merge queue Jul 5, 2024
Merged via the queue into open-telemetry:main with commit 539d942 Jul 5, 2024
19 of 20 checks passed
@JohannesHuster JohannesHuster deleted the browser-detector-semconv branch July 6, 2024 15:04
Zirak pushed a commit to Zirak/opentelemetry-js that referenced this pull request Sep 14, 2024
…ants for semconv in Readme (open-telemetry#4768)

* docs(opentelemetry-browser-detector): Use tree-shakeable string constants for semconv in Readme

* Update changelog

* Uninstall unused semantic-conventions package from browser-detector package

* Move changelog entry to Unreleased section

* rm changelog entry, I don't think it is necessary for a small docs update

---------

Co-authored-by: Jamie Danielson <[email protected]>
Co-authored-by: Trent Mick <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants