-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Transformers: Add smoothing transformer #111077
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
base: main
Are you sure you want to change the base?
Transformers: Add smoothing transformer #111077
Conversation
Added a smoothing transformer to help clean up noisy time series data. It uses the ASAP algorithm to pick the most important data points while keeping the overall shape and trends intact. The transformer always keeps the first and last points so you get the complete time range. I also added a test for it.
27d6e18 to
e089343
Compare
|
Hello @vesalaakso-oura , thank you for this PR. We were wondering if you were aware of the "resample" expression available already in Grafana. It works a bit differently than this PR, but it may solve your needs. Take a look at a demo here and let me know what you think! https://play.grafana.org/d/krmmxss/resampling-demo?folderUid=ae9kn9tsqxe68c&orgId=1&from=now-6h&to=now&timezone=utc |
Hello @gelicia, We believe resample and ASAP solve different problems. Resample changes timestamps to a consistent interval so series can line up for math but that can blur spikes or hide outliers. ASAP smooths noise while keeping trends and outliers visible (like Datadog's autosmoother). We believe ASAP and resample just complement each other. |
|
Hi @kylebrandt , thanks a lot for taking the time to write up the SQL approach and sharing the example. I really appreciate the effort you put into it. 🙇 My main concern is scalability in larger orgs. If every team needs to ship or maintain their own SQL query, it quickly becomes a burden. It also makes it harder to convince teams migrating from datadog, where autosmoothing is just available out of the box. Having a built-in ASAP transformation would not only help internally but could also tip other organisations out there to consider moving away from datadog to the grafana stack. ASAP itself is well researched. The original paper shows that ASAP can spot meaningful trends and outliers while suppressing noise, so having it as a built-in transformation would be an easier sell. |
|
Hello @gelicia, is this a feature we can proceed with, or do you have any concerns or alternative ways to implement it? |
|
@vesalaakso-oura thank you for your patience, adding a new transformation to the catalog is something we have to discuss internally so we are checking in with folks! I'll let you know what we decide. |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions! |



What is this feature?
I built a smoothing transformer that cleans up noisy time series data. It uses the ASAP algorithm to pick which data points to keep. This works similarly to Datadog's
autosmooth()function.Why do we need this feature?
This was actually requested back in 2019 in issue #15022. I was migrating dashboards from Datadog to Grafana and we noticed that Datadog’s autosmoothing feature, which made graphs easier to read was not available in Grafana, so we had to find a workaround..
Who is this feature for?
Users coming from Datadog who miss the autosmooth functionality
Which issue(s) does this PR fix?:
Fixes #15022
Special notes for your reviewer:
I've included a gif demo of the feature in action 😎
Please check that:
What I built:
Demo gif:
