diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index dd7ae488..ffd4bd52 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -74,5 +74,5 @@ jobs: cd examples mix deps.get mix format --check-formatted - mix test || mix test --failed + mix test MIX_ENV=test mix instrumented_task.example_task diff --git a/lib/new_relic/transaction/trace.ex b/lib/new_relic/transaction/trace.ex index ffcb1a47..e5509725 100644 --- a/lib/new_relic/transaction/trace.ex +++ b/lib/new_relic/transaction/trace.ex @@ -57,17 +57,19 @@ defmodule NewRelic.Transaction.Trace do duration: duration, metric_name: metric_name }) do + attributes = first_segment.attributes |> NewRelic.Util.coerce_attributes() + [ 0, duration, "ROOT", - first_segment.attributes, + attributes, [ [ 0, duration, metric_name, - first_segment.attributes, + attributes, Enum.map(segments, &format_child_segments/1) ] ] @@ -79,7 +81,7 @@ defmodule NewRelic.Transaction.Trace do segment.relative_start_time, segment.relative_end_time, segment.metric_name, - segment.attributes, + segment.attributes |> NewRelic.Util.coerce_attributes(), Enum.map(segment.children, &format_child_segments/1), segment.class_name, segment.method_name