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(tracing): enable setting a sampling ratio for tracing #143

Merged
merged 5 commits into from
Jan 7, 2025

Conversation

hannahhoward
Copy link
Member

Goals

Set us up to enable traces in our prod w3s.link environment

Implementation

Essentially, to enable tracing in prod, we need to cut down on number of requests we sample traces for. This PR introduces the simplest form of sampling: head sampling, where we simply only enable traces on a small set of samples

The next step would be to do some kind of tail sampling -- sent traces on error response codes for example.

For now I set the sampling ratio for prod to 1% -- could use some guidance from @travis who might have the best sense of how many requests we're talking about -- our current Honeycomb account supports 100 million per month.

@hannahhoward hannahhoward requested a review from travis January 5, 2025 00:31
src/bindings.d.ts Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
@travis
Copy link
Member

travis commented Jan 6, 2025

Freeway handles about 2-5m requests per hour, 2.12b over the last month, so 1% of that should use up about 20% of our Honeycomb allocation - seems reasonable for now, and we can knock it down an order of magnitude if we need the space for another app.

Screenshot 2025-01-06 at 11 22 47 AM

@hannahhoward
Copy link
Member Author

@travis lowered the ratio to 0.0005 cause I now see that the billing is per span and I think we're looking at 20 spans or so per trace.

@hannahhoward hannahhoward merged commit 241545f into main Jan 7, 2025
1 check passed
@hannahhoward hannahhoward deleted the feat/setup-sampled-tracing branch January 7, 2025 19:30
hannahhoward pushed a commit that referenced this pull request Jan 9, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.23.0](v2.22.1...v2.23.0)
(2025-01-09)


### Features

* **tracing:** enable setting a sampling ratio for tracing
([#143](#143))
([241545f](241545f))


### Bug Fixes

* **freeway:** enable tracing properly and resolve fetch issue
([#140](#140))
([c60037d](c60037d))
* handle options req for cors preflight
([#137](#137))
([79de5b1](79de5b1))

---
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>
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.

3 participants