follow otel semconv

This commit is contained in:
Simon Cruanes 2026-03-06 11:37:35 -05:00
parent d77dbacfb5
commit 068baca4c9
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -20,13 +20,11 @@ let service_instance_id = ref None
@since 0.12 *) @since 0.12 *)
let service_version = ref None let service_version = ref None
let sdk_name = "ocaml-otel"
(** @since NEXT_RELEASE *) (** @since NEXT_RELEASE *)
let sdk_version : string = Version.(spf "%s at %s" version git_hash) let sdk_version : string = Version.(spf "%s at %s" version git_hash)
let instrumentation_library = let instrumentation_library =
make_instrumentation_scope ~version:sdk_version ~name:sdk_name () make_instrumentation_scope ~version:sdk_version ~name:"opentelemetry" ()
(** Global attributes, initially set via OTEL_RESOURCE_ATTRIBUTES and modifiable (** Global attributes, initially set via OTEL_RESOURCE_ATTRIBUTES and modifiable
by the user code. They will be attached to each outgoing metrics/traces. *) by the user code. They will be attached to each outgoing metrics/traces. *)
@ -66,8 +64,8 @@ open struct
let sdk_attributes = let sdk_attributes =
[ [
(* "telemetry.sdk.language", `String "ocaml"; *) "telemetry.sdk.language", `String "ocaml";
"telemetry.sdk.name", `String sdk_name; "telemetry.sdk.name", `String "opentelemetry";
"telemetry.sdk.version", `String sdk_version; "telemetry.sdk.version", `String sdk_version;
] ]