Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional parameter to record_exception method #1242

Merged
merged 9 commits into from
Nov 3, 2020
7 changes: 6 additions & 1 deletion opentelemetry-api/src/opentelemetry/trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ def set_status(self, status: Status) -> None:
"""

@abc.abstractmethod
def record_exception(self, exception: Exception) -> None:
def record_exception(
self,
exception: Exception,
attributes: types.Attributes = None,
timestamp: typing.Optional[int] = None,
) -> None:
"""Records an exception as a span event."""

def __enter__(self) -> "Span":
Expand Down