Documentation ¶
Index ¶
- Constants
- func GetCommonLabels(withUserInfo bool, logger *component.TelemetryLogger) []attribute.KeyValue
- func GetHostname() string
- func NewExporter(config interface{}, telemetry *component.TelemetryTools) exporter.Exporter
- func StartServer(exporter *prometheus.Exporter, telemetry *component.TelemetryTools, ...) error
- func WithDescription(metricName string) metric.InstrumentOption
- type AdapterConfig
- type AsyncMetricGroup
- type Config
- type MemCleanUpConfig
- type MetricAggregationKind
- type OtelExporter
- type OtelOutputExporters
- type OtlpGrpcConfig
- type PrometheusConfig
- type StdoutConfig
Constants ¶
View Source
const ( Otel = "otelexporter" StdoutKindExporter = "stdout" OtlpGrpcKindExporter = "otlp" PrometheusKindExporter = "prometheus" Int64BoundaryMultiplier = 1e6 MeterName = "kindling-instrument" TracerName = "kindling-tracer" )
View Source
const (
CmonitorServiceNamePrefix = "cmonitor"
)
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
func StartServer ¶
func StartServer(exporter *prometheus.Exporter, telemetry *component.TelemetryTools, port string) error
func WithDescription ¶
func WithDescription(metricName string) metric.InstrumentOption
Types ¶
type AdapterConfig ¶
type AsyncMetricGroup ¶
type AsyncMetricGroup struct { }
type Config ¶
type Config struct { ExportKind string `mapstructure:"export_kind"` PromCfg *PrometheusConfig `mapstructure:"prometheus"` OtlpGrpcCfg *OtlpGrpcConfig `mapstructure:"otlp"` StdoutCfg *StdoutConfig `mapstructure:"stdout"` CustomLabels map[string]string `mapstructure:"custom_labels"` MetricAggregationMap map[string]MetricAggregationKind `mapstructure:"metric_aggregation_map"` AdapterConfig *AdapterConfig `mapstructure:"adapter_config"` }
type MemCleanUpConfig ¶
type MetricAggregationKind ¶
type MetricAggregationKind string
const ( MAGaugeKind MetricAggregationKind = "gauge" MACounterKind MetricAggregationKind = "counter" MAHistogramKind MetricAggregationKind = "histogram" )
type OtelExporter ¶
type OtelExporter struct {
// contains filtered or unexported fields
}
func (*OtelExporter) Export ¶
func (e *OtelExporter) Export(results []*adapter.AdaptedResult)
func (*OtelExporter) NewMeter ¶
func (e *OtelExporter) NewMeter(telemetry *component.TelemetryTools) error
type OtelOutputExporters ¶
type OtelOutputExporters struct {
// contains filtered or unexported fields
}
type OtlpGrpcConfig ¶
type PrometheusConfig ¶
type PrometheusConfig struct { Port string `mapstructure:"port,omitempty"` WithMemory bool `mapstructure:"with_memory,omitempty"` MemCleanUpConfig *MemCleanUpConfig `mapstructure:"memcleanup"` }
type StdoutConfig ¶
Click to show internal directories.
Click to hide internal directories.