Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
/ apm-agent-ocaml Public archive

Elastic OCaml APM provides an OCaml library for uploading traces, transactions and errors to Elastic APM.

License

Notifications You must be signed in to change notification settings

elastic/apm-agent-ocaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCaml agent for Elastic APM

Test and Build OCaml APM Client

Dev setup

Clone

git clone [email protected]:elastic/apm-agent-ocaml.git
cd apm-agent-ocaml

Setup OCaml environment

opam switch create . 4.13.1
opam install ocamlformat ocamlformat-rpc ocaml-lsp-server

You can run a build in watch mode so new changes are automatically detected and rebuilt. In a terminal, in or outside of your editor:

dune build -w

Tests can also be run in watch mode with expectation tests automatically capturing changes in output! This gives an almost magical experience where test results update as new tests are written and as the library itself evolves.

dune test -w --auto-promote

If you don't have it installed already, watch mode needs fswatch which can be installed via brew on macOS:

brew install fswatch

If you're using vscode, install the OCaml Platform plugin by OCaml Labs. The OCaml plugin should automatically detect the local opam switch you just created. If you setup format on save in the editor it will automatically format new changes via the LSP server to conform to the project's standard formatting.

You should now be ready to work on the OCaml Elastic APM agent!

Running the examples locally

  • Install docker + docker compose
  • docker compose build ocaml-base
  • docker compose build
  • docker compose up -d

Once docker compose up finishes the following endpoints will be available:

About

Elastic OCaml APM provides an OCaml library for uploading traces, transactions and errors to Elastic APM.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •