v1.4.9
Adds the ability to pass links to a function decorated with with_span
or trace
. This is done by passing a links
option to the decorator.
The links
option should be the atom names of variables containing linked spans. You can create a link to a span with OpenTelemetry.link/1
e.g.
require OpenTelemetry.Tracer, as: Tracer
def parent do
parent_span = Tracer.start_span("parent")
link = OpenTelemetry.link(parent_span)
child(link)
end
@decorate with_span("child", links: [:parent_link])
def child(parent_link) do
# ...
:ok
end
Full Changelog: v1.4.8...v1.4.9