 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
	// Enabled is the flag to enable the metrics service.
	Enabled bool `yaml:"enabled"`
	// ServiceName is the name of the service.
	ServiceName string `yaml:"serviceName,omitempty"`
	// Prometheus is the options for the prometheus metrics provider.
	Prometheus *PrometheusOptions `yaml:"prometheus,omitempty"`
}
    Options represents the options of the providers for publishing metrics.
type PrometheusExporter ¶
type PrometheusExporter struct {
	// MeterProvider is used in the creation and coordination of Meters
	MeterProvider *sdkmetric.MeterProvider
	// Handler is the HTTP handler with basic metrics
	Handler http.Handler
}
    PrometheusExporter is the struct that holds the metrics reklated data
func NewPrometheusExporter ¶
func NewPrometheusExporter(options *Options) (*PrometheusExporter, error)
NewPrometheusExporter creates a PrometheusExporter instance with a MeterProvider and a Handler, and returns it along with any errors.
type PrometheusOptions ¶
type PrometheusOptions struct {
	// Path is the path where the prometheus metrics are exposed.
	Path string `yaml:"path"`
	// Address is the address where the prometheus metrics are exposed.
	Port int `yaml:"port"`
}
    PrometheusOptions represents prometheus metrics provider options.
type Service ¶
type Service struct {
	Options *Options
}
    Service implements the metrics service.
 Click to show internal directories. 
   Click to hide internal directories.