Interface SolrMetricProducer

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
GpuMetricsProvider, SolrCache<K,V>, SolrInfoBean, SolrRequestHandler
All Known Implementing Classes:
ActiveTasksListComponent, ActiveTasksListHandler, AnalysisRequestHandlerBase, AuditLoggerPlugin, AuthenticationPlugin, BasicAuthPlugin, CaffeineCache, CertAuthPlugin, CollectionsHandler, ConfigSetsHandler, ContentStreamHandlerBase, CoreAdminHandler, DebugComponent, DirectUpdateHandler2, DocumentAnalysisRequestHandler, DumpRequestHandler, ExactSharedStatsCache, ExactStatsCache, ExpandComponent, ExportHandler, FacetComponent, FacetModule, FieldAnalysisRequestHandler, GraphHandler, HealthCheckHandler, HighlightComponent, HttpShardHandlerFactory, InfoHandler, InstrumentedHttpListenerFactory, LocalStatsCache, LoggingHandler, LRUStatsCache, LukeRequestHandler, Metrics, MetricsHandler, MoreLikeThisComponent, MoreLikeThisHandler, MultiAuthPlugin, MultiDestinationAuditLogger, NotFoundRequestHandler, OverseerCollectionConfigSetProcessor, OverseerTaskProcessor, ParallelHttpShardHandlerFactory, PeerSync, PeerSyncWithLeader, PhrasesIdentificationComponent, PingRequestHandler, PKIAuthenticationPlugin, PropertiesRequestHandler, PublicKeyHandler, QueryCancellationComponent, QueryCancellationHandler, QueryComponent, QueryElevationComponent, RealTimeGetComponent, RealTimeGetHandler, ReplicationHandler, RequestHandlerBase, ResponseLogComponent, SchemaHandler, SearchComponent, SearchHandler, SecurityConfHandler, SecurityConfHandlerLocal, SecurityConfHandlerZk, SegmentsInfoRequestHandler, ShowFileRequestHandler, SolrConfigHandler, SolrCore, SolrFieldCacheBean, SolrIndexSearcher, SolrLogAuditLoggerPlugin, SpellCheckComponent, StandardRequestHandler, StatsCache, StatsComponent, StreamHandler, SuggestComponent, SyntheticSolrCore, SystemInfoHandler, TaggerRequestHandler, TaskManagementHandler, TermsComponent, TermVectorComponent, ThreadDumpHandler, UpdateHandler, UpdateLog, UpdateRequestHandler, UpdateShardHandler, V2UpdateRequestHandler, ZookeeperInfoHandler, ZookeeperStatusHandler

public interface SolrMetricProducer extends AutoCloseable
Used by objects that expose metrics through SolrMetricManager.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final io.opentelemetry.api.common.AttributeKey<String>
     
    static final io.opentelemetry.api.common.AttributeKey<String>
     
    static final io.opentelemetry.api.common.AttributeKey<String>
     
    static final io.opentelemetry.api.common.AttributeKey<String>
     
    static final io.opentelemetry.api.common.AttributeKey<String>
     
    static final io.opentelemetry.api.common.AttributeKey<String>
     
    static final io.opentelemetry.api.common.AttributeKey<String>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Implementations should always call SolrMetricProducer.super.close() to ensure that metrics with the same life-cycle as this component are properly unregistered.
    Implementations should return the context used in initializeMetrics(SolrMetricsContext, Attributes) to ensure proper cleanup of metrics at the end of the life-cycle of this component.
    static String
    Unique metric tag identifies components with the same life-cycle, which should be registered / unregistered together.
    void
    initializeMetrics(SolrMetricsContext parentContext, io.opentelemetry.api.common.Attributes attributes)
    Implementation should initialize all metrics to a SolrMetricsContext Registry/MeterProvider with Attributes as the common set of attributes that will be attached to every metric that is initialized for that class/component
  • Field Details

    • TYPE_ATTR

      static final io.opentelemetry.api.common.AttributeKey<String> TYPE_ATTR
    • CATEGORY_ATTR

      static final io.opentelemetry.api.common.AttributeKey<String> CATEGORY_ATTR
    • HANDLER_ATTR

      static final io.opentelemetry.api.common.AttributeKey<String> HANDLER_ATTR
    • OPERATION_ATTR

      static final io.opentelemetry.api.common.AttributeKey<String> OPERATION_ATTR
    • RESULT_ATTR

      static final io.opentelemetry.api.common.AttributeKey<String> RESULT_ATTR
    • NAME_ATTR

      static final io.opentelemetry.api.common.AttributeKey<String> NAME_ATTR
    • PLUGIN_NAME_ATTR

      static final io.opentelemetry.api.common.AttributeKey<String> PLUGIN_NAME_ATTR
  • Method Details

    • getUniqueMetricTag

      static String getUniqueMetricTag(Object o, String parentName)
      Unique metric tag identifies components with the same life-cycle, which should be registered / unregistered together. It is in the format of A:B:C, where A is the parent of B is the parent of C and so on. If object "B" is unregistered C also must get unregistered. If object "A" is unregistered B and C also must get unregistered.
      Parameters:
      o - object to create a tag for
      parentName - parent object name, or null if no parent exists
    • initializeMetrics

      void initializeMetrics(SolrMetricsContext parentContext, io.opentelemetry.api.common.Attributes attributes)
      Implementation should initialize all metrics to a SolrMetricsContext Registry/MeterProvider with Attributes as the common set of attributes that will be attached to every metric that is initialized for that class/component
      Parameters:
      parentContext - The registry that the component will initialize metrics to
      attributes - Base set of attributes that will be bound to all metrics for that component
    • getSolrMetricsContext

      SolrMetricsContext getSolrMetricsContext()
      Implementations should return the context used in initializeMetrics(SolrMetricsContext, Attributes) to ensure proper cleanup of metrics at the end of the life-cycle of this component. This should be the child context if one was created, or null if the parent context was used.
    • close

      default void close() throws IOException
      Implementations should always call SolrMetricProducer.super.close() to ensure that metrics with the same life-cycle as this component are properly unregistered. This prevents obscure memory leaks.

      from: https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html While this interface method is declared to throw Exception, implementers are strongly encouraged to declare concrete implementations of the close method to throw more specific exceptions, or to throw no exception at all if the close operation cannot fail.

      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException