-
Notifications
You must be signed in to change notification settings - Fork 31
feat: Add http collectors. #673
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
Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
There are a few things duplicated in this PR and the DOM collector PR. They are a baseline to running tests. So there will be some merge conflicts to resolve. |
| */ | ||
| export default function decorateFetch(callback: (breadcrumb: HttpBreadcrumb) => void) { | ||
| // TODO: Check if already wrapped? | ||
| // TODO: Centralized mechanism to wrapping? |
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.
Are TODOs for this PR?
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.
Made a ticket as this is probably work that should be done as its own thing.
| * | ||
| * @param url URL to filter. | ||
| * @returns A filtered URL. | ||
| */ |
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.
This seems like it could be overlooked as endpoints evolve. Is it possible to make a test that will fail if this function doesn't filter the "set of all endpoints cases"? Not a trivial problem to solve.
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.
Perhaps an option is to define this closer to the endpoint urls?
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.
We cannot really define them closer, as this is a different package and the endpoints are defined in the SDK package.
We could add documentation in the SDK package. In a different PR, that indicates the telemetry package needs updated with the new paths.
🤖 I have created a release *beep* *boop* --- <details><summary>browser-telemetry: 0.1.0</summary> ## [0.1.0](browser-telemetry-v0.0.9...browser-telemetry-v0.1.0) (2025-01-22) ### ⚠ BREAKING CHANGES * Updated AI config interface. ([#697](#697)) ### Features * Add basic logging support for browser-telemetry. ([#736](#736)) ([2ef1486](2ef1486)) * Add browser telemetry options. ([#675](#675)) ([c8352b2](c8352b2)) * Add browser-telemetry API types. ([#669](#669)) ([89967ee](89967ee)) * Add DOM collectors. ([#672](#672)) ([4473a06](4473a06)) * Add http collectors. ([#673](#673)) ([6e60ddc](6e60ddc)) * Add singleton support for browser-telemetry. ([#739](#739)) ([68a3b87](68a3b87)) * Add stack trace parsing. ([#676](#676)) ([ca1dd49](ca1dd49)) * Add support for breadcrumb filtering. ([#733](#733)) ([5c327a1](5c327a1)) * Add support for the session init event. ([320c07d](320c07d)) * Add the ability to filter errors. ([#743](#743)) ([5cffb2b](5cffb2b)) * Export browser-telemetry initialization method. ([d1b364e](d1b364e)) * Implement browser telemetry client. ([#691](#691)) ([db74a99](db74a99)) * Make browser-telemetry specific inspector type. ([#741](#741)) ([14ecdb3](14ecdb3)) * Random uuid for telemetry package. ([#689](#689)) ([4cf34f9](4cf34f9)) * Rename initializeTelemetryInstance to initTelemetryInstance for consistency with initTelemetry. ([257734f](257734f)) * Source maps with inline sources for browser-telemetry. ([#735](#735)) ([1656a85](1656a85)) * Updated AI config interface. ([#697](#697)) ([cd72ea8](cd72ea8)) * Vendor TraceKit ([d1b364e](d1b364e)) ### Bug Fixes * Clear pending events buffer when registered. ([#727](#727)) ([b6ad7df](b6ad7df)) * Export BrowserTelemetry, BrowserTelemetryInspector, and ImplementsCrumb. ([257734f](257734f)) * Fix breadcrumb filter option parsing. ([#742](#742)) ([833f4ce](833f4ce)) * Remove BrowserTelemetry until more types are available. ([#671](#671)) ([796b8a3](796b8a3)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Best reviewed after: #672