Module observability

Module observability 

Source
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§

GpuDeviceMemoryStats
Per-device GPU memory statistics.
GpuMemoryAllocation
A tracked GPU memory allocation.
GpuMemoryDashboard
GPU Memory Dashboard for monitoring and visualization.
GpuMemoryPoolStats
GPU memory pool statistics.
GpuMemoryThresholds
Memory pressure thresholds for alerts.
GpuProfilerManager
GPU profiler manager for selecting and using profilers.
GrafanaDashboard
Grafana dashboard builder.
GrafanaPanel
A Grafana panel definition.
MetricDefinition
A Prometheus metric definition.
MetricSample
A single metric sample.
NullProfiler
Null profiler implementation (no-op).
NvtxProfiler
NVTX (NVIDIA Tools Extension) profiler stub.
ObservabilityContext
Global observability context for managing spans and metrics.
ProfilerColor
GPU profiler marker color.
ProfilerRange
GPU profiler range handle for scoped profiling.
ProfilerScope
RAII scope for profiler ranges.
PrometheusExporter
Prometheus metrics exporter.
RenderDocProfiler
RenderDoc profiler stub.
RingKernelCollector
Prometheus collector for RingKernel metrics.
Span
An OpenTelemetry-compatible span.
SpanBuilder
Builder for creating spans with fluent API.
SpanEvent
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§

AttributeValue
Attribute value types.
GpuMemoryType
GPU memory allocation type.
GpuProfilerBackend
GPU profiler backend type.
MemoryPressureLevel
Memory pressure level.
MetricType
Prometheus metric type.
PanelType
Grafana panel type.
ProfilerError
Profiler error type.
SpanKind
Span kind (OpenTelemetry compatible).
SpanStatus
Span status (OpenTelemetry compatible).

Traits§

GpuProfiler
Trait for GPU profiler integration.
PrometheusCollector
Trait for collecting Prometheus metrics.