Skip to content

Commit

Permalink
Unmark Span.add_link() as abstract method and add warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
chittalpatel authored and ocelotl committed Feb 14, 2024
1 parent 7dc78de commit 4f52379
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opentelemetry-api/src/opentelemetry/trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ def add_event(
timestamp if the `timestamp` argument is omitted.
"""

@abc.abstractmethod
def add_link(
def add_link( # pylint: disable=no-self-use
self,
context: "SpanContext",
attributes: types.Attributes = None,
Expand All @@ -133,6 +132,7 @@ def add_link(
this method later since samplers can only consider information already
present during span creation.
"""
_logger.warning("Span.add_link() is a no-op.")

@abc.abstractmethod
def update_name(self, name: str) -> None:
Expand Down

0 comments on commit 4f52379

Please sign in to comment.