toOtlpPayload
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.