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
Browser detector module #3292
Browser detector module #3292
Conversation
@legendecas , can you look into this when you get some time |
@Abinet18 Sorry for the delay, I'm on vacation this week. I will take a look at this when I'm back. Thank you for your work on this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this! Overall LGTM % a few nits.
experimental/packages/opentelemetry-browser-detector/src/util.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-browser-detector/src/util.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-browser-detector/src/BrowserDetector.ts
Outdated
Show resolved
Hide resolved
…erDetector.ts Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
experimental/packages/opentelemetry-browser-detector/src/BrowserDetector.ts
Outdated
Show resolved
Hide resolved
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3292 +/- ##
==========================================
- Coverage 93.52% 92.87% -0.66%
==========================================
Files 244 231 -13
Lines 7386 6677 -709
Branches 1529 1386 -143
==========================================
- Hits 6908 6201 -707
+ Misses 478 476 -2
|
experimental/packages/opentelemetry-browser-detector/src/BrowserDetector.ts
Show resolved
Hide resolved
experimental/packages/opentelemetry-browser-detector/src/types.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-browser-detector/test/BrowserDetector.test.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-browser-detector/test/BrowserDetector.test.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
experimental/packages/opentelemetry-browser-detector/package.json
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-browser-detector/package.json
Outdated
Show resolved
Hide resolved
LGTM, if you can just address the lint and changelog check failures we should be good |
@dyladan Is there something I can do to fix the failing checks ? |
@Abinet18 You can run Or I can help to set up the miscellaneous configurations for the browser testing and releases, if you are ok with it. |
@legendecas , I am ok if you setup the required configs. |
20c3cee
to
5fe7796
Compare
5fe7796
to
1ed3b2b
Compare
Updated with browser testing and fixed lerna package linking issues. |
@dyladan LGTM |
Which problem is this PR solving?
Adds a browser detector module to get browser identification attributes like platform, brands, mobile, language and add it to the resource attributes of the traces. Improvement of the same purpose PR(#3201) that modifies the detector in @opentelemetry/resources. Since the resources was a stable package , we agreed on creating a new experimental package for the browser detector.
Short description of the changes
Added a new experimental package @opentelemetry/opentelemetry-browser-detector , added BrowserDetector module that queries for navigator.userAgentData if supported or just navigator.userAgent and returns the resulting resource object
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist: