Skip to content

Commit

Permalink
let set_attributes do its thing and handle nested attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdel committed Jul 12, 2024
1 parent e29ddfa commit 831a813
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/open_telemetry_decorator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ defmodule OpenTelemetryDecorator do

:exit, {:shutdown, reason} ->
O11y.set_attributes(
[exit: :shutdown, shutdown_reason: inspect(reason)],
[exit: :shutdown, shutdown_reason: reason],
namespace: prefix
)

Expand Down
2 changes: 1 addition & 1 deletion test/open_telemetry_decorator_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ defmodule OpenTelemetryDecoratorTest do

assert span.attributes == %{
"app.exit" => :shutdown,
"app.shutdown_reason" => "%{just: :chillin}"
"app.shutdown_reason.just" => :chillin
}
end

Expand Down

0 comments on commit 831a813

Please sign in to comment.