Skip to content

feat: Browser Navigation Instrumentation#3148

Merged
martinkuba merged 2 commits intoopen-telemetry:mainfrom
Abinet18:feat/instrumentation-navigation
Dec 10, 2025
Merged

feat: Browser Navigation Instrumentation#3148
martinkuba merged 2 commits intoopen-telemetry:mainfrom
Abinet18:feat/instrumentation-navigation

Conversation

@Abinet18
Copy link
Copy Markdown
Contributor

@Abinet18 Abinet18 commented Oct 6, 2025

Which problem is this PR solving?

Creates a new instrumentation for browser navigation, in place of page view instrumentation that was being worked in this PR, with event defined in SemConv for this event

Short description of the changes

  • Fire a browser navigation event when an html loads, route changes (push, replace , pop), hash changes, and navigating through the navigation api if available

@Abinet18 Abinet18 requested a review from a team as a code owner October 6, 2025 21:06
@github-actions github-actions Bot requested a review from martinkuba October 6, 2025 21:06
@Abinet18 Abinet18 changed the title Feat/instrumentation navigation Feat : Browser Navigation Instrumentation Oct 6, 2025
@Abinet18 Abinet18 changed the title Feat : Browser Navigation Instrumentation feat : Browser Navigation Instrumentation Oct 6, 2025
@Abinet18 Abinet18 changed the title feat : Browser Navigation Instrumentation feat: Browser Navigation Instrumentation Oct 6, 2025
@Abinet18 Abinet18 force-pushed the feat/instrumentation-navigation branch from a1fbf7d to 9ef7a8a Compare October 10, 2025 17:09
Comment thread examples/web/examples/navigation/index.js Fixed
Comment thread examples/web/examples/navigation/index.js Fixed
@pichlermarc pichlermarc added the Target: Browser Targets on Browser label Oct 15, 2025
Copy link
Copy Markdown
Contributor

@david-luna david-luna left a comment

Choose a reason for hiding this comment

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

that's a very good start :)

Comment thread packages/instrumentation-browser-navigation/src/index.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
@Abinet18 Abinet18 force-pushed the feat/instrumentation-navigation branch from b4f4f99 to 42bfa43 Compare October 29, 2025 17:26
Comment thread examples/web/package.json Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/.eslintignore Outdated
Comment thread packages/instrumentation-browser-navigation/.eslintrc.js
Comment thread packages/instrumentation-browser-navigation/package.json Outdated
@martinkuba martinkuba moved this to In Progress in Browser: Phase 1 Oct 30, 2025
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Copy link
Copy Markdown
Contributor

@overbalance overbalance left a comment

Choose a reason for hiding this comment

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

I would run npx prettier --write packages/instrumentation-browser-navigation as well.

Comment thread packages/instrumentation-browser-navigation/README.md Outdated
Comment thread examples/web/examples/navigation/index.js Outdated
Comment thread examples/web/examples/navigation/index.js Outdated
Comment thread examples/web/package.json
@overbalance
Copy link
Copy Markdown
Contributor

@Abinet18 I forgot to mention that you should delete package-lock.json and node_modules and then npm i. You got bit by an npm bug that removed the linux binaries from the lockfile. Then you should see the build pass.

@Abinet18 Abinet18 force-pushed the feat/instrumentation-navigation branch 3 times, most recently from 489169c to a8e0c76 Compare November 11, 2025 18:43
Copy link
Copy Markdown
Contributor

@overbalance overbalance left a comment

Choose a reason for hiding this comment

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

I saw you resolved my comment about the example that relies on an older version of @opentelemetry/resources without responding. The examples don't work because of the deprecated syntax. I realize you didn't introduce that issue, and that all four examples need to be fixed. @martinkuba what do you advise?

Comment thread packages/instrumentation-browser-navigation/package.json
@Abinet18
Copy link
Copy Markdown
Contributor Author

Abinet18 commented Nov 14, 2025

I saw you resolved my comment about the example that relies on an older version of @opentelemetry/resources without responding. The examples don't work because of the deprecated syntax. I realize you didn't introduce that issue, and that all four examples need to be fixed. @martinkuba what do you advise?

I see the examples don't work when I reinstall and start. I have fixed the resource related code in all

@Abinet18 Abinet18 force-pushed the feat/instrumentation-navigation branch from ec553ed to 68d5314 Compare November 14, 2025 18:17
Comment thread examples/web/examples/navigation/index.js Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/types.ts
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
@Abinet18 Abinet18 force-pushed the feat/instrumentation-navigation branch from 6c6b79b to ef94c8b Compare November 25, 2025 19:58
Comment thread packages/instrumentation-browser-navigation/package.json Outdated
@martinkuba
Copy link
Copy Markdown
Contributor

Please add CHANGELOG file

Comment thread packages/instrumentation-browser-navigation/package.json Outdated
Comment thread packages/instrumentation-browser-navigation/package.json Outdated
Comment thread packages/instrumentation-browser-navigation/karma.conf.js Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-browser-navigation/src/instrumentation.ts Outdated
Comment thread .release-please-manifest.json Outdated
@Abinet18 Abinet18 force-pushed the feat/instrumentation-navigation branch from 35ff5a7 to f018403 Compare December 10, 2025 16:37
Comment thread packages/instrumentation-browser-navigation/src/utils.ts Fixed
@martinkuba martinkuba merged commit 9c1503f into open-telemetry:main Dec 10, 2025
24 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Browser: Phase 1 Dec 10, 2025
@otelbot
Copy link
Copy Markdown
Contributor

otelbot Bot commented Dec 10, 2025

Thank you for your contribution @Abinet18! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Target: Browser Targets on Browser

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants