chore: Remove unused files by parthea · Pull Request #1319 · googleapis/python-spanner
added 2 commits
March 5, 2025 11:05
parthea
changed the title
Remove unused files
chore: Remove unused files
parthea
deleted the
remove-unused-files
branch
waiho-gumloop added a commit to waiho-gumloop/python-spanner that referenced this pull request
Mar 25, 2026trace_call() wraps every Spanner operation with a bare MetricsCapture() that creates a MetricsTracer without project_id or instance_id. Since every caller of trace_call already provides its own MetricsCapture with resource_info, this inner one is redundant. The redundant tracer records operation metrics with incomplete resource labels on every operation. Because OpenTelemetry uses cumulative aggregation, these orphan data points persist for the process lifetime and get re-exported every 60 seconds. Cloud Monitoring rejects them with INVALID_ARGUMENT (missing instance_id), producing repeated error logs. Removing the bare MetricsCapture from trace_call eliminates the orphan metric data points entirely. Callers continue to provide their own MetricsCapture(resource_info) with correct labels. Fixes: googleapis#1319
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters