Add a first-class metric emit path to the WASM plugin SDK (signal_type 'metric' / payload_kind 'otel_metric') [serviceradar#3788 REC2] #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First-class metric emit path for the WASM plugin SDK
Part of the ServiceRadar unified metric ingestion contract (carverauto/serviceradar#3788, REC2). Today a WASM plugin can only emit metrics by embedding them in a check-result (
Result.AddMetric/add_metric_spec→serviceradar.plugin_result.v1), andemit_telemetrysupports onlyocsf_eventandotel_logpayload kinds — there is no first-class metric telemetry path.Evidence: Go
sdk/signal_schema.go:15-18+sdk/telemetry.go(only OCSF/OTEL-log constructors); Rustsrc/result.rs:354-357+src/telemetry.rs(onlyocsf_event/otel_log).Ask
metricsignal type +otel_metricpayload kind.NewMetricTelemetryRecord(...), RustTelemetryRecord::otel_metric(...)— routed through the existingemit_telemetryhost import.resource(service identity + attributes),name,kind(gauge/sum/histogram),temporality,is_monotonic,unit(UCUM), andpoints[](time_unix_nano,attributes,valueorhistogrambuckets, optionalexemplars).Result.AddMetric/add_metric_specas perfdata shims that lower to a single gauge point, so existing plugins keep working unchanged.This is the producer half of the contract evolving
serviceradar.metric.v1toschema_version 2(resource/kind/temporality/points[]); the gateway/core consumer side is tracked in carverauto/serviceradar#3788 andupdate-anomaly-evaluation-cadence(#3791). Contract reference: carverauto/serviceradar#3788