Skip to content

Commit 37f5559

Browse files
authored
Apply suggestions from code review
1 parent 7856ba8 commit 37f5559

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/opentelemetry_api/src/otel_span.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ add_events(_, _) ->
114114
Stacktrace :: list(any()),
115115
Attributes :: opentelemetry:attributes().
116116
record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->
117-
ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~0tP:~0tP", [Class, Term, 10], [{chars_limit, 50}]))},
117+
ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~0tP:~0tP", [Class, 10, Term, 10], [{chars_limit, 50}]))},
118118
{<<"exception.stacktrace">>, iolist_to_binary(io_lib:format("~0tP", [Stacktrace, 10], [{chars_limit, 50}]))}],
119119
add_event(SpanCtx, <<"exception">>, ExceptionAttributes ++ Attributes).
120120

@@ -126,7 +126,7 @@ record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->
126126
Stacktrace :: list(any()),
127127
Attributes :: opentelemetry:attributes().
128128
record_exception(SpanCtx, Class, Term, Message, Stacktrace, Attributes) ->
129-
ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~0tP:~0tP", [Class, Term, 10], [{chars_limit, 50}]))},
129+
ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~0tP:~0tP", [Class, 10, Term, 10], [{chars_limit, 50}]))},
130130
{<<"exception.stacktrace">>, iolist_to_binary(io_lib:format("~0tP", [Stacktrace, 10], [{chars_limit, 50}]))},
131131
{<<"exception.message">>, Message}],
132132
add_event(SpanCtx, <<"exception">>, ExceptionAttributes ++ Attributes).

0 commit comments

Comments
 (0)