-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Allow using a metric type in the Query method select_metrics
.
#2735
Allow using a metric type in the Query method select_metrics
.
#2735
Conversation
@rimey: Please take a look. |
4d42b87
to
90ff89b
Compare
new_metric_type = kwargs.get('metric_type') | ||
if new_metric_type is not None: | ||
self.metric_type = new_metric_type | ||
kwargs.pop('metric_type', None) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
b7335ab
to
84122a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than one tiny nit
@@ -314,6 +316,20 @@ def select_metrics(self, *args, **kwargs): | |||
|
|||
metric.label.<label> = ends_with("<value>") | |||
|
|||
As a special case, ``"metric_type"`` is treated as a special | |||
pseudo-label corresponding to the filter object ``metric.type``. | |||
For example, ``metric_type=<value>`` generates:: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This is useful when a user wants to apply the exact same filters (duration, aggregation, resource labels) for a different metric type.
84122a1
to
52f304f
Compare
Hi @supriyagarg, We are still willing to accept this in principle, but can not make changes to your PR (since you have it configured not to allow this). Therefore, I am going to close this issue as stale for now. If you would like to make the necessary updates, though, we would be happy to consider doing this. |
…udPlatform/python-docs-samples#2735) * dialogflow: split up entity and entity type tests * delete old file * run black on new files
This is useful when a user wants to apply the exact same filters (duration, aggregation, resource labels) for a different metric type.