ethercrow / opentelemetry-haskell

The OpenTelemetry Haskell Client https://opentelemetry.io
Other
65 stars 6 forks source link

Implement the restreaming mode for eventlog-to-zipkin #11

Open ethercrow opened 4 years ago

ethercrow commented 4 years ago

Current mode of operation:

  1. Run an instrumented application to completion
  2. Upload the resulting eventlog file to a trace collector or convert it into a chrome tracing file

Another mode that we need:

  1. An instrumented application is running for a very long time and is writing the eventlog into a pipe or a socket
  2. eventlog-to-zipkin is reading the eventlog from said pipe or socket and sending the trace data to a collector

Beware the https://gitlab.haskell.org/ghc/ghc/issues/18043

ethercrow commented 4 years ago

cc @maksbotan

With the current master the following seems to work:

mkfifo foo.eventlog.pipe
eventlog-to-zipkin read foo.eventlog.pipe &
foo +RTS -N1 -l -olfoo.eventlog.pipe

Note the -N1 there. When running on multiple cores RTS produces events out of order and the exporters are not ready for that. Expect crashes or missing data with -N other than 1.

I only tested in on a very short-lived run of megaexample.