diff --git a/tests/core/t_size.expected b/tests/core/t_size.expected index b45d61a1..c779db73 100644 --- a/tests/core/t_size.expected +++ b/tests/core/t_size.expected @@ -1,21 +1,7 @@ -metrics size: 243B -res1: { resource = - Some( - { attributes = - [{ key = "service.name"; - value = Some(String_value("unknown_service")); - } - ]; - dropped_attributes_count = 0; - }); +metrics size: 171B +res1: { resource = None; scope_metrics = - [{ scope = - Some( - { name = "ocaml-otel"; - version = "%%VERSION_NUM%%"; - attributes = []; - dropped_attributes_count = 0; - }); + [{ scope = None; metrics = [{ name = "sum.foo"; description = ""; @@ -72,23 +58,9 @@ res1: { resource = ]; schema_url = ""; } -res1: { resource = - Some( - { attributes = - [{ key = "service.name"; - value = Some(String_value("unknown_service")); - } - ]; - dropped_attributes_count = 0; - }); +res1: { resource = None; scope_metrics = - [{ scope = - Some( - { name = "ocaml-otel"; - version = "%%VERSION_NUM%%"; - attributes = []; - dropped_attributes_count = 0; - }); + [{ scope = None; metrics = [{ name = "sum.foo"; description = ""; diff --git a/tests/core/t_size.ml b/tests/core/t_size.ml index bda2e186..c7b1bce1 100644 --- a/tests/core/t_size.ml +++ b/tests/core/t_size.ml @@ -2,20 +2,27 @@ open Opentelemetry -let res1 = - Metrics.make_resource_metrics - [ - Metrics.sum ~name:"sum.foo" - [ - Metrics.int ~start_time_unix_nano:42L ~now:45L 10; - Metrics.int ~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 res1 : Proto.Metrics.resource_metrics = + Proto.Metrics.make_resource_metrics ~schema_url:"" + ~scope_metrics: + [ + Proto.Metrics.make_scope_metrics ~schema_url:"" + ~metrics: + [ + Metrics.sum ~name:"sum.foo" + [ + Metrics.int ~start_time_unix_nano:42L ~now:45L 10; + Metrics.int ~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 enc = Pbrt.Encoder.create () in