Table of Contents

Struct Link

Namespace
OpenTelemetry.Trace
Assembly
OpenTelemetry.Api.dll

Link associated with the span.

public readonly struct Link : IEquatable<Link>
Implements
Inherited Members

Constructors

Initializes a new instance of the Link struct.

public Link(in SpanContext spanContext)

Parameters

spanContext SpanContext

Span context of a linked span.

Initializes a new instance of the Link struct.

public Link(in SpanContext spanContext, SpanAttributes attributes)

Parameters

spanContext SpanContext

Span context of a linked span.

attributes SpanAttributes

Link attributes.

Properties

Gets the collection of attributes associated with the link.

public IEnumerable<KeyValuePair<string, object>> Attributes { get; }

Property Value

IEnumerable<KeyValuePair<string, object>>

Gets the span context of a linked span.

public SpanContext Context { get; }

Property Value

SpanContext

Methods

public bool Equals(Link other)

Parameters

other Link

Returns

bool
public override bool Equals(object obj)

Parameters

obj object

Returns

bool
public override int GetHashCode()

Returns

int

Operators

Compare two Link for equality.

public static bool operator ==(Link link1, Link link2)

Parameters

link1 Link

First link to compare.

link2 Link

Second link to compare.

Returns

bool

Compare two Link for not equality.

public static bool operator !=(Link link1, Link link2)

Parameters

link1 Link

First link to compare.

link2 Link

Second link to compare.

Returns

bool