Instrumentation for https://opentelemetry.io
Find a file
2022-03-21 15:44:20 -04:00
.github/workflows try to fix CI 2022-03-21 15:44:20 -04:00
src ocurl backend: implement non-threaded mode, add config for batch timeout 2022-03-21 15:20:31 -04:00
tests test(emit1): knobs to change sleep, batch size, collector config etc. 2022-03-21 15:01:56 -04:00
vendor depend on atomic shims, vendor them 2022-03-21 15:20:20 -04:00
.gitignore doc, etc. 2022-03-18 14:17:56 -04:00
.gitmodules depend on atomic shims, vendor them 2022-03-21 15:20:20 -04:00
dune initial commit 2022-03-16 15:58:08 -04:00
dune-project depend on atomic shims, vendor them 2022-03-21 15:20:20 -04:00
emit1.sh add basic test that emits fake data 2022-03-16 16:48:43 -04:00
Makefile initial commit 2022-03-16 15:58:08 -04:00
opentelemetry-client-ocurl.opam depend on atomic shims, vendor them 2022-03-21 15:20:20 -04:00
opentelemetry-lwt.opam add odoc as a doc dep 2022-03-18 12:12:51 -04:00
opentelemetry.opam add odoc as a doc dep 2022-03-18 12:12:51 -04:00
README.md ci badge 2022-03-18 14:20:32 -04:00

Opentelemetry build

This project provides an API for instrumenting server software using opentelemetry, as well as connectors to talk to opentelemetry software such as jaeger.

Features

  • basic traces
  • basic metrics
  • basic logs
  • nice API
  • interface with lwt
  • sync collector relying on ocurl
    • batching, perf, etc.
  • async collector relying on ocurl-multi
  • interface with logs (carry context around)

Use

For now, instrument manually:

module T = Opentelemetry
let (let@) f x = f x

let foo x =
  let@ (tr,sp) = T.Trace.with_ 
      ~service_name:"myservice" "foo" ~attrs:["hello", `String "world"] in
  (* … *)

  let gc = Gc.stat() in
  T.Metrics.(
    emit [
      gauge ~name:"foo.gc.major_heap_words" [int gc.Gc.heap_words];
      sum ~name:"foo.gc.minor_allocated" [float gc.Gc.minor_words];
    ]);

  (* … *)

License

MIT

Semantic Conventions

Not supported yet.