Wingfoil — a Rust stream-processing graph framework with an OTLP exporter #3560
0-jake-0
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
Wanted to share something we recently shipped that builds on the OpenTelemetry
Rust SDK, in case it's useful to others here and to get any feedback on the
integration choices.
Wingfoil is a Rust stream-processing
library — you wire up a graph of nodes where each node ticks when its upstreams
produce a value, and the graph runs either in real time or replayed from
historical data. It's aimed at high-frequency trading and real-time AI pipelines.
We just added an OTLP adapter built on
opentelemetry,opentelemetry_sdkandopentelemetry-otlp(HTTP/protobuf), with two independent pathways:OtlpPush::otlp_pushexports stream values as OTel gaugemetrics to any OTLP backend. Implemented for any
Stream<T: Display>, so anumeric or string stream can be pushed without wrapping. A
SdkMeterProviderwith a 500 ms
PeriodicReaderis built per consumer so the final batch flusheson shutdown.
OtlpSpans::otlp_spansemits one span per hop on aStream<P: HasLatency>, attaching caller-supplied attributes (session id,request id, …) to the parent span. We reach for this for high-cardinality
per-request data that would blow up Prometheus label cardinality.
Design choices we'd like eyes on from people who know the SDK well:
&'static strto satisfy thef64_gaugebuilder —fine for us but worth flagging for anyone generating metric names dynamically.
building a provider or making any network calls, so replays don't emit
telemetry. Curious whether there's a more idiomatic "null exporter" pattern for
this than skipping provider construction entirely.
A concrete use case: pushing live latency/throughput gauges from a trading graph
to a collector for dashboards, while emitting per-request spans for the slow tail
so we can trace an individual request across graph hops.
Links:
Thanks for building the OpenTelemetry Rust SDK — happy to answer questions or dig
into anything above.
We're actively looking for contributors, so if any of this is up your street
we'd love the help. And if wingfoil looks useful to you, a ⭐ on the
repo would mean a lot.
All reactions