org.apache.ignite.internal.processors.tracing

## Class SpanImpl

- java.lang.Object
- - org.apache.ignite.internal.processors.tracing.SpanImpl

All Implemented Interfaces:
  Span

    public class SpanImpl
    extends Object
    implements Span

Implementation of a `Span`

### Constructor Summary

Constructors
Constructor and Description
`SpanImpl(SpiSpecificSpan spiSpecificSpan, SpanType spanType, Set<Scope> includedScopes)` Constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`Span` `addLog(Supplier<String> logDescSupplier)` Logs work to span.
`Span` `addTag(String tagName, Supplier<String> tagValSupplier)` Adds tag to span with `String` value.
`Span` `end()` Ends span.
`Set<Scope>` `includedScopes()`
`boolean` `isEnded()`
`Span` `setStatus(SpanStatus spanStatus)` Explicitly set status for span.
`SpiSpecificSpan` `spiSpecificSpan()`
`SpanType` `type()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.ignite.internal.processors.tracing.Span

`isChainable`

### Constructor Detail

#### SpanImpl

    public SpanImpl(SpiSpecificSpan spiSpecificSpan,
                    SpanType spanType,
                    Set<Scope> includedScopes)

Constructor

Parameters:
  `spiSpecificSpan` - Spi specific span.
  `spanType` - Type of a span.
  `includedScopes` - Set of included scopes.

### Method Detail

#### addTag

    public Span addTag(String tagName,
                       Supplier<String> tagValSupplier)

Adds tag to span with `String` value.

Specified by:
  `addTag` in interface `Span`
Parameters:
  `tagName` - Tag name.
  `tagValSupplier` - Tag value supplier. Supplier is used instead of strict tag value cause of it's lazy nature. So that it's possible not to generate String tag value in case of NoopSpan.

#### addLog

    public Span addLog(Supplier<String> logDescSupplier)

Logs work to span.

Specified by:
  `addLog` in interface `Span`
Parameters:
  `logDescSupplier` - Log description supplier. Supplier is used instead of strict log description cause of it's lazy nature. So that it's possible not to generate String log description in case of NoopSpan.

#### setStatus

    public Span setStatus(SpanStatus spanStatus)

Explicitly set status for span.

Specified by:
  `setStatus` in interface `Span`
Parameters:
  `spanStatus` - Status.

#### end

    public Span end()

Ends span. This action sets default status if not set and mark the span as ready to be exported.

Specified by:
  `end` in interface `Span`

#### isEnded

    public boolean isEnded()

Specified by:
  `isEnded` in interface `Span`
Returns:
  `true` if span has already ended.

#### type

    public SpanType type()

Specified by:
  `type` in interface `Span`
Returns:
  Type of given span.

#### includedScopes

    public Set<Scope> includedScopes()

Specified by:
  `includedScopes` in interface `Span`
Returns:
  Set of included scopes.

#### spiSpecificSpan

    public SpiSpecificSpan spiSpecificSpan()

Returns:
  Spi specific span delegate.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022