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: bucketize latency attribute #2269

Merged
merged 2 commits into from
Aug 6, 2024
Merged

feat: bucketize latency attribute #2269

merged 2 commits into from
Aug 6, 2024

Conversation

deniseli
Copy link
Contributor

@deniseli deniseli commented Aug 6, 2024

This PR bucketizes the latency attribute (NOT the latency metric! That would be very bad!)

For better filtering capabilities in datadog, we need to bucket our high-cardinality numeric attributes. This uses log base8 because:

  1. That seems to give the most useful results for current production numbers we're seeing in DD - good functional granularity for analysis purposes without being so granular that it's annoying to sort through the buckets. Current values range from 62 to 20279, concentrated in the 100-1000 range.
  2. Base 8 bucket labels are all powers of 2, so it's relatively easy for our brains to skim

Sample output:

-> ftl.async_call.time_since_scheduled_at_ms.bucket: Str([8,64))

Issue: #2194

@deniseli deniseli marked this pull request as ready for review August 6, 2024 19:12
@deniseli deniseli requested a review from alecthomas as a code owner August 6, 2024 19:12
@deniseli deniseli requested review from a team and matt2e and removed request for a team August 6, 2024 19:12
@ftl-robot ftl-robot mentioned this pull request Aug 6, 2024
@deniseli deniseli merged commit 8fcbd33 into main Aug 6, 2024
68 checks passed
@deniseli deniseli deleted the dli/lat-buckets branch August 6, 2024 19:39
Copy link
Collaborator

@alecthomas alecthomas left a comment

Choose a reason for hiding this comment

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

Can we perform this bucketing in DD instead?

@deniseli
Copy link
Contributor Author

deniseli commented Aug 6, 2024

Can we perform this bucketing in DD instead?

I couldn't find a way to do it. Oddly, DD has decent support for advanced string filtering and bools, but not even basics for numeric-type attrs. At least, I couldn't find any docs on it, and nothing intuitive I tried in the UI worked either.

Worse, DD tries to show every single value of the attr in its filter dropdown, which fills up the dropdown to its max size and pushes all the other attrs out of view, so then you can't explore the values of any other attributes.

One option would be to reduce base to 4 or something, because we can add groups of allowed values for filtering... btw if anyone can find a good way to filter by < and > on int attrs in DD, I'd love to undo this

@matt2e matt2e added the approved Marks an already closed PR as approved label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Marks an already closed PR as approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants