Skip to content

Fix missing volumesStreamedViaFallback Prometheus metric - #9503

Merged
taylorsilva merged 1 commit into
concourse:masterfrom
alicul:fix-missing-streaming-metrics
Mar 25, 2026
Merged

taylorsilva merged 1 commit into
concourse:masterfrom
alicul:fix-missing-streaming-metrics

Conversation

@alicul

@alicul alicul commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

The volumesStreamedViaFallback metric was being tracked internally but not exposed via Prometheus. This metric is incremented when volume streaming falls back to streaming through the ATC instead of direct worker-to-worker streaming. I think this was introduced in: #9390

The metric is exposed as:
concourse_volumes_volumes_streamed_via_fallback

I was preparing the (next) PR to extend a bit the streaming metrics like:

1. Counters
- `concourse_volumes_streaming_p2p_success_total` - Successful P2P streams
- `concourse_volumes_streaming_p2p_failure_total` - Failed P2P streams
- `concourse_volumes_streaming_atc_success_total` - Successful ATC streams
- `concourse_volumes_streaming_atc_failure_total` - Failed ATC streams

2. Histograms
- `concourse_volumes_streaming_duration_seconds{method,status}` - Stream duration by method and status
- `concourse_volumes_streaming_size_bytes` - Volume size distribution

3. Gauges
- `concourse_volumes_streaming_in_progress{method}` - Currently active streams

when I noticed the issue with pre-existing: volumesStreamedViaFallback.

I did some local manual test and checked that metrics increase as expected by the test:

$ curl -s http://localhost:9090/metrics | grep -E "concourse_volumes_volumes_streamed|concourse_volumes_volumes_streamed_via_fallback" | grep -v "^#"
concourse_volumes_volumes_streamed 0
concourse_volumes_volumes_streamed_via_fallback 0

$ curl -s http://localhost:9090/metrics | grep -E "concourse_volumes_volumes_streamed|concourse_volumes_volumes_streamed_via_fallback" | grep -v "^#"
concourse_volumes_volumes_streamed 1
concourse_volumes_volumes_streamed_via_fallback 0

$ curl -s http://localhost:9090/metrics | grep -E "concourse_volumes_volumes_streamed|concourse_volumes_volumes_streamed_via_fallback" | grep -v "^#"
concourse_volumes_volumes_streamed 1
concourse_volumes_volumes_streamed_via_fallback 1

I know it doesn't show much, but if you wish, I can post the full steps (docker compose with multiple workers in different networks with P2P enabled, + test pipeline.)

The volumesStreamedViaFallback metric was being tracked internally
but not exposed via Prometheus. This metric is incremented when
volume streaming falls back to streaming through the ATC instead
of direct worker-to-worker streaming.

The metric is exposed as:
concourse_volumes_volumes_streamed_via_fallback
@alicul
alicul requested a review from a team March 24, 2026 21:38

@taylorsilva taylorsilva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I trust you when you say you verified this locally :)

@taylorsilva
taylorsilva merged commit 21793c2 into concourse:master Mar 25, 2026
12 checks passed
@taylorsilva taylorsilva added this to the v8.2.0 milestone Mar 25, 2026
@alicul
alicul deleted the fix-missing-streaming-metrics branch March 26, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants