Skip to content

Conversation

@ElastiJAM
Copy link
Contributor

@ElastiJAM ElastiJAM commented Dec 27, 2025

feat(metrics): refine metrics naming and organization

Changes

Refactors metrics naming to use consistent subsystem prefixes and standardizes processing latency metric labels. Replaces EXPORT_LATENCY_SECONDS with unified PROCESSING_LATENCY_SECONDS histogram.

Key Changes

  • New ProcessingStage enum: Type-safe labels for processing latency metrics (ebpf_ringbuf_output, producer_output, decorator_output)
  • Metrics reorganization: All metrics now use subsystem prefixes (e.g., mermin_ebpf_map_entriesmermin_ebpf_map_entries)
  • Unified latency tracking: Replaced EXPORT_LATENCY_SECONDS with PROCESSING_LATENCY_SECONDS using decorator_output stage label
  • Removed ExportStatus::Attempted: Simplified export status tracking
  • Renamed metrics: FLOW_PRODUCER_FLOW_SPANS_TOTALPROCESSING_TOTAL for clarity
  • Updated documentation: Reflects new metric names and label values

Type of change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation
  • Other:

Testing

  • Verified metrics registry initialization with debug enabled/disabled
  • Confirmed processing latency timers use correct stage labels
  • Validated metric name changes don't break existing dashboards (documentation updated)

Proof it works

  • All metrics compile and register correctly
  • Processing latency tracked at all three stages (ebpf_ringbuf_output, producer_output, decorator_output)
  • Documentation updated to reflect new metric names

Checklist

  • I've tested my changes
  • I've updated relevant documentation
  • My code follows the project's style (run cargo fmt and cargo clippy)
  • All tests pass

Notes

This is a metrics naming refinement that improves consistency and maintainability. The subsystem-based naming makes it easier to understand metric relationships and reduces naming conflicts. The unified processing latency metric provides better observability across the pipeline.

@ElastiJAM ElastiJAM marked this pull request as ready for review December 27, 2025 20:20
@veronica-m-ef veronica-m-ef force-pushed the CAN-126-metrics-refinement branch from a7af390 to b2e528a Compare December 31, 2025 18:42
Copy link
Contributor

@maksym-iv-ef maksym-iv-ef left a comment

Choose a reason for hiding this comment

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

Added few notes

@veronica-m-ef veronica-m-ef force-pushed the CAN-126-metrics-refinement branch from 5e1953b to ff02856 Compare January 5, 2026 17:26
svencowart
svencowart previously approved these changes Jan 6, 2026
@veronica-m-ef veronica-m-ef merged commit 229352f into beta Jan 7, 2026
18 checks passed
@veronica-m-ef veronica-m-ef deleted the CAN-126-metrics-refinement branch January 7, 2026 17:17
@maksym-iv-ef
Copy link
Contributor

In a follow-up PRs we are going to iterate over unifying metrics for the eBPF maps so each eBPF map to have same subset of metrics in order to simplify eBPF map observability

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.

5 participants