Commit graph

62 commits

Author SHA1 Message Date
Simon Cruanes
97b9cb8ea8
detail 2022-08-15 13:18:14 -04:00
Simon Cruanes
788dc38e9b
format 2022-08-15 12:45:50 -04:00
Simon Cruanes
b01dd32ead
add Span_link module 2022-08-15 12:30:22 -04:00
Simon Cruanes
56bd892c9a
feat: add a ref Globals.default_span_kind to specify default span kind 2022-08-02 11:28:33 -04:00
Simon Cruanes
12b5f6c765
heinous typo 2022-07-06 16:29:02 -04:00
Simon Cruanes
77ebf0cced
docs 2022-07-06 16:21: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
a718f049aa
fix: ensure we can always produce random trace_id/span_id 2022-05-04 12:47:33 -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
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
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
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
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
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
Simon Cruanes
8f2a666a70
feat: relax type for Trace.with_ so it's covariant in attrs 2022-03-28 15:00:16 -04:00
Simon Cruanes
46487f3997
gc metrics: count in bytes, not words 2022-03-28 14:31:01 -04:00
Simon Cruanes
fdd4582a2f
util: add module to emit some GC metrics 2022-03-28 11:37:17 -04:00
Matt Bray
d92a9be08a feat: allow passing ~scope back to Trace.with_ 2022-03-25 15:56:01 +00:00
Simon Cruanes
2bff7897f7
doc 2022-03-24 14:03:54 -04:00
Simon Cruanes
15511a7517
docs 2022-03-24 14:02:45 -04:00
Matt Bray
c419a61815
Merge pull request #8 from AestheticIntegration/matt/traceparent
feat: parse W3C traceparent header
2022-03-24 17:38:03 +00:00
Matt Bray
0cd75d5a6d use Bytes.unsafe_to_string 2022-03-24 17:36:45 +00:00
Matt Bray
1e96404502 feat: raise Invalid_argument for bad hex values 2022-03-24 17:35:20 +00:00
Matt Bray
0326a8a9a2 feat: parse W3C traceparent header 2022-03-24 17:22:45 +00:00
Simon Cruanes
25da9c4ccc
tiny refactor 2022-03-24 11:25:59 -04:00
Simon Cruanes
901730583c
remove over from backend 2022-03-24 10:59:37 -04:00
Dave Aitken
1ca6497a73
add add_attrs helper to add attrs to existing scope 2022-03-24 14:10:12 +00:00
Simon Cruanes
8c1d658ab9
add to_hex/of_hex for span id/trace id 2022-03-23 18:49:44 -04:00
Simon Cruanes
4fd4139921
always use a default aggregation_temporality 2022-03-23 08:58:18 -04:00
Matt Bray
eadb95e8fb feat: set global attributes on ResourceSpans/ResourceMetrics 2022-03-23 12:26:51 +00:00
Matt Bray
a683232b5a feat: include global_attributes in metric data points 2022-03-23 12:26:51 +00:00
Matt Bray
9ba57c5df1 refactor: use _conv_key_value 2022-03-23 12:26:51 +00:00