From 831a813bf2ca558e3436d238172f0eb7c044d06d Mon Sep 17 00:00:00 2001 From: Marc Delagrammatikas Date: Fri, 12 Jul 2024 09:29:13 -0700 Subject: [PATCH] let set_attributes do its thing and handle nested attributes --- lib/open_telemetry_decorator.ex | 2 +- test/open_telemetry_decorator_test.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/open_telemetry_decorator.ex b/lib/open_telemetry_decorator.ex index eedfe27..1c959e8 100644 --- a/lib/open_telemetry_decorator.ex +++ b/lib/open_telemetry_decorator.ex @@ -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 ) diff --git a/test/open_telemetry_decorator_test.exs b/test/open_telemetry_decorator_test.exs index cbbda17..47a750d 100644 --- a/test/open_telemetry_decorator_test.exs +++ b/test/open_telemetry_decorator_test.exs @@ -286,7 +286,7 @@ defmodule OpenTelemetryDecoratorTest do assert span.attributes == %{ "app.exit" => :shutdown, - "app.shutdown_reason" => "%{just: :chillin}" + "app.shutdown_reason.just" => :chillin } end