Skip to content

Commit

Permalink
Remove remaining mentions of add_link
Browse files Browse the repository at this point in the history
  • Loading branch information
jjatria committed Jun 11, 2024
1 parent 56835a6 commit 1dbec89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ Revision history for OpenTelemetry

{{$NEXT}}

* Updated the documentation to remove remaining mentions of the
span's 'add_link' method, which was removed to comply with the
specification

0.023 2024-06-03 10:31:57+01:00 Europe/London

* Fixed an issue with experimental cleanup where "DBI::db::execute"
Expand Down
7 changes: 4 additions & 3 deletions lib/OpenTelemetry/Trace/Tracer.pod
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ trace will only have one root span.

Spans can also have links to other spans, including those that belong to a
different trace. These can be set on span creation via the C<links> parameter,
which must hold a reference to an array of hashes, each of which should
be usable (when dereferenced) as the parameters to the span's
L<add_link|OpenTelemetry::Trace::Span/add_link> method.
which must hold a reference to an array of hashes. The hashes should have a
C<context> key set to the L<OpenTelemetry::Trace::SpanContext> of the span to
link to, and an optional C<attributes> key set to a hashref of attributes
to set on the link.

It is the responsibility of the user to make sure that every span that has
been created is ended (via a call to its L<end|OpenTelemetry::Trace::Span/end>
Expand Down
2 changes: 1 addition & 1 deletion t/OpenTelemetry/Trace/Span.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Test2::V0 -target => 'OpenTelemetry::Trace::Span';
is my $s = CLASS->new( name => 'foo' ), object { prop isa => CLASS },
'Can create span';

ref_is $s->add_event( x => 1), $s, 'add_link is chainable';
ref_is $s->add_event( x => 1), $s, 'add_event is chainable';
ref_is $s->add_event, $s, 'add_event call can be empty';
ref_is $s->end(123), $s, 'end takes time';
ref_is $s->end, $s, 'end is chainable';
Expand Down

0 comments on commit 1dbec89

Please sign in to comment.