Skip to content

refactor(instrumentation): consolidate shared URL helpers into src/utils#272

Merged
david-luna merged 19 commits into
open-telemetry:mainfrom
djvu2k6:refactor/consolidate-url-helpers
May 11, 2026
Merged

refactor(instrumentation): consolidate shared URL helpers into src/utils#272
david-luna merged 19 commits into
open-telemetry:mainfrom
djvu2k6:refactor/consolidate-url-helpers

Conversation

@djvu2k6
Copy link
Copy Markdown
Contributor

@djvu2k6 djvu2k6 commented May 8, 2026

Closes #251

Moved defaultSanitizeUrl from src/navigation/utils.ts to new src/utils/url.ts and exported it from src/utils/index.ts.

Re-exported from src/navigation/utils.ts to avoid breaking existing imports.

Left isHashChange in place — navigation-specific, no second consumer found.

Surveyed web-vitals, user-action, resource-timing — no additional cross-cutting helpers found.

djvu2k6 added 4 commits May 8, 2026 15:35
Implement a default URL sanitization function to redact sensitive information.
Removed the defaultSanitizeUrl function and sensitive parameters list from utils.ts.
Removed documentation for the default URL sanitization function.
@djvu2k6 djvu2k6 requested a review from a team as a code owner May 8, 2026 10:28
@david-luna
Copy link
Copy Markdown
Contributor

Re-exported from src/navigation/utils.ts to avoid breaking existing imports.

The instrumentations are experimental and even the export paths state that. ref: https://www.npmjs.com/package/@opentelemetry/browser-instrumentation

So I think it's okay to remove the re-export.

cc: @open-telemetry/browser-approvers

@djvu2k6
Copy link
Copy Markdown
Contributor Author

djvu2k6 commented May 8, 2026

@david-luna Thanks for the clarification! I'll remove the re-export from src/navigation/utils.ts. Since the package is experimental, the breaking change is acceptable

Comment thread packages/instrumentation/src/navigation/index.ts Outdated
Comment thread packages/instrumentation/src/navigation/instrumentation.test.ts Outdated
Comment thread packages/instrumentation/src/navigation/utils.test.ts Outdated
@david-luna david-luna enabled auto-merge (squash) May 11, 2026 12:56
@david-luna david-luna merged commit ff19174 into open-telemetry:main May 11, 2026
5 checks passed
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.

Consolidate shared URL/utility helpers across instrumentations

3 participants