From acef50c2220d4dd1f9e58fee381033c81a5ede10 Mon Sep 17 00:00:00 2001 From: Piotr Wolski Date: Mon, 20 May 2024 12:24:41 -0400 Subject: [PATCH] datastreams: Update mapping --- internal/datastreams/processor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/datastreams/processor.go b/internal/datastreams/processor.go index 21b1baa626..81900c2cb0 100644 --- a/internal/datastreams/processor.go +++ b/internal/datastreams/processor.go @@ -32,7 +32,9 @@ const ( defaultServiceName = "unnamed-go-service" ) -var sketchMapping, _ = mapping.NewLogarithmicMapping(0.01) +// use the same gamma and index offset as the Datadog backend, to avoid doing any conversions in +// the backend that would lead to a loss of precision +var sketchMapping, _ = mapping.NewLogarithmicMappingWithGamma(1.015625, 1.8761281912861705) type statsPoint struct { edgeTags []string