Skip to content

Commit

Permalink
Revert "Implement get_attribute and set_attribute"
Browse files Browse the repository at this point in the history
This reverts commit de34172.
  • Loading branch information
ocelotl committed Aug 5, 2020
1 parent 47b0fbc commit 2a9ec4e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
10 changes: 0 additions & 10 deletions opentelemetry-api/src/opentelemetry/trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ def set_attribute(self, key: str, value: types.AttributeValue) -> None:
Sets a single Attribute with the key and value passed as arguments.
"""

@abc.abstractmethod
def get_attribute(self, key: str) -> types.AttributeValue:
"""Gets an Attribute.
Gets a single Attribute with the key passed as argument.
"""

@abc.abstractmethod
def add_event(
self,
Expand Down Expand Up @@ -242,9 +235,6 @@ def end(self, end_time: typing.Optional[int] = None) -> None:
def set_attribute(self, key: str, value: types.AttributeValue) -> None:
pass

def get_attribute(self, key: str) -> types.AttributeValue:
pass

def add_event(
self,
name: str,
Expand Down
4 changes: 0 additions & 4 deletions opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,6 @@ def set_attribute(self, key: str, value: types.AttributeValue) -> None:
with self._lock:
self.attributes[key] = value

def get_attribute(self, key: str) -> types.AttributeValue:

return self.attributes[key]

@staticmethod
def _filter_attribute_values(attributes: types.Attributes):
if attributes:
Expand Down

0 comments on commit 2a9ec4e

Please sign in to comment.