Skip to content

Commit 35bb7e3

Browse files
committed
Move setting platform info to the Client
1 parent 9d8cc7e commit 35bb7e3

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

lib/sentry/client.ex

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,15 @@ defmodule Sentry.Client do
273273

274274
@spec render_transaction(%Transaction{}) :: map()
275275
def render_transaction(%Transaction{} = transaction) do
276-
Transaction.to_map(transaction)
276+
transaction
277+
|> Transaction.to_map()
278+
|> Map.merge(%{
279+
platform: "elixir",
280+
sdk: %{
281+
name: "sentry.elixir",
282+
version: "10.7.1"
283+
}
284+
})
277285
end
278286

279287
defp render_exception(%Interfaces.Exception{} = exception) do

lib/sentry/opentelemetry/span_processor.ex

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ defmodule Sentry.Opentelemetry.SpanProcessor do
7171
origin: root_span.origin
7272
}
7373
},
74-
platform: "elixir",
75-
sdk: %{
76-
name: "sentry.elixir",
77-
version: "10.7.1"
78-
},
7974
data: %{
8075
"db.system" => attributes[:"db.system"],
8176
"db.name" => attributes[:"db.name"],
@@ -110,11 +105,6 @@ defmodule Sentry.Opentelemetry.SpanProcessor do
110105
contexts: %{
111106
trace: trace
112107
},
113-
platform: "elixir",
114-
sdk: %{
115-
name: "sentry.elixir",
116-
version: "10.7.1"
117-
},
118108
request: %{
119109
url: attributes[:"http.target"],
120110
method: attributes[:"http.method"],
@@ -145,7 +135,6 @@ defmodule Sentry.Opentelemetry.SpanProcessor do
145135
child_spans
146136
) do
147137
%Sentry.Transaction{
148-
event_id: Sentry.UUID.uuid4_hex(),
149138
start_timestamp: root_span.start_time,
150139
timestamp: root_span.end_time,
151140
transaction: attributes[:"http.target"],
@@ -159,11 +148,6 @@ defmodule Sentry.Opentelemetry.SpanProcessor do
159148
parent_span_id: root_span.parent_span_id
160149
}
161150
},
162-
platform: "elixir",
163-
sdk: %{
164-
name: "sentry.elixir",
165-
version: "10.7.1"
166-
},
167151
request: %{
168152
url: attributes[:"http.url"],
169153
method: attributes[:"http.method"],

0 commit comments

Comments
 (0)