Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
66 lines
1.5 KiB
Plaintext
66 lines
1.5 KiB
Plaintext
import type { Attributes, TypedAttributeValue } from '../attributes';
|
|
export type MetricType = 'counter' | 'gauge' | 'distribution';
|
|
export interface Metric {
|
|
/**
|
|
* The name of the metric.
|
|
*/
|
|
name: string;
|
|
/**
|
|
* The value of the metric.
|
|
*/
|
|
value: number;
|
|
/**
|
|
* The type of metric.
|
|
*/
|
|
type: MetricType;
|
|
/**
|
|
* The unit of the metric value.
|
|
*/
|
|
unit?: string;
|
|
/**
|
|
* Arbitrary structured data that stores information about the metric.
|
|
*/
|
|
attributes?: Record<string, unknown>;
|
|
}
|
|
/**
|
|
* @deprecated this was not intended for public consumption
|
|
*/
|
|
export type SerializedMetricAttributeValue = TypedAttributeValue;
|
|
export interface SerializedMetric {
|
|
/**
|
|
* Timestamp in seconds (epoch time) indicating when the metric was recorded.
|
|
*/
|
|
timestamp: number;
|
|
/**
|
|
* The trace ID for this metric.
|
|
*/
|
|
trace_id: string;
|
|
/**
|
|
* The span ID for this metric.
|
|
*/
|
|
span_id?: string;
|
|
/**
|
|
* The name of the metric.
|
|
*/
|
|
name: string;
|
|
/**
|
|
* The type of metric.
|
|
*/
|
|
type: MetricType;
|
|
/**
|
|
* The unit of the metric value.
|
|
*/
|
|
unit?: string;
|
|
/**
|
|
* The value of the metric.
|
|
*/
|
|
value: number;
|
|
/**
|
|
* Arbitrary structured data that stores information about the metric.
|
|
*/
|
|
attributes?: Attributes;
|
|
}
|
|
export type SerializedMetricContainer = {
|
|
items: Array<SerializedMetric>;
|
|
};
|
|
//# sourceMappingURL=metric.d.ts.map |