Package-level declarations
Types
Link copied to clipboard
Aggregation temporality for sum metrics.
Link copied to clipboard
@Serializable
Polymorphic OTLP attribute value.
Link copied to clipboard
Gauge metric data points.
Link copied to clipboard
@Serializable
Describes the instrumentation scope (library) that produced the metrics.
Link copied to clipboard
Key/value attribute as defined by OTLP.
Link copied to clipboard
Link copied to clipboard
Root OTLP metrics payload following the OpenTelemetry proto JSON mapping.
Link copied to clipboard
@Serializable
Numeric data point used by gauge and sum types.
Link copied to clipboard
OTLP resource description.
Link copied to clipboard
@Serializable
Metrics attached to a single resource with their instrumentation scopes.
Link copied to clipboard
@Serializable
Metrics produced by a single instrumentation scope.
Link copied to clipboard
@Serializable
Sum metric payload.
Functions
Link copied to clipboard
fun OtlpJsonMetricsSink(delegate: Sink<String>, namespace: String = DEFAULT_NAMESPACE, scopeName: String = DEFAULT_SCOPE, resourceAttributes: Map<String, String> = emptyMap(), resourceAttributesProvider: (Meta) -> Map<String, String> = { resourceAttributes }, temporality: AggregationTemporality = AggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE, fixedTimestamp: Instant? = null, surfaceVersion: MetricsSchemaVersion? = null, json: Json = DefaultJson): MetricsSink
Builds a sink that emits OTLP JSON (metrics) strings.
Link copied to clipboard
fun MetricsSnapshot.toOtlpPayload(namespace: String = DEFAULT_NAMESPACE, resourceAttributes: Map<String, String> = emptyMap(), resourceAttributesProvider: (Meta) -> Map<String, String> = { resourceAttributes }, scopeName: String = DEFAULT_SCOPE, temporality: AggregationTemporality = AggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE, fixedTimestamp: Instant? = null, surfaceVersion: MetricsSchemaVersion? = null): OtlpMetricsPayload
Maps a MetricsSnapshot to an OTLP JSON payload ready for serialization.