update test core

This commit is contained in:
Simon Cruanes 2025-10-30 22:19:39 -04:00
parent 4066cad663
commit 2a2baeb7cd
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 26 additions and 47 deletions

View file

@ -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 = "";

View file

@ -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