Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AfterShardingStart ¶ added in v0.5.0
func AfterShardingStart() error
Types ¶
type Config ¶
type Config struct { Cluster string `mapstructure:"cluster"` // The cluster name. Service string `mapstructure:"service"` // The service name. Instance string `mapstructure:"instance"` // The instance name. // Telemetry export type, support "prometheus", "metrics_service" or "none" ExportType string `mapstructure:"export_type"` // Export telemetry data through Prometheus server, only works on "export_type=prometheus". Prometheus PrometheusConfig `mapstructure:"prometheus"` // Export telemetry data through native meter format to OAP backend, only works on "export_type=metrics_service". MetricsService MetricsServiceConfig `mapstructure:"metrics_service"` }
Config defines the common telemetry labels.
type Counter ¶
type Counter interface { Metric Inc(labelValues ...string) Add(val float64, labelValues ...string) }
func NewCounter ¶
type DynamicGauge ¶ added in v0.4.0
func NewDynamicGauge ¶ added in v0.4.0
func NewDynamicGauge(name, help string, labels ...string) DynamicGauge
type MetricsServiceConfig ¶ added in v0.5.0
type MetricsServiceConfig struct { ClientName string `mapstructure:"client_name"` // The grpc-client plugin name, using the SkyWalking native batch meter protocol Interval int `mapstructure:"interval"` // The interval second for sending metrics MetricPrefix string `mapstructure:"metric_prefix"` // The prefix of telemetry metric name }
type PrometheusConfig ¶ added in v0.5.0
type Server ¶ added in v0.5.0
type Server interface { Start(config *Config) error AfterSharingStart() error Close() error NewCounter(name, help string, labels ...string) Counter NewGauge(name, help string, getter func() float64, labels ...string) Gauge NewDynamicGauge(name, help string, labels ...string) DynamicGauge NewTimer(name, help string, labels ...string) Timer }
type TimeRecorder ¶ added in v0.4.0
type TimeRecorder interface {
Stop()
}
Click to show internal directories.
Click to hide internal directories.