Commit graph

263 commits

Author SHA1 Message Date
Simon Cruanes
2d97dd0705
debug 2022-07-06 16:02:49 -04:00
Simon Cruanes
9125eb5b65
better logging; improve GC sample collection 2022-07-06 15:48:46 -04:00
Simon Cruanes
88ce296d21
small refactor 2022-07-06 15:27:32 -04:00
Simon Cruanes
0a8e60ba46
better debug 2022-07-06 14:56:27 -04:00
Simon Cruanes
84be273b76
small refactor 2022-07-06 14:27:09 -04:00
Simon Cruanes
053493db8b
limit scope of locks 2022-07-06 14:22:53 -04:00
Simon Cruanes
6d72a6fac0
fix error on 4.08 2022-07-06 13:42:52 -04:00
Simon Cruanes
6179c97e99
add high watermark to ocurl client 2022-07-06 13:41:03 -04:00
Simon Cruanes
9c3e2a7076
feat: pass ?stop atomic; allow for multiple background threads 2022-07-06 12:53:00 -04:00
Simon Cruanes
331ae94547
detail 2022-07-06 12:52:03 -04:00
Simon Cruanes
d689dfc8fb
feat(ocurl): simpler, cleaner backend implementation
we now only have a single representation of a batch, with its own
internal state to handle timeouts. It handles its own locking, and there
are no callbacks anymore.
2022-07-06 12:06:51 -04:00
Simon Cruanes
85b6e91615
config: more comments; make Config.t private
forcing users to use `Config.make` to build a new config means we can
add fields without breaking existing code.
2022-07-06 12:06:12 -04:00
Simon Cruanes
36dcdda480
prepare for 0.2 2022-06-09 12:40:20 -04:00
Simon Cruanes
7fd56bb5c3
compat for Result 2022-06-09 11:29:20 -04:00
Simon Cruanes
5d3fa1c8eb
helpers for attributes 2022-06-07 14:48:20 -04:00
Simon Cruanes
f44351055a
Merge branch 'master' into wip-logs 2022-05-12 12:26:07 -04:00
Simon Cruanes
3f9bd94837
format 2022-05-12 11:54:06 -04:00
Simon Cruanes
b676783100
format 2022-05-05 12:09:19 -04:00
Simon Cruanes
a718f049aa
fix: ensure we can always produce random trace_id/span_id 2022-05-04 12:47:33 -04:00
Pau Ruiz Safont
fa3b863625 feat: Allow setting API headers
This can be done through the API or by setting
OTEL_EXPORTER_OTLP_HEADERS

Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
2022-05-04 16:56:37 +01:00
Simon Cruanes
5fefcf3ced
require pbrt only, use ocaml-protoc as a lint 2022-05-03 13:52:20 -04:00
Matt Bray
028d5ece71 chore: add Trace_id.pp and Span_id.pp 2022-05-03 17:28:42 +01:00
Simon Cruanes
0dd97663b6
remove dune subst bs 2022-05-03 10:46:01 -04:00
Simon Cruanes
080e0de138
Update src/opentelemetry.ml
Co-authored-by: Matt Bray <mattjbray@gmail.com>
2022-04-30 13:26:12 -04:00
Simon Cruanes
6744123075
feat(otel): Metrics_callbacks module
this module allows the user's programs and libraries to register
some callbacks that will be regularly called to produce metrics.
2022-04-29 16:50:06 -04:00
Simon Cruanes
198027a519
add histogram metrics (untested) 2022-04-28 10:17:36 -04:00
Simon Cruanes
619b389322
type error fixed 2022-04-28 09:57:28 -04:00
Simon Cruanes
1bedb57123
feat: implement basic support for logs
also send them to the collector.
2022-04-28 09:57:28 -04:00
Simon Cruanes
64df05d010
wip: support logs in the API 2022-04-28 09:57:28 -04:00
Simon Cruanes
2149bb0714
fix: proper starting point for cumulative metrics
use the start of the program as a fixed reference point.
see: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md#temporality
2022-04-26 10:08:56 -04:00
Simon Cruanes
62f3bb8b03
expose tick function 2022-04-20 12:42:47 -04:00
Simon Cruanes
9d4bb5a97f
feat: debug the library is set via OTEL_OCAML_DEBUG 2022-04-19 13:28:55 -04:00
Simon Cruanes
51cebfd383
Merge pull request #16 from AestheticIntegration/set-global-attrs
feat: use a ref for Globals.global_attributes
2022-04-19 13:28:33 -04:00
Simon Cruanes
01b31b471c
doc: improve docs for main module 2022-04-15 17:52:22 -04:00
Simon Cruanes
c950ffc885
feat: use a ref for Globals.global_attributes
sometimes it's useful to be able to modify them from the code itself.
For example a client or service might generate a unique Uuidm for its whole
lifetime, and add that as an attribute to later filter on it.
2022-04-15 08:59:13 -04:00
Simon Cruanes
c01879c4b0
refactor(client): split into several modules 2022-04-13 16:28:23 -04:00
Simon Cruanes
20cc772682
fix 2022-04-12 14:14:36 -04:00
Simon Cruanes
3448e33d29
fix: same 2022-04-12 13:53:24 -04:00
Simon Cruanes
2c1c67bfe8
fix: emit traces, too 2022-04-12 13:50:50 -04:00
Simon Cruanes
71b999a5b7
use conventions 2022-04-12 12:04:49 -04:00
Simon Cruanes
c362899ff1
add global attributes to metrics as well; add library version 2022-04-12 12:01:07 -04:00
Simon Cruanes
7af92b5589
minor refactoring 2022-04-12 11:56:28 -04:00
Matt Bray
1919154085 add runtime attrs to GC stats 2022-04-12 16:26:08 +01:00
Matt Bray
66693280ec expose GC_metrics.get_runtime_attributes 2022-04-12 16:25:52 +01:00
Matt Bray
bf4ac37f21 feat: use runtime metric conventions; add runtime attributes
See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/runtime-environment-metrics.md#runtime-environment-specific-metrics---processruntimeenvironment
2022-04-12 16:08:58 +01:00
Simon Cruanes
1ca14b3a51
fix: name of metrics 2022-04-11 18:16:50 -04:00
Simon Cruanes
3d0d031bcd
fix: yet another fix for emitting GC metrics
now, the frontend (Opentelemetry) is responsible for signalling the
backend when to emit GC stats; but the backend just samples GC metrics
on the next `tick()` and pushes them in the next batch. This saves us
from having to worry about re-entrancy and GC metrics being emitted
during the emission of something else.
2022-04-11 16:33:01 -04:00
Simon Cruanes
786ebb611a
ocurl-client: reset needs_gc_metrics 2022-04-11 15:29:32 -04:00
Simon Cruanes
5180be31bc
feat(collector): move GC metrics logic to the collector
this helps avoiding reentrancy issue, where the collector allocates,
triggers the GC metrics alarm, which tries to push new metrics in the
middle of a batch (currently leading to a potential deadlock).
2022-04-11 13:09:13 -04:00
Simon Cruanes
591cbad4b2
rename some GC metrics 2022-03-31 16:20:51 -04:00