@IgniteSpiMultipleInstancesSupport(value=true) @IgniteSpiConsistencyChecked(optional=true) public class OpenCensusTracingSpi extends IgniteSpiAdapter implements TracingSpi<OpenCensusSpanAdapter>
IgniteConfiguration cfg;
cfg.setTracingSpi(new OpenCensusTracingSpi());
If you don't have OpenCensus Tracing:
IgniteConfiguration cfg;
cfg.setTracingSpi(new OpenCensusTracingSpi(new ZipkinExporterHandler(...)));
See constructors description for detailed explanation.ignite, igniteInstanceName, log
Constructor and Description |
---|
OpenCensusTracingSpi()
This constructor is used if environment (JVM) already has OpenCensus tracing.
|
OpenCensusTracingSpi(io.opencensus.trace.export.SpanExporter.Handler... exporters)
This constructor is used if environment (JVM) hasn't OpenCensus tracing.
|
Modifier and Type | Method and Description |
---|---|
OpenCensusSpanAdapter |
create(@NotNull String name,
@Nullable byte[] parentSerializedSpan)
Creates Span given name and explicit parent.
|
@NotNull OpenCensusSpanAdapter |
create(@NotNull String name,
@Nullable OpenCensusSpanAdapter parentSpan)
Creates Span given name and explicit parent.
|
String |
getName()
Gets SPI name.
|
byte[] |
serialize(@NotNull OpenCensusSpanAdapter span)
Serializes span to byte array to send context over network.
|
void |
spiStart(String igniteInstanceName)
This method is called to start SPI.
|
void |
spiStop()
This method is called to stop SPI.
|
byte |
type() |
addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getLocalNode, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, setName, started, startInfo, startStopwatch, stopInfo, unregisterMBean
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized
public OpenCensusTracingSpi()
Tracing.getExportComponent()
public OpenCensusTracingSpi(io.opencensus.trace.export.SpanExporter.Handler... exporters)
exporters
- Exporters.public OpenCensusSpanAdapter create(@NotNull @NotNull String name, @Nullable @Nullable byte[] parentSerializedSpan) throws Exception
create
in interface TracingSpi<OpenCensusSpanAdapter>
name
- Name of span to create.parentSerializedSpan
- Parent span as serialized bytes.Exception
- If failed to deserialize patent span.@NotNull public @NotNull OpenCensusSpanAdapter create(@NotNull @NotNull String name, @Nullable @Nullable OpenCensusSpanAdapter parentSpan)
create
in interface TracingSpi<OpenCensusSpanAdapter>
name
- Name of span to create.parentSpan
- Parent span.public byte[] serialize(@NotNull @NotNull OpenCensusSpanAdapter span)
serialize
in interface TracingSpi<OpenCensusSpanAdapter>
span
- Span.public String getName()
getName
in interface IgniteSpi
getName
in class IgniteSpiAdapter
public void spiStart(String igniteInstanceName) throws IgniteSpiException
spiStart
in interface IgniteSpi
igniteInstanceName
- Name of Ignite instance this SPI is being started for
(null
for default Ignite instance).IgniteSpiException
- Throws in case of any error during SPI start.public void spiStop() throws IgniteSpiException
Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.
spiStop
in interface IgniteSpi
IgniteSpiException
- Thrown in case of any error during SPI stop.public byte type()
type
in interface TracingSpi<OpenCensusSpanAdapter>
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024