We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba82816 commit 56cc06bCopy full SHA for 56cc06b
opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py
@@ -176,7 +176,7 @@ def create(
176
) -> "Resource":
177
"""Creates a new `Resource` from attributes.
178
179
- This is supposed to be called by the SDK and not by `ResourceDetector` instances.
+ `ResourceDetector` instances should not call this method.
180
181
Args:
182
attributes: Optional zero or more key-value pairs.
@@ -319,6 +319,7 @@ def __init__(self, raise_on_error: bool = False) -> None:
319
320
@abc.abstractmethod
321
def detect(self) -> "Resource":
322
+ """Don't call `Resource.create` here to avoid an infinite loop, instead instantiate `Resource` directly"""
323
raise NotImplementedError()
324
325
0 commit comments