Skip to content

Commit 4c332df

Browse files
committed
fix
1 parent 8d57f30 commit 4c332df

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/core/opentelemetry.ml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,9 @@ module Trace = struct
12191219
make_scope_spans ~scope:Globals.instrumentation_library ~spans ()
12201220
in
12211221
let attributes = Globals.mk_attributes ?service_name ?attrs () in
1222-
let resource = Proto.Resource.make_resource ~attributes () in
1222+
let resource =
1223+
Proto.Resource.make_resource ~entity_refs:[] ~attributes ()
1224+
in
12231225
make_resource_spans ~resource ~scope_spans:[ ils ] ()
12241226

12251227
(** Sync emitter.
@@ -1383,7 +1385,7 @@ module Metrics = struct
13831385
(** Aggregation of a scalar metric, always with the current value *)
13841386
let gauge ~name ?description ?unit_ (l : number_data_point list) : t =
13851387
let data = Gauge (make_gauge ~data_points:l ()) in
1386-
make_metric ~name ?description ?unit_ ~data ()
1388+
make_metric ~metadata:[] ~name ?description ?unit_ ~data ()
13871389

13881390
type aggregation_temporality = Metrics.aggregation_temporality =
13891391
| Aggregation_temporality_unspecified
@@ -1397,7 +1399,7 @@ module Metrics = struct
13971399
let data =
13981400
Sum (make_sum ~data_points:l ?is_monotonic ~aggregation_temporality ())
13991401
in
1400-
make_metric ~name ?description ?unit_ ~data ()
1402+
make_metric ~metadata:[] ~name ?description ?unit_ ~data ()
14011403

14021404
(** Histogram data
14031405
@param count number of values in population (non negative)
@@ -1420,7 +1422,7 @@ module Metrics = struct
14201422
let data =
14211423
Histogram (make_histogram ~data_points:l ?aggregation_temporality ())
14221424
in
1423-
make_metric ~name ?description ?unit_ ~data ()
1425+
make_metric ~metadata:[] ~name ?description ?unit_ ~data ()
14241426

14251427
(* TODO: exponential history *)
14261428
(* TODO: summary *)
@@ -1433,7 +1435,9 @@ module Metrics = struct
14331435
make_scope_metrics ~scope:Globals.instrumentation_library ~metrics:l ()
14341436
in
14351437
let attributes = Globals.mk_attributes ?service_name ?attrs () in
1436-
let resource = Proto.Resource.make_resource ~attributes () in
1438+
let resource =
1439+
Proto.Resource.make_resource ~entity_refs:[] ~attributes ()
1440+
in
14371441
make_resource_metrics ~scope_metrics:[ lm ] ~resource ()
14381442

14391443
(** Emit some metrics to the collector (sync). This blocks until the backend
@@ -1564,7 +1568,9 @@ module Logs = struct
15641568
cause deadlocks. *)
15651569
let emit ?service_name ?attrs (l : t list) : unit =
15661570
let attributes = Globals.mk_attributes ?service_name ?attrs () in
1567-
let resource = Proto.Resource.make_resource ~attributes () in
1571+
let resource =
1572+
Proto.Resource.make_resource ~entity_refs:[] ~attributes ()
1573+
in
15681574
let ll =
15691575
make_scope_logs ~scope:Globals.instrumentation_library ~log_records:l ()
15701576
in

0 commit comments

Comments
 (0)