wasmCloud / wasmCloud

wasmCloud is an open source Cloud Native Computing Foundation (CNCF) project that enables teams to build, manage, and scale polyglot apps across any cloud, K8s, or edge.
https://wasmcloud.com
Apache License 2.0
1.47k stars 144 forks source link

[FEATURE] Add `#[instrument]` macros to the custom-template-rust provider #2402

Open brooksmtownsend opened 3 months ago

brooksmtownsend commented 3 months ago

Affected project(s)

Is your feature request related to a problem? Please describe.

For a Rust developer who isn't used to using the tracing crate to instrument functions, it's not clear how to immediately add instrumentation for traces in the custom provider template.

Describe the solution you'd like

Since observability is a huge pillar of debugging for wasmCloud providers, especially in a distributed context, I think it would be great for our custom template to come automatically instrumented with functions at an info level so that developers can see how this can be done. We should include comments on how to use the propagate_trace_for_ctx macro.

Describe alternatives you've considered

We could include this as a section in our documentation, but I see little to no downside about just including it.

Additional context

No response

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this has been closed too eagerly, please feel free to tag a maintainer so we can keep working on the issue. Thank you for contributing to wasmCloud!