File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
opentelemetry-api/src/opentelemetry/util
opentelemetry-sdk/src/opentelemetry/sdk/resources Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 2828 None ,
2929]
3030
31-
3231AttributeValue = AnyValue
3332Attributes = Optional [Mapping [str , AnyValue ]]
3433
Original file line number Diff line number Diff line change 9090except ImportError :
9191 pass
9292
93- LabelValue = Union [
94- str ,
95- bool ,
96- int ,
97- float ,
98- Sequence [str ],
99- Sequence [bool ],
100- Sequence [int ],
101- Sequence [float ],
102- ]
103- Attributes = typing .Mapping [str , LabelValue ]
93+ LabelValue = AttributeValue
94+ Attributes = AllAttributes
10495logger = logging .getLogger (__name__ )
10596
10697CLOUD_PROVIDER = ResourceAttributes .CLOUD_PROVIDER
@@ -173,7 +164,7 @@ class Resource:
173164
174165 def __init__ (
175166 self ,
176- attributes : AllAttributes ,
167+ attributes : Attributes ,
177168 schema_url : typing .Optional [str ] = None ,
178169 ):
179170 self ._attributes = BoundedAttributes (attributes = attributes )
@@ -183,7 +174,7 @@ def __init__(
183174
184175 @staticmethod
185176 def create (
186- attributes : typing .Optional [AllAttributes ] = None ,
177+ attributes : typing .Optional [Attributes ] = None ,
187178 schema_url : typing .Optional [str ] = None ,
188179 ) -> "Resource" :
189180 """Creates a new `Resource` from attributes.
@@ -254,7 +245,7 @@ def get_empty() -> "Resource":
254245 return _EMPTY_RESOURCE
255246
256247 @property
257- def attributes (self ) -> AllAttributes :
248+ def attributes (self ) -> Attributes :
258249 return self ._attributes
259250
260251 @property
You can’t perform that action at this time.
0 commit comments