Expand description
Observability infrastructure for RingKernel.
This module provides production-ready observability features:
- OpenTelemetry Integration - Distributed tracing and metrics
- Prometheus Exporter - Metrics in Prometheus exposition format
- Grafana Dashboard - JSON templates for visualization
§Usage
ⓘ
use ringkernel_core::observability::{PrometheusExporter, GrafanaDashboard};
// Create Prometheus exporter
let exporter = PrometheusExporter::new();
exporter.register_collector(metrics_collector);
// Get Prometheus metrics
let metrics = exporter.render();
println!("{}", metrics);
// Generate Grafana dashboard JSON
let dashboard = GrafanaDashboard::new("RingKernel Metrics")
.add_kernel_panel()
.add_latency_panel()
.add_throughput_panel()
.build();Structs§
- GpuDevice
Memory Stats - Per-device GPU memory statistics.
- GpuMemory
Allocation - A tracked GPU memory allocation.
- GpuMemory
Dashboard - GPU Memory Dashboard for monitoring and visualization.
- GpuMemory
Pool Stats - GPU memory pool statistics.
- GpuMemory
Thresholds - Memory pressure thresholds for alerts.
- GpuProfiler
Manager - GPU profiler manager for selecting and using profilers.
- Grafana
Dashboard - Grafana dashboard builder.
- Grafana
Panel - A Grafana panel definition.
- Metric
Definition - A Prometheus metric definition.
- Metric
Sample - A single metric sample.
- Null
Profiler - Null profiler implementation (no-op).
- Nvtx
Profiler - NVTX (NVIDIA Tools Extension) profiler stub.
- Observability
Context - Global observability context for managing spans and metrics.
- Profiler
Color - GPU profiler marker color.
- Profiler
Range - GPU profiler range handle for scoped profiling.
- Profiler
Scope - RAII scope for profiler ranges.
- Prometheus
Exporter - Prometheus metrics exporter.
- Render
DocProfiler - RenderDoc profiler stub.
- Ring
Kernel Collector - Prometheus collector for RingKernel metrics.
- Span
- An OpenTelemetry-compatible span.
- Span
Builder - Builder for creating spans with fluent API.
- Span
Event - An event that occurred during a span.
- SpanId
- A span ID compatible with OpenTelemetry W3C Trace Context.
- TraceId
- A trace ID compatible with OpenTelemetry W3C Trace Context.
Enums§
- Attribute
Value - Attribute value types.
- GpuMemory
Type - GPU memory allocation type.
- GpuProfiler
Backend - GPU profiler backend type.
- Memory
Pressure Level - Memory pressure level.
- Metric
Type - Prometheus metric type.
- Panel
Type - Grafana panel type.
- Profiler
Error - Profiler error type.
- Span
Kind - Span kind (OpenTelemetry compatible).
- Span
Status - Span status (OpenTelemetry compatible).
Traits§
- GpuProfiler
- Trait for GPU profiler integration.
- Prometheus
Collector - Trait for collecting Prometheus metrics.