chore: Remove unused files by parthea · Pull Request #1319 · googleapis/python-spanner

added 2 commits

March 5, 2025 11:05

@parthea parthea changed the title Remove unused files chore: Remove unused files

Mar 5, 2025

sakthivelmanii

@parthea parthea deleted the remove-unused-files branch

March 5, 2025 16:00

waiho-gumloop added a commit to waiho-gumloop/python-spanner that referenced this pull request

Mar 25, 2026
trace_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