You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/google-cloud-spanner/google/cloud/spanner_v1/metrics/README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Custom Metric Exporter
1
+
# Custom Metric Exporter
2
2
The custom metric exporter, as defined in [metrics_exporter.py](./metrics_exporter.py), is designed to work in conjunction with OpenTelemetry and the Spanner client. It converts data into its protobuf equivalent and sends it to Google Cloud Monitoring.
3
3
4
4
## Filtering Criteria
@@ -10,8 +10,10 @@ The exporter filters metrics based on the following conditions, utilizing values
10
10
*`attempt_count`
11
11
*`operation_latencies`
12
12
*`operation_count`
13
-
*`gfe_latency`
14
-
*`gfe_missing_header_count`
13
+
*`gfe_latencies`
14
+
*`gfe_connectivity_error_count`
15
+
*`afe_latencies`
16
+
*`afe_connectivity_error_count`
15
17
16
18
## Service Endpoint
17
19
The exporter sends metrics to the Google Cloud Monitoring [service endpoint](https://cloud.google.com/python/docs/reference/monitoring/latest/google.cloud.monitoring_v3.services.metric_service.MetricServiceClient#google_cloud_monitoring_v3_services_metric_service_MetricServiceClient_create_service_time_series), distinct from the regular client endpoint. This service endpoint operates under a different quota limit than the user endpoint and features an additional server-side filter that only permits a predefined set of metrics to pass through.
Extracts resource information from the metadata based on the path.
58
58
59
-
This method iterates through the metadata dictionary to find the first tuple containing the key 'google-cloud-resource-prefix'. It then extracts the path from this tuple and parses it to extract project, instance, and database information using the _parse_resource_path method.
60
-
61
59
Args:
62
-
metadata (Dict[str, str]): A dictionary containing metadata information.
60
+
metadata (Any): A sequence or dictionary containing metadata information.
63
61
64
62
Returns:
65
63
Dict[str, str]: A dictionary containing extracted project, instance, and database information.
66
64
"""
67
-
# Extract resource info from the first metadata tuple containing :path
0 commit comments