mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
update test core
This commit is contained in:
parent
4066cad663
commit
2a2baeb7cd
2 changed files with 26 additions and 47 deletions
|
|
@ -1,21 +1,7 @@
|
||||||
metrics size: 243B
|
metrics size: 171B
|
||||||
res1: { resource =
|
res1: { resource = None;
|
||||||
Some(
|
|
||||||
{ attributes =
|
|
||||||
[{ key = "service.name";
|
|
||||||
value = Some(String_value("unknown_service"));
|
|
||||||
}
|
|
||||||
];
|
|
||||||
dropped_attributes_count = 0;
|
|
||||||
});
|
|
||||||
scope_metrics =
|
scope_metrics =
|
||||||
[{ scope =
|
[{ scope = None;
|
||||||
Some(
|
|
||||||
{ name = "ocaml-otel";
|
|
||||||
version = "%%VERSION_NUM%%";
|
|
||||||
attributes = [];
|
|
||||||
dropped_attributes_count = 0;
|
|
||||||
});
|
|
||||||
metrics =
|
metrics =
|
||||||
[{ name = "sum.foo";
|
[{ name = "sum.foo";
|
||||||
description = "";
|
description = "";
|
||||||
|
|
@ -72,23 +58,9 @@ res1: { resource =
|
||||||
];
|
];
|
||||||
schema_url = "";
|
schema_url = "";
|
||||||
}
|
}
|
||||||
res1: { resource =
|
res1: { resource = None;
|
||||||
Some(
|
|
||||||
{ attributes =
|
|
||||||
[{ key = "service.name";
|
|
||||||
value = Some(String_value("unknown_service"));
|
|
||||||
}
|
|
||||||
];
|
|
||||||
dropped_attributes_count = 0;
|
|
||||||
});
|
|
||||||
scope_metrics =
|
scope_metrics =
|
||||||
[{ scope =
|
[{ scope = None;
|
||||||
Some(
|
|
||||||
{ name = "ocaml-otel";
|
|
||||||
version = "%%VERSION_NUM%%";
|
|
||||||
attributes = [];
|
|
||||||
dropped_attributes_count = 0;
|
|
||||||
});
|
|
||||||
metrics =
|
metrics =
|
||||||
[{ name = "sum.foo";
|
[{ name = "sum.foo";
|
||||||
description = "";
|
description = "";
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,27 @@
|
||||||
|
|
||||||
open Opentelemetry
|
open Opentelemetry
|
||||||
|
|
||||||
let res1 =
|
let res1 : Proto.Metrics.resource_metrics =
|
||||||
Metrics.make_resource_metrics
|
Proto.Metrics.make_resource_metrics ~schema_url:""
|
||||||
[
|
~scope_metrics:
|
||||||
Metrics.sum ~name:"sum.foo"
|
[
|
||||||
[
|
Proto.Metrics.make_scope_metrics ~schema_url:""
|
||||||
Metrics.int ~start_time_unix_nano:42L ~now:45L 10;
|
~metrics:
|
||||||
Metrics.int ~start_time_unix_nano:52L ~now:55L 20;
|
[
|
||||||
];
|
Metrics.sum ~name:"sum.foo"
|
||||||
Metrics.gauge ~name:"gauge.bar"
|
[
|
||||||
[
|
Metrics.int ~start_time_unix_nano:42L ~now:45L 10;
|
||||||
Metrics.float ~start_time_unix_nano:42L ~now:45L 10.;
|
Metrics.int ~start_time_unix_nano:52L ~now:55L 20;
|
||||||
Metrics.float ~start_time_unix_nano:52L ~now:55L 20.;
|
];
|
||||||
];
|
Metrics.gauge ~name:"gauge.bar"
|
||||||
]
|
[
|
||||||
|
Metrics.float ~start_time_unix_nano:42L ~now:45L 10.;
|
||||||
|
Metrics.float ~start_time_unix_nano:52L ~now:55L 20.;
|
||||||
|
];
|
||||||
|
]
|
||||||
|
();
|
||||||
|
]
|
||||||
|
()
|
||||||
|
|
||||||
let str =
|
let str =
|
||||||
let enc = Pbrt.Encoder.create () in
|
let enc = Pbrt.Encoder.create () in
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue