Documentation
¶
Overview ¶
Package internal offers helper interfaces that are internal to the Wavefront Go SDK. Interfaces within this package are not guaranteed to be backwards compatible between releases.
Index ¶
- Constants
- func DeltaCounterName(name string) string
- func GetBuffer() *bytes.Buffer
- func GetHostname(defaultVal string) string
- func GetSemVer(version string) (float64, error)
- func HasDeltaPrefix(name string) bool
- func NewClient(timeout time.Duration, tlsConfig *tls.Config) *http.Client
- func PutBuffer(buf *bytes.Buffer)
- func Sanitize(str string) string
- func SanitizeValue(str string) string
- type ConnectionHandler
- type DeltaCounter
- type Flusher
- type FunctionalGauge
- type FunctionalGaugeFloat64
- type LineHandler
- type LineHandlerOption
- type MetricCounter
- type MetricRegistry
- func (registry *MetricRegistry) NewCounter(name string) *MetricCounter
- func (registry *MetricRegistry) NewDeltaCounter(name string) *DeltaCounter
- func (registry *MetricRegistry) NewGauge(name string, f func() int64) *FunctionalGauge
- func (registry *MetricRegistry) NewGaugeFloat64(name string, f func() float64) *FunctionalGaugeFloat64
- func (registry *MetricRegistry) Start()
- func (registry *MetricRegistry) Stop()
- type RegistryOption
- type Reporter
Constants ¶
View Source
const ( DeltaPrefix = "\u2206" AltDeltaPrefix = "\u0394" )
View Source
const ( MetricFormat = "wavefront" HistogramFormat = "histogram" TraceFormat = "trace" SpanLogsFormat = "spanLogs" EventFormat = "event" )
Variables ¶
This section is empty.
Functions ¶
func DeltaCounterName ¶
Gets a delta counter name prefixed with ∆.
func GetHostname ¶
func HasDeltaPrefix ¶
func Sanitize ¶ added in v0.12.0
Sanitize sanitizes string of metric name, source and key of tags according to the rule of Wavefront proxy.
func SanitizeValue ¶ added in v0.12.0
SanitizeValue sanitizes string of tags value, etc.
Types ¶
type ConnectionHandler ¶
type DeltaCounter ¶ added in v0.9.8
type DeltaCounter struct {
MetricCounter
}
type FunctionalGauge ¶ added in v0.9.3
type FunctionalGauge struct {
// contains filtered or unexported fields
}
functional gauge for internal metrics
type FunctionalGaugeFloat64 ¶ added in v0.9.8
type FunctionalGaugeFloat64 struct {
// contains filtered or unexported fields
}
functional gauge for internal metrics
type LineHandler ¶
type LineHandler struct {
Reporter Reporter
BatchSize int
MaxBufferSize int
Format string
// contains filtered or unexported fields
}
func NewLineHandler ¶ added in v0.9.3
func NewLineHandler(reporter Reporter, format string, flushInterval time.Duration, batchSize, maxBufferSize int, setters ...LineHandlerOption) *LineHandler
func (*LineHandler) Flush ¶
func (lh *LineHandler) Flush() error
func (*LineHandler) FlushAll ¶ added in v0.9.3
func (lh *LineHandler) FlushAll() error
func (*LineHandler) GetFailureCount ¶
func (lh *LineHandler) GetFailureCount() int64
func (*LineHandler) GetThrottledCount ¶ added in v0.9.5
func (lh *LineHandler) GetThrottledCount() int64
GetThrottledCount returns the number of Throttled errors received.
func (*LineHandler) HandleLine ¶
func (lh *LineHandler) HandleLine(line string) error
func (*LineHandler) Start ¶
func (lh *LineHandler) Start()
func (*LineHandler) Stop ¶
func (lh *LineHandler) Stop()
type LineHandlerOption ¶ added in v0.9.3
type LineHandlerOption func(*LineHandler)
func SetHandlerPrefix ¶ added in v0.9.3
func SetHandlerPrefix(prefix string) LineHandlerOption
func SetLockOnThrottledError ¶ added in v0.9.5
func SetLockOnThrottledError(lock bool) LineHandlerOption
func SetRegistry ¶ added in v0.9.3
func SetRegistry(registry *MetricRegistry) LineHandlerOption
type MetricCounter ¶ added in v0.9.3
type MetricCounter struct {
// contains filtered or unexported fields
}
counter for internal metrics
func (*MetricCounter) Inc ¶ added in v0.9.8
func (c *MetricCounter) Inc()
type MetricRegistry ¶ added in v0.9.3
type MetricRegistry struct {
// contains filtered or unexported fields
}
metric registry for internal metrics
func NewMetricRegistry ¶ added in v0.9.3
func NewMetricRegistry(sender internalSender, setters ...RegistryOption) *MetricRegistry
func (*MetricRegistry) NewCounter ¶ added in v0.9.3
func (registry *MetricRegistry) NewCounter(name string) *MetricCounter
func (*MetricRegistry) NewDeltaCounter ¶ added in v0.9.8
func (registry *MetricRegistry) NewDeltaCounter(name string) *DeltaCounter
func (*MetricRegistry) NewGauge ¶ added in v0.9.3
func (registry *MetricRegistry) NewGauge(name string, f func() int64) *FunctionalGauge
func (*MetricRegistry) NewGaugeFloat64 ¶ added in v0.9.8
func (registry *MetricRegistry) NewGaugeFloat64(name string, f func() float64) *FunctionalGaugeFloat64
func (*MetricRegistry) Start ¶ added in v0.9.3
func (registry *MetricRegistry) Start()
func (*MetricRegistry) Stop ¶ added in v0.9.3
func (registry *MetricRegistry) Stop()
type RegistryOption ¶ added in v0.9.3
type RegistryOption func(*MetricRegistry)
func SetInterval ¶ added in v0.9.3
func SetInterval(interval time.Duration) RegistryOption
func SetPrefix ¶ added in v0.9.3
func SetPrefix(prefix string) RegistryOption
func SetSource ¶ added in v0.9.3
func SetSource(source string) RegistryOption
func SetTag ¶ added in v0.9.3
func SetTag(key, value string) RegistryOption
func SetTags ¶ added in v0.9.3
func SetTags(tags map[string]string) RegistryOption
Source Files
¶
Click to show internal directories.
Click to hide internal directories.