File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -267,4 +267,56 @@ defmodule Sentry.Interfaces do
267267 :stacktrace
268268 ]
269269 end
270+
271+ defmodule Span do
272+ @ moduledoc """
273+ The struct for a tracing **span**.
274+
275+ See <https://develop.sentry.dev/sdk/event-payloads/span>.
276+ """
277+
278+ @ moduledoc since: "11.0.0"
279+
280+ @ typedoc since: "11.0.0"
281+ @ type t ( ) :: % __MODULE__ {
282+ start_timestamp: String . t ( ) | number ( ) ,
283+ timestamp: String . t ( ) | number ( ) ,
284+ span_id: String . t ( ) ,
285+ parent_span_id: String . t ( ) | nil ,
286+ description: String . t ( ) ,
287+ tags: map ( ) ,
288+ trace_id: String . t ( ) | nil ,
289+ op: String . t ( ) ,
290+ spans: [ t ( ) ] ,
291+ status: String . t ( ) ,
292+ data: map ( ) ,
293+ origin: String . t ( ) ,
294+ measurements: % {
295+ optional ( String . t ( ) ) => % { required ( :value ) => term ( ) , optional ( :unit ) => String . t ( ) }
296+ } ,
297+
298+ # Attributes that are only for "transactions", which are basically the root
299+ # span of a trace. https://develop.sentry.dev/sdk/event-payloads/transaction/
300+ event_id: String . t ( ) | nil ,
301+ transaction_info: % { source: :custom | :url | :route | :view | :component | :task }
302+ }
303+
304+ defstruct [
305+ :event_id ,
306+ :description ,
307+ :tags ,
308+ :parent_span_id ,
309+ :trace_id ,
310+ :op ,
311+ :span_id ,
312+ :start_timestamp ,
313+ :timestamp ,
314+ :spans ,
315+ :measurements ,
316+ :transaction_info ,
317+ :status ,
318+ :data ,
319+ :origin
320+ ]
321+ end
270322end
You can’t perform that action at this time.
0 commit comments