Skip to content

Commit

Permalink
ensure tt segment attrs are coerced
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryseed committed Mar 1, 2021
1 parent cd03b0e commit e6f995e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/elixir.yml
Expand Up @@ -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
8 changes: 5 additions & 3 deletions lib/new_relic/transaction/trace.ex
Expand Up @@ -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)
]
]
Expand All @@ -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
Expand Down

0 comments on commit e6f995e

Please sign in to comment.