org.apache.ignite.internal.processors.tracing.messages

## Class TraceableMessagesHandler

- java.lang.Object
- - org.apache.ignite.internal.processors.tracing.messages.TraceableMessagesHandler

    public class TraceableMessagesHandler
    extends Object

Helper to handle traceable messages.

### Constructor Summary

Constructors
Constructor and Description
`TraceableMessagesHandler(SpanManager spanMgr, IgniteLogger log)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `afterReceive(TraceableMessage msg)` Called when message is received.
`void` `beforeSend(TraceableMessage msg)` Called when message is going to be send.
`<T extends TraceableMessage> T` `branch(T msg, TraceableMessage parent)` Injects a sub-span to `msg` as child span contained in given `parent`.
`void` `finishProcessing(TraceableMessage msg)`

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

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

### Constructor Detail

#### TraceableMessagesHandler

    public TraceableMessagesHandler(SpanManager spanMgr,
                                    IgniteLogger log)

Parameters:
  `spanMgr` - Span manager.
  `log` - Logger.

### Method Detail

#### afterReceive

    public void afterReceive(TraceableMessage msg)

Called when message is received. A span with name associated with given message will be created. from contained serialized span `SpanContainer.serializedSpanBytes()`

Parameters:
  `msg` - Traceable message.

#### beforeSend

    public void beforeSend(TraceableMessage msg)

Called when message is going to be send. A serialized span will be created and attached to `TraceableMessage.spanContainer()`.

Parameters:
  `msg` - Traceable message.

#### branch

    public <T extends TraceableMessage> T branch(T msg,
                                                 TraceableMessage parent)

Injects a sub-span to `msg` as child span contained in given `parent`.

Type Parameters:
  `T` - Traceable message type.
Parameters:
  `msg` - Branched message.
  `parent` - Parent message.
Returns:
  Branched message with span context from parent message.

#### finishProcessing

    public void finishProcessing(TraceableMessage msg)

Parameters:
  `msg` - Message.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020