Skip to content

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Aug 18, 2025

What does this PR do?

This PR introduces a Datadog::Core::DDSketch API that is implemented by libdatadog via the recently added ddsketch ffi ( DataDog/libdatadog#1135 ).

For more details on ddsketch, see https://www.datadoghq.com/blog/engineering/computing-accurate-percentiles-with-ddsketch/ .

I'm opening this PR as an RFC/draft for two reasons:

  1. This PR depends on ekump/APMSP-2151 create ddsketch ffi crate libdatadog#1135 which has not yet been released in a libdatadog stable release
  2. I'm hoping to get some feedback from the folks that plan to use ddsketch
  3. I'm hoping the todo around error handling can be fixed before we merge this in

Motivation:

Some upcoming APM features are going to require ddsketch support on the library (the agent has been using it for a long time).

Change log entry

None.

Additional Notes:

N/A

How to test the change?

You'll need libdatadog master to run this branch. Other than that, I've included test coverage for this API, including a encode/decode round trip.

ivoanjo added 12 commits August 18, 2025 10:14
On a second pass, this does seem like it makes sense to live inside
core.
We were introducing a bit too much copy/pasta for each part of core
that depends on libdatadog_api, so I've consolidated them.

This opens the door to easily adding ddsketch without more repetition.
We'll use this for integration-style testing with the libdatadog
ddsketch implementation.

This file was imported from
https://raw.githubusercontent.com/DataDog/sketches-go/cd8144afd502b4ee58d5f6c2efe49c4bcf56270b/ddsketch/pb/ddsketch.proto
without any changes.
@ivoanjo ivoanjo requested review from a team as code owners August 18, 2025 16:21
@github-actions github-actions bot added the core Involves Datadog core libraries label Aug 18, 2025
@ivoanjo ivoanjo marked this pull request as draft August 18, 2025 16:31
@ivoanjo ivoanjo requested review from ekump and ericfirth August 18, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants