📊 Simple metric data structure for transmission over Rednet.
This is the wire format for sending metrics from clients to collectors.
Each metric includes all the context needed for proper aggregation and storage.
interfaceRednetMetric{     attributes:Record<string,unknown>;     description:string;     name:string;     resource:Record<string,unknown>;     scope:{name:string;version:string};     timestamp:number;     type:"counter"|"gauge"|"histogram";     unit:string;     value:         |number         |{             buckets:{bound:number;count:number}[];             count:number;             sum:number;         }; }
Key-value attributes for this specific measurement
description
description:string
Human-readable description of what this metric measures
name
name:string
Unique name for this metric
resource
resource:Record<string,unknown>
Resource attributes identifying the source
scope
scope:{name:string;version:string}
Instrumentation scope information
Type declaration
name: string
Name of the instrumentation scope
version: string
Version of the instrumentation scope
timestamp
timestamp:number
Timestamp in nanoseconds since Unix epoch
type
type:"counter"|"gauge"|"histogram"
The type of metric - determines how it's aggregated
unit
unit:string
Unit of measurement (e.g., "bytes", "seconds", "requests")
value
value:     |number     |{         buckets:{bound:number;count:number}[];         count:number;         sum:number;     }
The metric value - number for counter/gauge, histogram data for histogram
📊 Simple metric data structure for transmission over Rednet.
This is the wire format for sending metrics from clients to collectors. Each metric includes all the context needed for proper aggregation and storage.
Example