Skip to content

Add detailed volume streaming metrics - #1

Draft
google-labs-jules[bot] wants to merge 2 commits into
masterfrom
streaming-metrics
Draft

google-labs-jules[bot] wants to merge 2 commits into
masterfrom
streaming-metrics

Conversation

@google-labs-jules

Copy link
Copy Markdown

Implemented detailed volume streaming metrics with metadata labels.


PR created automatically by Jules for task 8553923536187875654 started by @alicul

Added new Prometheus metrics `concourse_volumes_streamed_count` and
`concourse_volumes_streamed_bytes` to track volume streaming operations
with additional metadata such as source/destination workers, step type,
step name, pipeline name, and job name.

This provides better visibility into data movement within the cluster compared
to the existing `concourse_volumes_volumes_streamed` metric.

Changes:
- Defined `VolumeStreamed` metric struct.
- Updated `PrometheusEmitter` to register and emit new metrics.
- Updated `CreatedVolume` to retrieve container metadata.
- Instrumented `Streamer` to count bytes and emit the new metrics.
@google-labs-jules

Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

Removed the `build_id` label from `concourse_volumes_streamed_count` and
`concourse_volumes_streamed_bytes` metrics. Using `build_id` as a label
would cause cardinality explosion in Prometheus as it is an unbounded
value.

Also updated generated fakes.
alicul added a commit that referenced this pull request Mar 16, 2026
Create comprehensive database schema to support multi-network P2P streaming.

New tables:
- network_segments: Define network boundaries (private/public/overlay)
- worker_networks: Map workers to network segments with P2P endpoints
- worker_connectivity: Track connectivity between worker pairs
- relay_workers: Workers capable of relaying P2P streams
- relay_network_bridges: Network bridges that relay workers can provide

This schema enables:
- Network topology discovery and storage
- Multi-network worker tracking
- Connectivity matrix for routing decisions
- Relay worker registration and capability tracking

Includes indexes for performance on common queries.

Part of multi-network P2P implementation (PR #1).

Co-Authored-By: Claude <[email protected]>
alicul added a commit that referenced this pull request Mar 16, 2026
Implement comprehensive data models and database access layer for network
topology management.

Core types:
- NetworkSegment: Represents a network segment (CIDR, type, priority)
- WorkerNetwork: Maps workers to network segments with P2P endpoints
- WorkerConnectivity: Stores connectivity test results between workers
- RelayWorker: Defines relay-capable workers
- RelayNetworkBridge: Defines network bridges relay workers can provide

NetworkTopologyFactory provides:
- Complete topology retrieval
- Network segment CRUD operations
- Worker network updates and queries
- Connectivity matrix management
- Relay worker registration and management

These models enable the ATC to maintain a complete view of the network
topology for intelligent P2P routing decisions.

Part of multi-network P2P implementation (PR #1).

Co-Authored-By: Claude <[email protected]>
alicul added a commit that referenced this pull request Mar 16, 2026
Implement worker-side network topology detection and reporting to ATC.

Network Detector:
- Detects all network interfaces and their properties
- Identifies network segments (private/public/overlay)
- Filters interfaces based on configuration patterns
- Generates P2P endpoints for each network segment
- Tests connectivity to other workers' P2P endpoints

Network Reporter:
- Periodically reports network topology to ATC
- Sends detected network segments with P2P endpoints
- Tests and reports connectivity to other workers
- Handles network topology updates

This enables workers to:
- Auto-discover their network configuration
- Report multiple network segments to ATC
- Test P2P connectivity to other workers
- Keep network topology up-to-date

Part of multi-network P2P implementation (PR #1).

Co-Authored-By: Claude <[email protected]>
alicul added a commit that referenced this pull request Mar 16, 2026
Implement REST API endpoints for network topology management.

New endpoints:
- GET /api/v1/network-topology - Get complete network topology
- GET /api/v1/workers/:name/networks - Get worker's network segments
- PUT /api/v1/workers/:name/networks - Update worker's network segments
- GET /api/v1/workers/:name/p2p-urls - Get worker's P2P URLs (multi-network)
- PUT /api/v1/workers/:name/connectivity - Update connectivity test results
- GET /api/v1/connectivity-matrix - Get full connectivity matrix

These endpoints enable:
- Workers to report their network topology
- ATC to maintain network topology state
- Clients to query network information
- Multi-network P2P URL discovery

The P2P URLs endpoint is backward compatible, returning multiple
endpoints with network metadata for multi-network aware clients.

Part of multi-network P2P implementation (PR #1).

Co-Authored-By: Claude <[email protected]>
alicul added a commit that referenced this pull request Mar 16, 2026
Add comprehensive metrics for monitoring network topology discovery and
connectivity testing.

New Prometheus metrics:
- concourse_network_topology_changes_total: Network topology changes detected
- concourse_network_segments_discovered{worker}: Segments per worker
- concourse_network_connectivity_tests_total: Total connectivity tests
- concourse_network_p2p_connectivity_test_success_total: Successful P2P tests
- concourse_network_p2p_connectivity_test_failure_total: Failed P2P tests

These metrics enable monitoring of:
- Network topology stability
- Worker network configuration
- P2P connectivity health
- Network discovery effectiveness

Part of multi-network P2P implementation (PR #1).

Co-Authored-By: Claude <[email protected]>
alicul added a commit that referenced this pull request Mar 16, 2026
Document the network topology discovery implementation, including:
- Problem statement and solution overview
- Database schema and data models
- Worker-side network detection
- API endpoints and metrics
- Configuration and testing guidelines
- Migration guide for operators

This PR lays the foundation for multi-network P2P streaming by
enabling comprehensive network topology discovery and management.

Part of multi-network P2P implementation (PR #1).

Co-Authored-By: Claude <[email protected]>
alicul added a commit that referenced this pull request Mar 17, 2026
Document the multi-network P2P routing implementation including:
- Routing engine architecture
- Connectivity testing approach
- Multi-endpoint streaming logic
- Performance metrics and monitoring
- Configuration and testing guidelines

This PR builds on network topology discovery (PR #1) to enable
intelligent P2P routing across multiple network segments.

Part of multi-network P2P implementation (PR #2).

Co-Authored-By: Claude <[email protected]>
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.

0 participants