Class OpenCensusMetricExporterSpi
- java.lang.Object
- 
- org.apache.ignite.spi.IgniteSpiAdapter
- 
- org.apache.ignite.internal.processors.metric.PushMetricsExporterAdapter
- 
- org.apache.ignite.spi.metric.opencensus.OpenCensusMetricExporterSpi
 
 
 
- 
- All Implemented Interfaces:
- IgniteSpi,- MetricExporterSpi
 
 public class OpenCensusMetricExporterSpi extends org.apache.ignite.internal.processors.metric.PushMetricsExporterAdapterOpenCensus monitoring exporter.
 
 This class will export all Ignite metrics with the OpenCensus API.
 
 Please, note, metrics recorded with the OpenCensus API eachPushMetricsExporterAdapter.periodmilliseconds.
 To enable export from OpenCensus to the wild user should configure OpenCensus exporter. Please, see OpenCensus documentation for additional information. Example of exporter configuration:PrometheusStatsCollector.createAndRegister(); HTTPServer server = new HTTPServer("localhost", 8888, true);- See Also:
- MetricRegistry,- GridMetricManager,- ReadOnlyMetricManager
 
- 
- 
Field SummaryFields Modifier and Type Field Description static io.opencensus.tags.TagKeyCONSISTENT_ID_TAGIgnite node consistent id.static io.opencensus.tags.TagKeyINSTANCE_NAME_TAGIgnite instance name.static io.opencensus.tags.TagMetadataMETADATATags metadata.static io.opencensus.tags.TagKeyNODE_ID_TAGIgnite node id.- 
Fields inherited from class org.apache.ignite.internal.processors.metric.PushMetricsExporterAdapterDFLT_EXPORT_PERIOD, filter, mreg
 - 
Fields inherited from class org.apache.ignite.spi.IgniteSpiAdapterignite, igniteInstanceName, log
 
- 
 - 
Constructor SummaryConstructors Constructor Description OpenCensusMetricExporterSpi()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexport()Callback to do the export of metrics info.protected voidonContextInitialized0(IgniteSpiContext spiCtx)Method to be called in the end of onContextInitialized method.voidsetSendConsistentId(boolean sendConsistentId)IftruethenCONSISTENT_ID_TAGwill be added to each exported measure.voidsetSendInstanceName(boolean sendInstanceName)IftruethenINSTANCE_NAME_TAGwill be added to each exported measure.voidsetSendNodeId(boolean sendNodeId)IftruethenNODE_ID_TAGwill be added to each exported measure.voidspiStart(@Nullable String igniteInstanceName)This method is called to start SPI.- 
Methods inherited from class org.apache.ignite.internal.processors.metric.PushMetricsExporterAdaptergetPeriod, setExportFilter, setMetricRegistry, setPeriod, spiStop
 - 
Methods inherited from class org.apache.ignite.spi.IgniteSpiAdapteraddTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getLocalNode, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, registerMBean, removeTimeoutObject, setName, started, startInfo, startStopwatch, stopInfo, unregisterMBean
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.ignite.spi.IgniteSpigetName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized
 
- 
 
- 
- 
- 
Field Detail- 
INSTANCE_NAME_TAGpublic static final io.opencensus.tags.TagKey INSTANCE_NAME_TAG Ignite instance name.
 - 
NODE_ID_TAGpublic static final io.opencensus.tags.TagKey NODE_ID_TAG Ignite node id.
 - 
CONSISTENT_ID_TAGpublic static final io.opencensus.tags.TagKey CONSISTENT_ID_TAG Ignite node consistent id.
 - 
METADATApublic static final io.opencensus.tags.TagMetadata METADATA Tags metadata.
 
- 
 - 
Method Detail- 
exportpublic void export() Callback to do the export of metrics info. Method will be called into some Ignite managed thread eachPushMetricsExporterAdapter.getPeriod()millisecond.- Specified by:
- exportin class- org.apache.ignite.internal.processors.metric.PushMetricsExporterAdapter
 
 - 
spiStartpublic void spiStart(@Nullable @Nullable String igniteInstanceName) throws IgniteSpiExceptionThis method is called to start SPI. After this method returns successfully kernel assumes that SPI is fully operational.- Specified by:
- spiStartin interface- IgniteSpi
- Overrides:
- spiStartin class- org.apache.ignite.internal.processors.metric.PushMetricsExporterAdapter
- Parameters:
- igniteInstanceName- Name of Ignite instance this SPI is being started for (- nullfor default Ignite instance).
- Throws:
- IgniteSpiException- Throws in case of any error during SPI start.
 
 - 
onContextInitialized0protected void onContextInitialized0(IgniteSpiContext spiCtx) throws IgniteSpiException Method to be called in the end of onContextInitialized method.- Overrides:
- onContextInitialized0in class- org.apache.ignite.internal.processors.metric.PushMetricsExporterAdapter
- Parameters:
- spiCtx- SPI context.
- Throws:
- IgniteSpiException- In case of errors.
 
 - 
setSendInstanceNamepublic void setSendInstanceName(boolean sendInstanceName) IftruethenINSTANCE_NAME_TAGwill be added to each exported measure.- Parameters:
- sendInstanceName- Flag value.
 
 - 
setSendNodeIdpublic void setSendNodeId(boolean sendNodeId) IftruethenNODE_ID_TAGwill be added to each exported measure.- Parameters:
- sendNodeId- Flag value.
 
 - 
setSendConsistentIdpublic void setSendConsistentId(boolean sendConsistentId) IftruethenCONSISTENT_ID_TAGwill be added to each exported measure.- Parameters:
- sendConsistentId- Flag value.
 
 
- 
 
-