spin icon indicating copy to clipboard operation
spin copied to clipboard

Implement wasi-observe

Open lann opened this issue 1 year ago • 2 comments

https://github.com/WebAssembly/wasi-observe

Notes:

  • Should be able to manage tracing::Spans with custom Future impl that shares e.g. Arc<State> with the wasi-observe host component, entering the "wasi-observe current span" whenever polled". This is similar to how tracing::Instrumented works (https://docs.rs/tracing/0.1.40/src/tracing/instrument.rs.html#318-322).

  • Spans will have to be created semi-dynamically (with static Metadata but can have dynamic field values for things like the otel.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

lann avatar Mar 22 '24 19:03 lann

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

thangchung avatar Apr 13 '24 07:04 thangchung

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.

calebschoepp avatar Apr 13 '24 18:04 calebschoepp

#3346 will complete this.

calebschoepp avatar Nov 18 '25 22:11 calebschoepp