github.com/lyft/flytestdlib@v0.3.12-0.20210213045714-8cdd111ecda1/promutils/labeled/metric_option.go (about)

     1  package labeled
     2  
     3  // Defines extra set of options to customize the emitted metric.
     4  type MetricOption interface {
     5  	isMetricOption()
     6  }
     7  
     8  // Instructs the metric to emit unlabeled metric (besides the labeled one). This is useful to get overall system
     9  // performance.
    10  type EmitUnlabeledMetricOption struct {
    11  }
    12  
    13  func (EmitUnlabeledMetricOption) isMetricOption() {}
    14  
    15  var EmitUnlabeledMetric = EmitUnlabeledMetricOption{}
    16  
    17  // AdditionalLabelsOption instructs the labeled metric to expect additional labels scoped for this just this metric
    18  // in the context passed.
    19  type AdditionalLabelsOption struct {
    20  	// A collection of labels to look for in the passed context.
    21  	Labels []string
    22  }
    23  
    24  func (AdditionalLabelsOption) isMetricOption() {}