Class MetricBuffer.Builder

  • Enclosing class:
    MetricBuffer

    public static class MetricBuffer.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • attributes

        public MetricBuffer.Builder attributes​(Attributes attributes)
        Provides the base collection of common attributes that will be applied to all buffered metrics.
        Parameters:
        attributes - - common attributes to be applied to all metrics within this buffer
        Returns:
        this builder
      • serviceName

        public MetricBuffer.Builder serviceName​(java.lang.String serviceName)
        Optional. Specify the name of the service that is creating the metrics. The service name will be included in all common attributes as "service.name".
        Parameters:
        serviceName - - The name of the service
      • instrumentationProvider

        public MetricBuffer.Builder instrumentationProvider​(java.lang.String instrumentationProvider)
        Optional. Specify the name of the instrumentation that provides the metrics, typically a library like "micrometer" or "dropwizard-metrics" or "kamon", for example. This is generally not expected to be called by a user's manual instrumentation code. The instrumentation provider will be included in all common attributes as "instrumentation.provider".
        Parameters:
        instrumentationProvider - - The name of the instrumentation library
      • build

        public MetricBuffer build()
        Builds the new MetricBuffer instance
        Returns:
        a newly created instance of MetricBuffer configured with data from this builder