You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.asciidoc
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,7 +263,7 @@ import elasticapm
263
263
def coffee_maker(strength):
264
264
fetch_water()
265
265
266
-
with elasticapm.capture_span('near-to-machine', tags={"type": "arabica"}):
266
+
with elasticapm.capture_span('near-to-machine', labels={"type": "arabica"}):
267
267
insert_filter()
268
268
for i in range(strengh):
269
269
pour_coffee()
@@ -277,17 +277,17 @@ def coffee_maker(strength):
277
277
* `span_type`: The type of the span, usually in a dot-separated hierarchy of `type`, `subtype`, and `action`, e.g. `db.mysql.query`. Alternatively, type, subtype and action can be provided as three separate arguments, see `span_subtype` and `span_action`.
278
278
* `skip_frames`: The number of stack frames to skip when collecting stack traces. Defaults to `0`.
279
279
* `leaf`: if `True`, all spans nested bellow this span will be ignored. Defaults to `False`.
280
-
* `tags`: a dictionary of tags. Both keys and values must be strings. Defaults to `None`.
280
+
* `labels`: a dictionary of labels. Keys must be strings, values can be strings, booleans, or numerical (`int`, `float`, `decimal.Decimal`). Defaults to `None`.
281
281
* `span_subtype`: subtype of the span, e.g. name of the database. Defaults to `None`.
282
282
* `span_action`: action of the span, e.g. `query`. Defaults to `None`
283
283
284
284
[float]
285
-
[[api-tag]]
286
-
==== `elasticapm.tag()`
285
+
[[api-label]]
286
+
==== `elasticapm.label()`
287
287
288
-
Attach tags to the the current transaction and errors.
288
+
Attach labels to the the current transaction and errors.
289
289
290
-
TIP: Before using custom tags, ensure you understand the different types of
290
+
TIP: Before using custom labels, ensure you understand the different types of
291
291
{apm-overview-ref-v}/metadata.html[metadata] that are available.
0 commit comments