fix: opentelemetry exception attr spec

this brings the exception attributes in line with the spec
https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/.
It seems we were missing the preceding `exception.`.
This commit is contained in:
ajbt200128 2025-07-16 13:58:31 -07:00 committed by Simon Cruanes
parent 07513133ae
commit 46d1289d95

View file

@ -1069,9 +1069,9 @@ end = struct
Event.make "exception" Event.make "exception"
~attrs: ~attrs:
[ [
"message", `String (Printexc.to_string exn); "exception.message", `String (Printexc.to_string exn);
"type", `String (Printexc.exn_slot_name exn); "exception.type", `String (Printexc.exn_slot_name exn);
"stacktrace", `String (Printexc.raw_backtrace_to_string bt); "exception.stacktrace", `String (Printexc.raw_backtrace_to_string bt);
] ]
in in
scope.items <- Ev (ev, scope.items) scope.items <- Ev (ev, scope.items)