Instrumentation for https://opentelemetry.io
Find a file
2022-03-24 17:51:43 +00:00
.github/workflows update atomic, do not list it as opam dep 2022-03-22 10:01:36 -04:00
src refactor(cohttp): wrap in Server module 2022-03-24 17:51:43 +00:00
tests feat: parse W3C traceparent header 2022-03-24 17:22:45 +00:00
vendor fuck vendoring atomic 2022-03-23 15:33:03 -04:00
.gitignore doc, etc. 2022-03-18 14:17:56 -04:00
.gitmodules fuck vendoring atomic 2022-03-23 15:33:03 -04:00
dune initial commit 2022-03-16 15:58:08 -04:00
dune-project wip: cohttp integration 2022-03-24 17:38:46 +00:00
emit1.sh feat: parse W3C traceparent header 2022-03-24 17:22:45 +00:00
Makefile initial commit 2022-03-16 15:58:08 -04:00
opentelemetry-client-ocurl.opam chore: put lower bound on mtime 2022-03-22 11:10:44 -04:00
opentelemetry-cohttp-lwt.opam wip: cohttp integration 2022-03-24 17:38:46 +00: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.