Reference
Reference pairs a reference type constant (e.g., REFERENCE_CHILD_OF or REFERENCE_FOLLOWS_FROM) with the SpanContext it points to.
See the exported childOf() and followsFrom() functions at the package level.
Constructor Summary
Public Constructor | ||
public |
constructor(type: string, referencedContext: SpanContext) Initialize a new Reference instance. |
Method Summary
Public Methods | ||
public |
|
|
public |
|
Public Constructors
public constructor(type: string, referencedContext: SpanContext) source
Initialize a new Reference instance.
Params:
Name | Type | Attribute | Description |
type | string | the Reference type constant (e.g., REFERENCE_CHILD_OF or REFERENCE_FOLLOWS_FROM). |
|
referencedContext | SpanContext | the SpanContext being referred to. As a convenience, a Span instance may be passed in instead (in which case its .context() is used here). |
Public Methods
public referencedContext(): SpanContext source
Return:
SpanContext | The SpanContext being referred to (e.g., the parent in a REFERENCE_CHILD_OF Reference). |