Skip to content
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

feat: Add http collectors. #673

Merged
merged 9 commits into from
Nov 8, 2024
Merged

feat: Add http collectors. #673

merged 9 commits into from
Nov 8, 2024

Conversation

kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Nov 7, 2024

Best reviewed after: #672

Copy link
Contributor

github-actions bot commented Nov 7, 2024

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 18669 bytes
Size limit: 21000

Copy link
Contributor

github-actions bot commented Nov 7, 2024

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 15292 bytes
Size limit: 20000

Copy link
Contributor

github-actions bot commented Nov 7, 2024

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Size: 19445 bytes
Size limit: 21000

@kinyoklion
Copy link
Member Author

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.

@kinyoklion kinyoklion marked this pull request as ready for review November 7, 2024 22:27
@kinyoklion kinyoklion requested a review from a team as a code owner November 7, 2024 22:27
*/
export default function decorateFetch(callback: (breadcrumb: HttpBreadcrumb) => void) {
// TODO: Check if already wrapped?
// TODO: Centralized mechanism to wrapping?
Copy link
Contributor

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?

Copy link
Member Author

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.
*/
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Member Author

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.

@kinyoklion kinyoklion merged commit 6e60ddc into main Nov 8, 2024
22 checks passed
@kinyoklion kinyoklion deleted the rlamb/add-http-collectors branch November 8, 2024 17:36
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.

2 participants