fullerite: github.com/Yelp/fullerite/src/fullerite/dropwizard Index | Files

package dropwizard

import "github.com/Yelp/fullerite/src/fullerite/dropwizard"

Index

Package Files

base_parser.go java_metric.go legacy_metric.go uwsgi_metric.go

Constants

const (
    // MetricTypeCounter String for counter metric type
    MetricTypeCounter string = "COUNTER"
    // MetricTypeGauge String for Gauge metric type
    MetricTypeGauge string = "GAUGE"
)

func ExtractServiceDims Uses

func ExtractServiceDims(raw []byte) map[string]string

ExtractServiceDims is a lightweight version of extractParsedMetric to make common service dimensions available in the collector

func Parse Uses

func Parse(raw []byte, schemaVer string, ccEnabled bool) ([]metric.Metric, error)

Parse can be called from collector code to parse results

type BaseParser Uses

type BaseParser struct {
    // contains filtered or unexported fields
}

BaseParser is a base struct for real parsers

func (*BaseParser) Parse Uses

func (parser *BaseParser) Parse() ([]metric.Metric, error)

Parse is just a placehoder function

type Format Uses

type Format struct {
    ServiceDims map[string]interface{} `json:"service_dims"`
    Counters    map[string]map[string]interface{}
    Gauges      map[string]map[string]interface{}
    Histograms  map[string]map[string]interface{}
    Meters      map[string]map[string]interface{}
    Timers      map[string]map[string]interface{}
}

Format defines format in which dropwizard metrics are emitted

the assumed format is: {

"gauges": {},
"histograms": {},
"version": "xxx",
"timers": {
	"pyramid_uwsgi_metrics.tweens.status.metrics": {
		"count": ###,
		"p98": ###,
		...
	},
	"pyramid_uwsgi_metrics.tweens.lookup": {
		"count": ###,
		...
	}
},
"meters": {
	"pyramid_uwsgi_metrics.tweens.XXX": {
		"count": ###,
		"mean_rate": ###,
		"m1_rate": ###
	}
},
"counters": {
	"myname": {
		"count": ###,
}

}

type JavaMetric Uses

type JavaMetric struct {
    BaseParser
}

JavaMetric is a parser for parsing java-1.1 metrics

func NewJavaMetric Uses

func NewJavaMetric(data []byte, schemaVer string, ccEnabled bool) *JavaMetric

NewJavaMetric new parser for java metrics

func (*JavaMetric) Parse Uses

func (parser *JavaMetric) Parse() ([]metric.Metric, error)

Parse returns dimensionalized parsed metrics

type LegacyMetric Uses

type LegacyMetric struct {
    BaseParser
}

LegacyMetric is for parsing metrics without version information

func NewLegacyMetric Uses

func NewLegacyMetric(data []byte, schemaVer string, ccEnabled bool) *LegacyMetric

NewLegacyMetric new parser for legacy metrics

func (*LegacyMetric) Parse Uses

func (parser *LegacyMetric) Parse() ([]metric.Metric, error)

Parse parses metric using legacy format. It is usable when schema version is missing from metrics

type Parser Uses

type Parser interface {
    Parse() ([]metric.Metric, error)
    // contains filtered or unexported methods
}

Parser is an interface for dropwizard parsers

type UWSGIMetric Uses

type UWSGIMetric struct {
    BaseParser
    Format int `json:"format"`
}

UWSGIMetric parser for UWSGI metrics

func NewUWSGIMetric Uses

func NewUWSGIMetric(data []byte, schemaVer string, ccEnabled bool) *UWSGIMetric

NewUWSGIMetric creates new parser for uwsgi metrics

func (*UWSGIMetric) Parse Uses

func (parser *UWSGIMetric) Parse() ([]metric.Metric, error)

Parse method parses metrics and returns

Package dropwizard imports 5 packages (graph). Updated 2019-06-26. Refresh now. Tools for package owners.

The go get command cannot install this package because of the following issues: