Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/google-cloud-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: maxkuzkin/gcloud-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 1, 2016

  1. Add support for the comparison filters of Google Monitoring API

    Google Monitoring API filters support <,<=,>,>= operators as described
    in its documentation:
    https://cloud.google.com/monitoring/api/v3/filters.
    
    Current version of the library only has mappings of:
    
    1. ’{key}_prefix:{value}' -> '{key} = starts_with("{value}")'
    2. ’{key}_suffix:{value}' -> '{key} = ends_with("{value}")'
    
    This patch introduces additional mappings of:
    
    3. ’{key}_greater:{value}' -> '{key} > {value}'
    4. ’{key}_greaterequal:{value}' -> '{key} >= {value}'
    5. ’{key}_less:{value}' -> '{key} < {value}'
    6. ’{key}_lessequal:{value}' -> '{key} <= {value}'
    
    So that it is possible, for example, to filter based on the
    response_code values range, as shown below:
    
    metric.type = "appengine.googleapis.com/http/server/response_count"
        AND metric.label.response_code < 600
        AND metric.label.response_code >= 500
    
    This patch will allow to remove “hack” in the following tool:
    https://github.com/odin-public/gcpmetrics that enables
    queries to the monitoring api from the command line.
    maxkuzkin committed Sep 1, 2016
    Configuration menu
    Copy the full SHA
    b31d7f6 View commit details
    Browse the repository at this point in the history
  2. Added unit tests to validate added comparison operators

    Fixed `tox -e cover` to have 100% coverage after proposed patch
    maxkuzkin committed Sep 1, 2016
    Configuration menu
    Copy the full SHA
    ddb6829 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2016

  1. PR improvements as suggested by Ken Rimey

    1. Added docstring for select_metrics with the explanation of
    additional endings. No reason to do the same for select_resources,
    because all of the currently defined monitored resource labels are
    strings.
    2. Removed array->tuple conversion, moved constant directly into the if
    condition.
    maxkuzkin committed Sep 2, 2016
    Configuration menu
    Copy the full SHA
    c5bf033 View commit details
    Browse the repository at this point in the history
  2. fixed doctoring indentation levels

    oops i did it again: messed docstring indentation while copy/pasting…
    :-)
    maxkuzkin committed Sep 2, 2016
    Configuration menu
    Copy the full SHA
    e0522e7 View commit details
    Browse the repository at this point in the history
Loading