Documentation ¶
Index ¶
- Constants
- func GetCommonLabels(withUserInfo bool, logger *component.TelemetryLogger) []attribute.KeyValue
- func GetHostname() string
- func NewExporter(config interface{}, telemetry *component.TelemetryTools) exporter.Exporter
- type AdapterConfig
- type Config
- type MetricAggregationKind
- type PrometheusConfig
Constants ¶
View Source
const (
CmonitorServiceNamePrefix = "cmonitor"
)
View Source
const Type = "prometheus"
Variables ¶
This section is empty.
Functions ¶
func GetCommonLabels ¶
func GetCommonLabels(withUserInfo bool, logger *component.TelemetryLogger) []attribute.KeyValue
func GetHostname ¶
func GetHostname() string
GetHostname Return hostname if no error thrown, and set hostname 'unknown' otherwise.
func NewExporter ¶
func NewExporter(config interface{}, telemetry *component.TelemetryTools) exporter.Exporter
Types ¶
type AdapterConfig ¶
type Config ¶
type Config struct { PromCfg *PrometheusConfig `mapstructure:"prometheus"` CustomLabels map[string]string `mapstructure:"custom_labels"` // MetricAggregationMap map[string]MetricAggregationKind `mapstructure:"metric_aggregation_map"` AdapterConfig *AdapterConfig `mapstructure:"adapter_config"` }
type MetricAggregationKind ¶
type MetricAggregationKind string
const ( MAGaugeKind MetricAggregationKind = "gauge" MACounterKind MetricAggregationKind = "counter" MAHistogramKind MetricAggregationKind = "histogram" )
type PrometheusConfig ¶
type PrometheusConfig struct {
Endpoint string `mapstructure:"endpoint,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.