File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
test_integrations/phoenix_app/test/phoenix_app Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ defmodule Sentry.Opentelemetry.SpanProcessor do
5353 start_timestamp: root_span . start_time ,
5454 timestamp: root_span . end_time ,
5555 transaction_info: % {
56- source: "db "
56+ source: "component "
5757 } ,
5858 contexts: % {
5959 trace: build_trace_context ( root_span )
@@ -156,6 +156,7 @@ defmodule Sentry.Opentelemetry.SpanProcessor do
156156 span_id: root_span . span_id ,
157157 parent_span_id: root_span . parent_span_id ,
158158 op: "db.#{ attributes [ "db.type" ] } .ecto" ,
159+ description: attributes [ "db.statement" ] || root_span . name ,
159160 origin: root_span . origin ,
160161 data: attributes
161162 }
Original file line number Diff line number Diff line change 11defmodule PhoenixApp.RepoTest do
22 use PhoenixApp.DataCase
33
4- alias PhoenixApp . { Repo , User }
4+ alias PhoenixApp . { Repo , Accounts. User}
55
66 import Sentry.TestHelpers
77
@@ -20,8 +20,9 @@ defmodule PhoenixApp.RepoTest do
2020
2121 assert [ transaction ] = transactions
2222
23- assert transaction . transaction_info == % { source: "db " }
23+ assert transaction . transaction_info == % { source: "component " }
2424 assert transaction . contexts . trace . op == "db.sql.ecto"
25+ assert String . starts_with? ( transaction . contexts . trace . description , "SELECT" )
2526 assert transaction . contexts . trace . data [ "db.system" ] == :sqlite
2627 end
2728end
You can’t perform that action at this time.
0 commit comments