org.apache.ignite.internal.managers.tracing

## Class GridTracingManager

- java.lang.Object
- - org.apache.ignite.internal.managers.GridManagerAdapter<TracingSpi>
  - - org.apache.ignite.internal.managers.tracing.GridTracingManager

All Implemented Interfaces:
  GridComponent, GridManager, SpanManager, Tracing

    public class GridTracingManager
    extends GridManagerAdapter<TracingSpi>
    implements Tracing

Tracing Manager.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.managers.GridManagerAdapter

`ctx, log`

### Constructor Summary

Constructors
Constructor and Description
`GridTracingManager(GridKernalContext ctx, boolean useNoopTracingSpi)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`@NotNull TracingConfigurationManager` `configuration()` Returns the `TracingConfigurationManager` instance that allows to Configure tracing parameters such as sampling rate for the specific tracing coordinates such as scope and label.
`Span` `create(@NotNull SpanType spanType, @Nullable byte[] serializedParentSpan)` Creates Span given name and explicit parent.
`Span` `create(@NotNull SpanType spanType, @Nullable Span parentSpan)` Creates Span given name and explicit parent.
`@NotNull Span` `create(@NotNull SpanType spanType, @Nullable Span parentSpan, @Nullable String lb)` Creates Span given name and explicit parent.
`TraceableMessagesHandler` `messages()`
`byte[]` `serialize(@NotNull Span span)` Serializes span to byte array to send context over network.
`void` `start()` Starts grid component.
`void` `stop(boolean cancel)` Stops grid component.

### Methods inherited from class org.apache.ignite.internal.managers.GridManagerAdapter

`assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, enabled, getSpi, getSpi, getSpis, inject, onAfterSpiStart, onBeforeSpiStart, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStart0, onKernalStop, onKernalStop0, onReconnected, printMemoryStats, startInfo, startSpi, stopInfo, stopSpi, toString, validateNode, validateNode`

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

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

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

`create`

### Constructor Detail

#### GridTracingManager

    public GridTracingManager(GridKernalContext ctx,
                              boolean useNoopTracingSpi)

Constructor.

Parameters:
  `ctx` - Context.
  `useNoopTracingSpi` - Flag that signals that NoOp tracing spi should be used instead of the one, specified in the context. It's a part of the failover logic that is suitable if an exception is thrown when the manager starts.

### Method Detail

#### start

    public void start()
               throws IgniteCheckedException

Description copied from interface: `GridComponent`
Starts grid component.

Specified by:
  `start` in interface `GridComponent`
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### stop

    public void stop(boolean cancel)
              throws IgniteCheckedException

Description copied from interface: `GridComponent`
Stops grid component.

Specified by:
  `stop` in interface `GridComponent`
Parameters:
  `cancel` - If `true`, then all ongoing tasks or jobs for relevant components need to be cancelled.
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### create

    public Span create(@NotNull
                       @NotNull SpanType spanType,
                       @Nullable
                       @Nullable Span parentSpan)

Creates Span given name and explicit parent.

Specified by:
  `create` in interface `SpanManager`
Parameters:
  `spanType` - Type of span to create.
  `parentSpan` - Parent span.
Returns:
  Created span.

#### create

    public Span create(@NotNull
                       @NotNull SpanType spanType,
                       @Nullable
                       @Nullable byte[] serializedParentSpan)

Creates Span given name and explicit parent.

Specified by:
  `create` in interface `SpanManager`
Parameters:
  `spanType` - Type of span to create.
  `serializedParentSpan` - Parent span as serialized bytes.
Returns:
  Created span.

#### create

    @NotNull
    public @NotNull Span create(@NotNull
                                         @NotNull SpanType spanType,
                                         @Nullable
                                         @Nullable Span parentSpan,
                                         @Nullable
                                         @Nullable String lb)

Creates Span given name and explicit parent.

Specified by:
  `create` in interface `SpanManager`
Parameters:
  `spanType` - Type of span to create.
  `parentSpan` - Parent span.
  `lb` - Label.
Returns:
  Created span.

#### serialize

    public byte[] serialize(@NotNull
                            @NotNull Span span)

Serializes span to byte array to send context over network.

Specified by:
  `serialize` in interface `SpanManager`
Parameters:
  `span` - Span.

#### messages

    public TraceableMessagesHandler messages()

Specified by:
  `messages` in interface `Tracing`
Returns:
  Helper to handle traceable messages.

#### configuration

    @NotNull
    public @NotNull TracingConfigurationManager configuration()

Returns the `TracingConfigurationManager` instance that allows to

- Configure tracing parameters such as sampling rate for the specific tracing coordinates such as scope and label.
- Retrieve the most specific tracing parameters for the specified tracing coordinates (scope and label)
- Restore the tracing parameters for the specified tracing coordinates to the default.
- List all pairs of tracing configuration coordinates and tracing configuration parameters.

Specified by:
  `configuration` in interface `Tracing`
Returns:
  `TracingConfigurationManager` instance.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022