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
feat: support OTel span.addLink, span.addLinks; add similar APIs to the APM agent API (#4078)
This also updates a few places for the new otel/api v1.9.0.
Refs: #4071 (the dependabot update doesn't get everything)
Refs: #4070
Refs: #4069
Refs: #4077 (a separate issue for this other new feature in otel/[email protected])
Copy file name to clipboardexpand all lines: docs/span-api.asciidoc
+30
Original file line number
Diff line number
Diff line change
@@ -242,3 +242,33 @@ If false-y values (e.g. `null`) are given for both `type` and `name`, then `serv
242
242
If this method is not called, the service target values are inferred from other span fields (https://github.com/elastic/apm/blob/main/specs/agents/tracing-spans-service-target.md#field-values[spec]).
243
243
244
244
`service.target.*` fields are ignored for APM Server before v8.3.
245
+
246
+
[[span-addlink]]
247
+
==== `span.addLink(link)`
248
+
249
+
[small]#Added in: REPLACEME#
250
+
251
+
* `link` +{type-link}+
252
+
253
+
A span can refer to zero or more other transactions or spans (separate
254
+
from its parent). Span links will be shown in the Kibana APM app trace view. The
255
+
`link` argument is an object with a single "context" field that is a
256
+
`Transaction`, `Span`, OpenTelemetry `SpanContext` object, or W3C trace-context
257
+
'traceparent' string.
258
+
For example: `span.addLink({ context: anotherSpan })`.
259
+
260
+
[[span-addlinks]]
261
+
==== `span.addLinks([links])`
262
+
263
+
[small]#Added in: REPLACEME#
264
+
265
+
* `links` +{type-array}+ Span links.
266
+
267
+
Add span links to this span.
268
+
269
+
A span can refer to zero or more other transactions or spans (separate
270
+
from its parent). Span links will be shown in the Kibana APM app trace view. The
271
+
`link` argument is an object with a single "context" field that is a
272
+
`Transaction`, `Span`, OpenTelemetry `SpanContext` object, or W3C trace-context
273
+
'traceparent' string.
274
+
For example: `span.addLinks([{ context: anotherSpan }])`.
Copy file name to clipboardexpand all lines: docs/transaction-api.asciidoc
+30
Original file line number
Diff line number
Diff line change
@@ -308,3 +308,33 @@ Non-HTTP transactions will begin with an outcome of `unknown`.
308
308
* `outcome` +{type-string}+
309
309
310
310
The `setOutcome` method allows an end user to override the Node.js agent's default setting of a transaction's `outcome` property. The `setOutcome` method accepts a string of either `success`, `failure`, or `unknown`, and will force the agent to report this value for a specific span.
311
+
312
+
[[transaction-addlink]]
313
+
==== `transaction.addLink(link)`
314
+
315
+
[small]#Added in: REPLACEME#
316
+
317
+
* `link` +{type-link}+
318
+
319
+
A transaction can refer to zero or more other transactions or spans (separate
320
+
from its parent). Span links will be shown in the Kibana APM app trace view. The
321
+
`link` argument is an object with a single "context" field that is a
322
+
`Transaction`, `Span`, OpenTelemetry `SpanContext` object, or W3C trace-context
323
+
'traceparent' string.
324
+
For example: `transaction.addLink({ context: anotherSpan })`.
325
+
326
+
[[transaction-addlinks]]
327
+
==== `transaction.addLinks([links])`
328
+
329
+
[small]#Added in: REPLACEME#
330
+
331
+
* `links` +{type-array}+ Span links.
332
+
333
+
Add span links to this transaction.
334
+
335
+
A transaction can refer to zero or more other transactions or spans (separate
336
+
from its parent). Span links will be shown in the Kibana APM app trace view. The
337
+
`link` argument is an object with a single "context" field that is a
338
+
`Transaction`, `Span`, OpenTelemetry `SpanContext` object, or W3C trace-context
339
+
'traceparent' string.
340
+
For example: `transaction.addLinks([{ context: anotherSpan }])`.
0 commit comments