Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
Label represents a label for metrics.
type Metric ¶
type Metric struct {
Name string
Type MetricType
ValueInt64 int64
Comment string
Labels []Label
}
Metric represents a single metric.
type MetricType ¶
type MetricType int
const ( TypeCounterInt MetricType = iota + 1 TypeGaugeInt )
func (MetricType) String ¶
func (mt MetricType) String() string
type OpenTelemetryWriter ¶
type OpenTelemetryWriter struct {
// contains filtered or unexported fields
}
OpenTelemetryWriter implements the Writer interface and formats metrics in OpenTelemetryWriter exposition format.
func NewOpenTelemetryWriter ¶
func NewOpenTelemetryWriter(w io.Writer) *OpenTelemetryWriter
NewOpenTelemetryWriter creates a new OpenTelemetryWriter.
func (*OpenTelemetryWriter) Write ¶
func (otw *OpenTelemetryWriter) Write(m Metric) error
Click to show internal directories.
Click to hide internal directories.