Implement wasi-observe
https://github.com/WebAssembly/wasi-observe
Notes:
-
Should be able to manage
tracing::Spans with customFutureimpl that shares e.g.Arc<State>with the wasi-observe host component, entering the "wasi-observe current span" whenever polled". This is similar to howtracing::Instrumentedworks (https://docs.rs/tracing/0.1.40/src/tracing/instrument.rs.html#318-322). -
Spans will have to be created semi-dynamically (with static
Metadatabut can have dynamic field values for things like theotel.name) -
Dynamic span attributes can be appended directly to the underlying opentelemetry span context: https://docs.rs/tracing-opentelemetry/latest/tracing_opentelemetry/trait.OpenTelemetrySpanExt.html#tymethod.set_attribute
Do we have a plan to support grpc for OTLP? I check the code https://github.com/fermyon/spin/blob/cbb2cb91acd651c0098e7415c6503daaa3a02f5b/crates/telemetry/src/traces.rs#L42, seems like only http at the moment.
I want to use .NET Aspire Dashboard for lightweight observability the app, but they only support grpc. https://github.com/dotnet/aspire/issues/3674
Not yet. #2353 is the issue tracking that work.
Currently we aren't actively working on adding gRPC support, but it is definitely something we want to support. For anyone looking to contribute towards the o11y work this would be a great place to start.
#3346 will complete this.