Repository navigation
Private/mayuresh/pcd 10432 - #2
Merged
Merged
Conversation
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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.