File tree Expand file tree Collapse file tree 2 files changed +13
-19
lines changed
aws_lambda_powertools/tracing Expand file tree Collapse file tree 2 files changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ def set_attribute(
29
29
** kwargs ,
30
30
) -> None :
31
31
"""
32
- Set attribute on this span with a key-value pair.
32
+ Set an attribute on this span with a key-value pair.
33
33
34
34
Parameters
35
35
----------
36
- key : str
36
+ key: str
37
37
attribute key
38
- value : Any
38
+ value: Any
39
39
Value for attribute
40
- category : Literal["Annotation","Metadata","Auto"] = "Auto"
40
+ category: Literal["Annotation","Metadata","Auto"] = "Auto"
41
41
This parameter specifies the category of attribute to set.
42
42
- **"Annotation"**: Sets the attribute as an Annotation.
43
43
- **"Metadata"**: Sets the attribute as Metadata.
@@ -94,15 +94,15 @@ def set_attribute(
94
94
** kwargs ,
95
95
) -> None :
96
96
"""
97
- Set attribute on the current active span with a key-value pair.
97
+ Set an attribute on the current active span with a key-value pair.
98
98
99
99
Parameters
100
100
----------
101
- key : str
101
+ key: str
102
102
attribute key
103
- value : Any
103
+ value: Any
104
104
Value for attribute
105
- category : Literal["Annotation","Metadata","Auto"] = "Auto"
105
+ category: Literal["Annotation","Metadata","Auto"] = "Auto"
106
106
This parameter specifies the type of attribute to set.
107
107
- **"Annotation"**: Sets the attribute as an Annotation.
108
108
- **"Metadata"**: Sets the attribute as Metadata.
Original file line number Diff line number Diff line change @@ -179,20 +179,20 @@ def __init__(
179
179
self ._disable_xray_trace_batching ()
180
180
181
181
def set_attribute (self , key : str , value : Any , ** kwargs ):
182
- """Set attribute on current active span with a key-value pair.
182
+ """Set an attribute on current active span with a key-value pair.
183
183
184
184
Parameters
185
185
----------
186
- key : str
186
+ key: str
187
187
attribute key
188
- value : Any
188
+ value: Any
189
189
Value for attribute
190
190
kwargs: Optional[dict]
191
191
Optional parameters to be passed to provider.set_attributes
192
192
193
193
Example
194
194
-------
195
- Set attribute for a pseudo service named payment
195
+ Set an attribute for a pseudo service named payment
196
196
197
197
tracer = Tracer(service="payment")
198
198
tracer.set_attribute("PaymentStatus", "CONFIRMED")
@@ -846,13 +846,7 @@ def _reset_config(cls):
846
846
cls ._config = copy .copy (cls ._default_config )
847
847
848
848
def _patch_xray_provider (self ):
849
- # Due to Lazy Import, we need to activate `core` attrib via import
850
- # we also need to include `patch`, `patch_all` methods
851
- # to ensure patch calls are done via the provider
852
-
853
- provider = XrayProvider ()
854
-
855
- return provider
849
+ return XrayProvider ()
856
850
857
851
def _disable_xray_trace_batching (self ):
858
852
"""Configure X-Ray SDK to send subsegment individually over batching
You can’t perform that action at this time.
0 commit comments