googleapis / googleapis/google-cloud-python
Add support for `monitoring.regex.full_match` in the `google-cloud-monitoring`
- Vorherrschende Sprache
- Python
- Sterne
- 5.4k
- Forks
- 1.8k
- Ø Merge
- 3 T. 4 Std.
- Gemergte PRs (30 T.)
- 122
Beschreibung
The `google-cloud-monitoring` does not support `monitoring.regex.full_match`.
See https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-monitoring/google/cloud/monitoring_v3/query.py#L622-L637
I need to have a way to pass `key=value` without escaping to fully use the functionality, e.g. the `monitoring.regex.full_match`. Now, when I call e.g.
```python
client = monitoring_v3.MetricServiceClient()
project_id = '...'
end_time = datetime.fromisoformat("...")
query = (Query(client, project_id,
metric_type='cloudfunctions.googleapis.com/function/execution_count', end_time=end_time,
days=30,
).select_resources(
function_name="""monitoring.regex.full_match(".*-something-.*")""",
region="europe-west1")
query.to_dataframe()
```
I get an error, because the filter built from the params is like this:
```
'metric.type = "cloudfunctions.googleapis.com/function/execution_count" AND resource.label.function_name = "monitoring.regex.full_match(".*-something-.*")" AND resource.label.region = "europe-west1"'
```
but I need
```
'metric.type = "cloudfunctions.googleapis.com/function/execution_count" AND resource.label.function_name = monitoring.regex.full_match(".*-something-.*") AND resource.label.region = "europe-west1"'
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.