Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: design Wasm ABI for tracing providers #10563

Open
yskopets opened this issue Mar 28, 2020 · 3 comments
Open

proposal: design Wasm ABI for tracing providers #10563

yskopets opened this issue Mar 28, 2020 · 3 comments
Labels
area/wasm design proposal Needs design doc/proposal before implementation help wanted Needs help!

Comments

@yskopets
Copy link
Member

Title: design Wasm ABI for tracers

Context:

  • after Envoy moved to libc++, dynamic_ot-based tracers got broken because they were relying on C++ ABI
  • following that, a potential new tracing provider expressed its interest in C ABI instead
  • so, it seems that tracing providers could benefit from having their own Wasm ABI

Proposal:

  • Let's try to design Wasm ABI for tracers
  • Along the way, let's expand on ideas that came out of reviews for Wasm upstreaming PRs, namely:
    • ABI should be modular and complementary to proxy-wasm/spec
    • ABI should use versioning scheme similar to regular Envoy extensions, e.g. envoy.tracers.v1alpha0
    • ABI should support usage model consistent with regular Envoy extensions, e.g. it should be possible to have N instances of the same extension type each with a different configuration
    • ABI should be optimized for data passing from Envoy to the Wasm extension in just 1 function call
@htuch htuch added the design proposal Needs design doc/proposal before implementation label Mar 30, 2020
@htuch
Copy link
Member

htuch commented Mar 30, 2020

@yskopets do you have any thoughts on how existing trace libraries will work under Wasm? Is it reasonable to suspect that most of them will "just work" when built for a Wasm target and wrapped with an Envoy Wasm tracing ABI shim?

@mattklein123
Copy link
Member

Is it reasonable to suspect that most of them will "just work" when built for a Wasm target and wrapped with an Envoy Wasm tracing ABI shim?

This would be optimal though I'm skeptical it's going to be easy to make this work. At a high level I think it's a great idea to start working on other extension types and see how we can make that work, especially as we navigate the envoy specific vs. non-envoy specific ABI.

My suggestion would be to start as @yskopets suggests and let's do a design proposal for an Envoy WASM tracing plugin ABI, and let's figure out where the process/design holes are. cc @jplevyak @PiotrSikora

@yskopets
Copy link
Member Author

@htuch

Right now, Envoy has roughly 3 categories of tracers:

  1. Envoy-agnostic (dynamic_ot)
  2. Almost Envoy-agnostic (opencensus)
  3. Envoy-native (datadog, lightstep, xray, zipkin)

So,

  1. Envoy-agnostic tracers should "just work".
  2. Almost Envoy-agnostic - opencensus - hard to say. OpenCensus is very unique.
  3. Envoy-native tracers will definitely require some changes:
    • TLS logic should be completely removed from the tracer
    • it would be necessary for Envoy to expose to a Wasm extension parts of API like ClusterManager, Runtime::Loader, etc. So, it might be more reasonable to slightly redesign the tracer instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/wasm design proposal Needs design doc/proposal before implementation help wanted Needs help!
Projects
None yet
Development

No branches or pull requests

3 participants