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

Add scopedVars and a special __time_delta entry to data available for Arithmetic. #20

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

hakanf
Copy link

@hakanf hakanf commented Mar 28, 2018

The use case is to be able to scale CloudWatch Sum or SampleCount data to the
same unit, regardless of the sample period used when performing the CloudWatch
query.

Hakan Fouren added 2 commits March 29, 2018 00:50
Artihmetics.
The use case is to be able to scale CloudWatch Sum or SampleCount data to the
same unit, regardless of the sample period used when performing the CloudWatch
query.
@Gauravshah
Copy link
Member

@ShilpaSivanesan can you please review this ?

… the function that evaluates the expression check that all the data is defined in the current sample.

This can happen with different sampling rates or phase for different data in the same panel.
Also check that the sample time falls within the expected window to avoid warning messages.
@hakanf
Copy link
Author

hakanf commented Mar 31, 2018

After some more testing I added a few more changes:

  1. Move scopedVars to the beginning of expression evaluation function arguments, since it can happen that not all data is defined in a given sample, causing scopedVars to shift back to a different argument
  2. Add functionality to extract required letters from the expression, and check that those letters hold defined data before calling the expression evaluation function
  3. Add a check that the sample time is within the expected window before running the expression evaluation function
  4. Avoid pushing datapoint to output data if the expression evaluation function throws an error

@Gauravshah
Copy link
Member

@hakanf please let us know when you are ready

@hakanf
Copy link
Author

hakanf commented Apr 16, 2018

@Gauravshah , sorry, I did not understand you were waiting for me.
I have now been using this code (including the pull request) on a daily basis since doing the pull request.
The last few commits correspond to minor issues that I encountered as I was using it.
With those, I do feel ready anytime.

@Gauravshah
Copy link
Member

thanks @hakanf

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.

2 participants