mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-11 04:58:39 -04:00
typo
This commit is contained in:
parent
b8b6a95cdf
commit
3d89103ca6
1 changed files with 2 additions and 2 deletions
|
|
@ -170,14 +170,14 @@ module Globals = struct
|
||||||
default_instrumentation_library
|
default_instrumentation_library
|
||||||
~name:"ocaml-opentelemetry" () (* TODO: version, perhaps with dune subst? *)
|
~name:"ocaml-opentelemetry" () (* TODO: version, perhaps with dune subst? *)
|
||||||
|
|
||||||
(** Global attributes, set via OTEL_RESOURCE_ATTRIBUTE *)
|
(** Global attributes, set via OTEL_RESOURCE_ATTRIBUTES *)
|
||||||
let global_attributes : key_value list =
|
let global_attributes : key_value list =
|
||||||
let parse_pair s = match String.split_on_char '=' s with
|
let parse_pair s = match String.split_on_char '=' s with
|
||||||
| [a;b] -> default_key_value ~key:a ~value:(Some (String_value b)) ()
|
| [a;b] -> default_key_value ~key:a ~value:(Some (String_value b)) ()
|
||||||
| _ -> failwith (Printf.sprintf "invalid attribute: %S" s)
|
| _ -> failwith (Printf.sprintf "invalid attribute: %S" s)
|
||||||
in
|
in
|
||||||
try
|
try
|
||||||
Sys.getenv "OTEL_RESOURCE_ATTRIBUTE" |> String.split_on_char ','
|
Sys.getenv "OTEL_RESOURCE_ATTRIBUTES" |> String.split_on_char ','
|
||||||
|> List.map parse_pair
|
|> List.map parse_pair
|
||||||
with _ -> []
|
with _ -> []
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue