Skip to content

v1.4.9

Compare
Choose a tag to compare
@marcdel marcdel released this 14 Feb 07:55
· 18 commits to main since this release

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