org.apache.ignite.internal.processors.tracing.configuration

## Class GridTracingConfigurationManager

- java.lang.Object
- - org.apache.ignite.internal.processors.tracing.configuration.GridTracingConfigurationManager

All Implemented Interfaces:
  TracingConfigurationManager

    public class GridTracingConfigurationManager
    extends Object
    implements TracingConfigurationManager

Tracing configuration manager implementation that uses distributed meta storage in order to store tracing configuration.

### Field Summary

Fields
`protected GridKernalContext` `ctx` Kernal context.
`protected IgniteLogger` `log` Grid logger.
`static String` `WARNING_MSG_TRACING_CONFIG_UPDATE_FAILED_COORDINATES`
`static String` `WARNING_MSG_TRACING_CONFIG_UPDATE_FAILED_SCOPE`

### Fields inherited from interface org.apache.ignite.spi.tracing.TracingConfigurationManager

`DEFAULT_COMMUNICATION_CONFIGURATION, DEFAULT_DISCOVERY_CONFIGURATION, DEFAULT_EXCHANGE_CONFIGURATION, DEFAULT_SQL_CONFIGURATION, DEFAULT_TX_CONFIGURATION, NOOP_CONFIGURATION`

### Constructor Summary

Constructors
Constructor and Description
`GridTracingConfigurationManager(@NotNull GridKernalContext ctx)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`@NotNull TracingConfigurationParameters` `get(@NotNull TracingConfigurationCoordinates coordinates)` Get the most specific tracing parameters for the specified tracing coordinates (scope, label, etc.).
`@NotNull Map<TracingConfigurationCoordinates,TracingConfigurationParameters>` `getAll(@Nullable Scope scope)` List all pairs of tracing configuration coordinates and tracing configuration parameters or list all pairs of tracing configuration and parameters for the specific scope.
`void` `reset(@NotNull TracingConfigurationCoordinates coordinates)` Reset tracing configuration for the specific tracing coordinates (scope, label, etc.) to default values.
`void` `resetAll(@Nullable Scope scope)` Reset tracing configuration for the specific scope, or all tracing configurations if scope not specified.
`void` `set(@NotNull TracingConfigurationCoordinates coordinates, @NotNull TracingConfigurationParameters parameters)` Set new tracing configuration for the specific tracing coordinates (scope, label, etc.).

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

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

### Field Detail

#### WARNING_MSG_TRACING_CONFIG_UPDATE_FAILED_COORDINATES

    public static final String WARNING_MSG_TRACING_CONFIG_UPDATE_FAILED_COORDINATES

See Also:
  Constant Field Values

#### WARNING_MSG_TRACING_CONFIG_UPDATE_FAILED_SCOPE

    public static final String WARNING_MSG_TRACING_CONFIG_UPDATE_FAILED_SCOPE

See Also:
  Constant Field Values

#### ctx

    @GridToStringExclude
    protected final GridKernalContext ctx

Kernal context.

#### log

    @GridToStringExclude
    protected final IgniteLogger log

Grid logger.

### Constructor Detail

#### GridTracingConfigurationManager

    public GridTracingConfigurationManager(@NotNull
                                           @NotNull GridKernalContext ctx)

Constructor.

Parameters:
  `ctx` - Context.

### Method Detail

#### set

    public void set(@NotNull
                    @NotNull TracingConfigurationCoordinates coordinates,
                    @NotNull
                    @NotNull TracingConfigurationParameters parameters)

Set new tracing configuration for the specific tracing coordinates (scope, label, etc.). If tracing configuration with specified coordinates already exists it'll be overrided, otherwise new one will be created.

Specified by:
  `set` in interface `TracingConfigurationManager`
Parameters:
  `coordinates` - `TracingConfigurationCoordinates` Specific set of locators like `Scope` and label, that defines subset of traces and/or spans that'll use given configuration.
  `parameters` - `TracingConfigurationParameters` e.g. sampling rate, set of included scopes etc.

#### get

    @NotNull
    public @NotNull TracingConfigurationParameters get(@NotNull
                                                                @NotNull TracingConfigurationCoordinates coordinates)

Get the most specific tracing parameters for the specified tracing coordinates (scope, label, etc.). The most specific means:

- If there's tracing configuration that matches all tracing configuration attributes (scope and label) — it'll be returned.
- If there's no tracing configuration with specified label, or label wasn't specified — scope specific tracing configuration will be returned.
- If there's no tracing configuration with specified scope — default scope specific configuration will be returned.

Specified by:
  `get` in interface `TracingConfigurationManager`
Parameters:
  `coordinates` - `TracingConfigurationCoordinates` Specific set of locators like `Scope` and label that defines a subset of traces and/or spans that'll use given configuration.
Returns:
  `TracingConfigurationParameters` instance.

#### getAll

    @NotNull
    public @NotNull Map<TracingConfigurationCoordinates,TracingConfigurationParameters> getAll(@Nullable
                                                                                                        @Nullable Scope scope)

List all pairs of tracing configuration coordinates and tracing configuration parameters or list all pairs of tracing configuration and parameters for the specific scope.

Specified by:
  `getAll` in interface `TracingConfigurationManager`
Parameters:
  `scope` - Nullable scope of tracing configuration to be retrieved. If null - all configuration will be returned.
Returns:
  The whole set of tracing configuration.

#### reset

    public void reset(@NotNull
                      @NotNull TracingConfigurationCoordinates coordinates)

Reset tracing configuration for the specific tracing coordinates (scope, label, etc.) to default values. Please pay attention, that there's no default values for label specific coordinates, so such kinds of configurations will be removed.

Specified by:
  `reset` in interface `TracingConfigurationManager`
Parameters:
  `coordinates` - `TracingConfigurationCoordinates` specific set of locators like `Scope` and label that defines a subset of traces and/or spans that will be reset.

#### resetAll

    public void resetAll(@Nullable
                         @Nullable Scope scope)
                  throws IgniteException

Reset tracing configuration for the specific scope, or all tracing configurations if scope not specified.

Specified by:
  `resetAll` in interface `TracingConfigurationManager`
Parameters:
  `scope` - `Scope` that defines a set of applicable tracing configurations.
Throws:
  `IgniteException` - If failed to reset tracing configuration.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023