Skip to content

fix(browser-detector): fix name for user agent resource attribute#6729

Merged
pichlermarc merged 5 commits into
open-telemetry:mainfrom
david-luna:browser-detector-semconv
May 21, 2026
Merged

fix(browser-detector): fix name for user agent resource attribute#6729
pichlermarc merged 5 commits into
open-telemetry:mainfrom
david-luna:browser-detector-semconv

Conversation

@david-luna

@david-luna david-luna commented May 20, 2026

Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

Browser detector is sending the wrong semantic convetion for user agent. This PR adds @opentelemetry/semantic-conventions dependency into browser detector package and also aligns with other packages in the way incubating semconv are implemented.

Short description of the changes

  • add semantic conventions package
  • use ATTR_USER_AGENT_ORIGINAL attribute in resource detection
  • add semconv.ts file with the incubating attributes and remove the current enum

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

  • Unit tests

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been updated

@david-luna
david-luna requested review from a team as code owners May 20, 2026 11:07
@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.95%. Comparing base (b3ca638) to head (1108b49).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6729   +/-   ##
=======================================
  Coverage   94.94%   94.95%           
=======================================
  Files         377      377           
  Lines       12730    12734    +4     
  Branches     2893     2893           
=======================================
+ Hits        12087    12091    +4     
  Misses        643      643           
Files with missing lines Coverage Δ
...ntelemetry-browser-detector/src/BrowserDetector.ts 100.00% <100.00%> (ø)
...ages/opentelemetry-browser-detector/src/semconv.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@david-luna david-luna changed the title chore(detector-browser): update semantic conventions fix(browser-detector): use the right semantic convention for user agent resource attribute May 20, 2026
@david-luna david-luna self-assigned this May 20, 2026
@david-luna david-luna added the browser Browser-specific additions or benefits label May 20, 2026
@david-luna david-luna changed the title fix(browser-detector): use the right semantic convention for user agent resource attribute fix(browser-detector): fix name for user agent resource attribute and add missing document URL attrib May 21, 2026
@david-luna david-luna changed the title fix(browser-detector): fix name for user agent resource attribute and add missing document URL attrib fix(browser-detector): fix name for user agent resource attribute May 21, 2026
@pichlermarc
pichlermarc added this pull request to the merge queue May 21, 2026
Merged via the queue into open-telemetry:main with commit 884b843 May 21, 2026
31 checks passed
@david-luna
david-luna deleted the browser-detector-semconv branch May 21, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

browser Browser-specific additions or benefits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants