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

Use JSON.stringify only when debugging is enabled #401

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

kamilkisiela
Copy link
Contributor

@kamilkisiela kamilkisiela commented Jul 14, 2021

There's no need to call JSON.stringify for every finished span when debugging is disabled. It can be done lazily.

If JSON.stringify takes 0.1ms on average then for 50 spans we get 5ms added to the overall latency.

@kamilkisiela kamilkisiela requested a review from a team July 14, 2021 07:53
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

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

This change looks good - thanks for the contribution @kamilkisiela 👍🏻

@MikeGoldsmith MikeGoldsmith added type: bug Something isn't working version: bump patch A PR with release-worthy changes and is backwards-compatible. labels Jul 16, 2021
@MikeGoldsmith MikeGoldsmith merged commit 9428cba into honeycombio:main Jul 16, 2021
@kamilkisiela kamilkisiela deleted the kamil-stringify branch July 16, 2021 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working version: bump patch A PR with release-worthy changes and is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants