Skip to content

Add jaeger tracing #101

@ethanfrey

Description

@ethanfrey

Follow up from #100

We would also like to allow configuring the tracing to dump to other formats than stdout.

One of the most interesting outputs is jaeger (or other opentracing server), which involves adding spans in places. This also means tracking spans not just in one place in the pipeline, but following the action from trigger pickup to dispatcher to wasm engine to submission of the result on the chain.

This will probably be a lot more work than nice text logging, so pulled into another milestone to give time to do it right. You can look at https://github.com/lay3rlabs/layer-sdk for another example of doing this with jaeger


Layer SDK docker references:

Layer SDK code references:

The tracing setup code is here: https://github.com/Lay3rLabs/layer-sdk/blob/main/app/slay3rd/src/main.rs#L78-L109 please not the following points:

  • It uses config.filter to filter events. Which is basically this filter from WAVS - important to keep that
  • Current WAVS setup only uses stdout to log tracing, you probably want to support both options - either stdout or jaeger like the layer-sdk setup. You should compare the two approaches to building the fmt subscriber and define what works best for you.
  • You can try copying the tracing-jaeger setup from layer-sdk, but it is deprecated and you are supposed to use otlp-tracer now instead. I did try this with layer-sdk some months ago, but I couldn't get it to work. Check out my PR to see my (lack of) progress, which may be a good learning experience, not a template.
    • One idea I had was a minimal test case to see if this works at all, and then when you get a Rust binary writing to the Jaeger docker image, you can then port it over to WAVS with a lot more confidence and a quicker testing cycle. This article gives such a sample app. I'd try this out and connect to jaeger docker (and expose some ports as needed) and then take those learnings to implement this PR properly

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions