Documentation ¶
Index ¶
- Constants
- Variables
- func InitExporter(ctx context.Context, opts *Options, memStore *cache.MemoryStore, ...) error
- func NewSpanFromContext(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
- type ErrorHandleFunc
- type MetricsServer
- type Options
- type WrappedRegistry
Constants ¶
View Source
const ( ExporterInvalid uint8 = iota ExporterPrometheus ExporterJaeger ExporterOTLP ExporterStdout )
Variables ¶
View Source
var KeyEndpoint = attribute.Key(keyPrefix + "endpoint")
View Source
var KeyOrigin = attribute.Key(keyPrefix + "origin")
Functions ¶
func InitExporter ¶
func InitExporter(ctx context.Context, opts *Options, memStore *cache.MemoryStore, logEntry *logrus.Entry) error
InitExporter initialises configured metrics and/or trace exporter.
Types ¶
type ErrorHandleFunc ¶
type ErrorHandleFunc func(error)
func (ErrorHandleFunc) Handle ¶
func (f ErrorHandleFunc) Handle(err error)
type MetricsServer ¶
type MetricsServer struct {
// contains filtered or unexported fields
}
func NewMetricsServer ¶
func NewMetricsServer(log *logrus.Entry, registry *WrappedRegistry, port int) *MetricsServer
func (*MetricsServer) Close ¶
func (m *MetricsServer) Close() error
func (*MetricsServer) ListenAndServe ¶
func (m *MetricsServer) ListenAndServe()
type WrappedRegistry ¶ added in v1.12.0
type WrappedRegistry struct {
// contains filtered or unexported fields
}
func NewWrappedRegistry ¶ added in v1.12.0
func NewWrappedRegistry(promRegistry *prom.Registry, labels ...*dto.LabelPair) *WrappedRegistry
func (*WrappedRegistry) Gather ¶ added in v1.12.0
func (wr *WrappedRegistry) Gather() ([]*dto.MetricFamily, error)
func (*WrappedRegistry) MustRegister ¶ added in v1.12.0
func (wr *WrappedRegistry) MustRegister(collector ...prom.Collector)
func (*WrappedRegistry) Register ¶ added in v1.12.0
func (wr *WrappedRegistry) Register(collector prom.Collector) error
func (*WrappedRegistry) Unregister ¶ added in v1.12.0
func (wr *WrappedRegistry) Unregister(collector prom.Collector) bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.