From 63f57b65ef90f527e45134f2fb27310b213fcb9f Mon Sep 17 00:00:00 2001 From: shreyagupta30 Date: Wed, 14 Oct 2020 23:30:07 +0530 Subject: [PATCH] add optional parameter to record_exception method --- opentelemetry-api/src/opentelemetry/trace/span.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opentelemetry-api/src/opentelemetry/trace/span.py b/opentelemetry-api/src/opentelemetry/trace/span.py index 2b206468afa..0a61908f3ed 100644 --- a/opentelemetry-api/src/opentelemetry/trace/span.py +++ b/opentelemetry-api/src/opentelemetry/trace/span.py @@ -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":