Skip to content

Commit 724739f

Browse files
vrccamarcdel
authored andcommitted
Calls self() from prepare function
1 parent 3d75cb0 commit 724739f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/open_telemetry_decorator.ex

+2-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ defmodule OpenTelemetryDecorator do
5252
Kernel.binding(),
5353
unquote(span_name),
5454
unquote(dynamic_links),
55-
self(),
5655
unquote(include)
5756
)
5857

@@ -77,7 +76,7 @@ defmodule OpenTelemetryDecorator do
7776
reraise %ArgumentError{message: "#{target} #{e.message}"}, __STACKTRACE__
7877
end
7978

80-
def prepare(binding, span_name, dynamic_links, pid, include) do
79+
def prepare(binding, span_name, dynamic_links, include) do
8180
links =
8281
binding
8382
|> Enum.into(%{})
@@ -95,7 +94,7 @@ defmodule OpenTelemetryDecorator do
9594
|> Keyword.take(include)
9695
|> O11y.set_attributes(namespace: prefix)
9796

98-
O11y.set_attributes(pid: pid)
97+
O11y.set_attributes(pid: self())
9998

10099
%{
101100
new_span: new_span,

0 commit comments

Comments
 (0)