Skip to content

Private/mayuresh/pcd 10432 - #2

Merged
PF9-kunal merged 5 commits into
mainfrom
private/mayuresh/PCD-10432
Nov 8, 2026
Merged

PF9-kunal merged 5 commits into
mainfrom
private/mayuresh/PCD-10432

Conversation

@PF9-kunal

Copy link
Copy Markdown
Collaborator

No description provided.

mayuresh108 and others added 5 commits November 5, 2026 09:52
Pulled from private/kunal/PCD-10199-v170 (PCD-10199) so this branch can be
built into an image directly. Kept separate from upstream's promu-based
Dockerfile/Makefile so rebases onto upstream stay conflict-free.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Each exporter's Collect() ran every metric's Fn serially, so a service's
wall-clock cost is the sum of its metrics (e.g. neutron: port 192s +
subnets 94s + network_ip_availabilities_total 70s, per the sweep-timing
evidence on this ticket), not the slowest one of them.

Ported upstream's errgroup-based Collect (v2.0.0-alpha,
exporters/exporter.go, commit 3588a4a) onto this fork's go-kit logging
and collection path, without the rest of that alpha's changes (gophercloud
v2, slog, persistent exporters). Metrics only read exporter state (client,
Metrics map, config) and write to ch, both safe for concurrent use, and
the one shared mutable state (the package-level endpointOpts map) is only
written during the serial exporter-setup phase, before any Collect() runs
-- confirmed by reading every exporters/*.go metric function and by `go
test -race` (20x repeated, GOMAXPROCS=1/4) across the full suite.

That same -race run caught a real, pre-existing data race once collection
went concurrent: jarcoal/httpmock's Responder.Times() uses an
unsynchronized closure counter (confirmed unfixed as of httpmock v1.4.2,
upstream's own version -- their CI doesn't run -race either, so they've
never hit this). Two metrics sharing one mocked URL (e.g. glance's
ListImages and ListImageBytes) now call it concurrently. Fixed by
serializing our own test responder registration in
exporter_test.go:SetResponseFromFixture with a mutex, rather than
patching the vendored library.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
hadolint (DL3007) flags FROM ...:latest as non-reproducible. quay.io/
prometheus/busybox only publishes latest/glibc/uclibc tags (no semver),
so pin latest's current digest instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@PF9-kunal
PF9-kunal merged commit 84cd8fc into main Nov 8, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants