use opentelemetry::KeyValue;
#[derive(Debug, Clone)]
pub struct InternalResourceMetrics {
pub resource: InternalResource,
pub scope_metrics: Vec<InternalScopeMetrics>,
pub schema_url: String,
}
#[derive(Debug, Clone)]
pub struct InternalResource {
pub attributes: Vec<KeyValue>,
pub dropped_attributes_count: u32,
}
#[derive(Debug, Clone)]
pub struct InternalScopeMetrics {
pub scope: InternalInstrumentationScope,
pub metrics: Vec<InternalMetric>,
pub schema_url: String,
}
#[derive(Debug, Clone)]
pub struct InternalInstrumentationScope {
pub name: String,
pub version: Option<String>,
pub attributes: Vec<KeyValue>,
pub dropped_attributes_count: u32,
}
#[derive(Debug, Clone)]
pub struct InternalMetric {
pub name: String,
pub description: Option<String>,
pub unit: Option<String>,
pub data: InternalMetricData,
}
#[derive(Debug, Clone)]
pub enum InternalMetricData {
Gauge(InternalGauge),
Sum(InternalSum),
Histogram(InternalHistogram),
}
#[derive(Debug, Clone)]
pub struct InternalGauge {
pub data_points: Vec<InternalNumberDataPoint>,
}
#[derive(Debug, Clone)]
pub struct InternalSum {
pub data_points: Vec<InternalNumberDataPoint>,
pub aggregation_temporality: i32,
pub is_monotonic: bool,
}
#[derive(Debug, Clone)]
pub struct InternalHistogram {
pub data_points: Vec<InternalHistogramDataPoint>,
pub aggregation_temporality: i32,
}
#[derive(Debug, Clone)]
pub struct InternalNumberDataPoint {
pub attributes: Vec<KeyValue>,
pub start_time_unix_nano: Option<u64>,
pub time_unix_nano: u64,
pub value: InternalNumberValue,
}
#[derive(Debug, Clone)]
pub enum InternalNumberValue {
AsInt(i64),
AsDouble(f64),
}
#[derive(Debug, Clone)]
pub struct InternalHistogramDataPoint {
pub attributes: Vec<KeyValue>,
pub start_time_unix_nano: Option<u64>,
pub time_unix_nano: u64,
pub count: u64,
pub sum: Option<f64>,
pub bucket_counts: Vec<u64>,
pub explicit_bounds: Vec<f64>,
pub min: Option<f64>,
pub max: Option<f64>,
}