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

Improve the Datadog scaler, including a new optional parameter metricUnavailableValue to fill data when no Datadog metric was returned #2694

Merged
merged 18 commits into from
Mar 14, 2022

Commits on Mar 14, 2022

  1. Do not query Datadog to check if the metric is active, to reduce rate…

    … limiting
    
    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    2a588c2 View commit details
    Browse the repository at this point in the history
  2. Return a specific error message when reaching rate limits

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    51361da View commit details
    Browse the repository at this point in the history
  3. Retry getting a metric up to 5 times, needed for short time windows

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    5c0c912 View commit details
    Browse the repository at this point in the history
  4. Allow for more granularity from points returned by Datadog

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    1a99cd8 View commit details
    Browse the repository at this point in the history
  5. Parse the query better and add rollup and aggregator only if missing

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    db1d5b9 View commit details
    Browse the repository at this point in the history
  6. Return the value of the last point in the series

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    817842d View commit details
    Browse the repository at this point in the history
  7. Linting code

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    c3d60ab View commit details
    Browse the repository at this point in the history
  8. Move function closer to context

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    1cd870c View commit details
    Browse the repository at this point in the history
  9. Improve how to get metrics from Datadog to reduce the chance of getti…

    …ng a null metric, without blocking
    
    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    90a816e View commit details
    Browse the repository at this point in the history
  10. Add new metricUnavailableValue optional parameter that if set, will r…

    …eturn that value as metric if the metric is not available for the time period selected
    
    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    8a3417a View commit details
    Browse the repository at this point in the history
  11. Fix IsActive to allow this scaler to scale to zero if needed

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    44c10bf View commit details
    Browse the repository at this point in the history
  12. Avoid race condition when deleting the test namespace

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    2b7c298 View commit details
    Browse the repository at this point in the history
  13. Wait a bit longer in tests to scale down

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    1f7b807 View commit details
    Browse the repository at this point in the history
  14. Modify changelog to add new datadog scaler parameter

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    089e78b View commit details
    Browse the repository at this point in the history
  15. Point to issue not PR in changelog

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    7a86aff View commit details
    Browse the repository at this point in the history
  16. Order changelog alphabetically

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    44dfd5d View commit details
    Browse the repository at this point in the history
  17. Improve Datadog query parsing error catching

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    80db12a View commit details
    Browse the repository at this point in the history
  18. Add tests for the parseAndTransformDatadogQuery function

    Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
    arapulido committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    9a5a747 View commit details
    Browse the repository at this point in the history