Back to godoc.org
github.com/PSauerborn/jaeger-negroni

Package jaeger_negroni

v0.0.0-...-06d9f23
Latest Go to latest

The highest tagged major version is .

Published: Sep 25, 2020 | License: Apache-2.0 | Module: github.com/PSauerborn/jaeger-negroni

Index

func JaegerNegroni

func JaegerNegroni(cfg JaegerNegroniConfig) gin.HandlerFunc

Jaeger Negroni tracing middleware used to trace requests

func NewTracer

func NewTracer(cfg JaegerNegroniConfig) io.Closer

function used to create new tracer instance for application

type HTTPErrorStatusMetric

type HTTPErrorStatusMetric struct{}

define metric used to add request method to jaeger metrics

func (HTTPErrorStatusMetric) EvaluateMetric

func (metric HTTPErrorStatusMetric) EvaluateMetric(ctx *gin.Context) interface{}

func (HTTPErrorStatusMetric) MetricName

func (metric HTTPErrorStatusMetric) MetricName() string

type HTTPRequestMethodMetric

type HTTPRequestMethodMetric struct{}

define metric used to add request method to jaeger metrics

func (HTTPRequestMethodMetric) EvaluateMetric

func (metric HTTPRequestMethodMetric) EvaluateMetric(ctx *gin.Context) interface{}

func (HTTPRequestMethodMetric) MetricName

func (metric HTTPRequestMethodMetric) MetricName() string

type HTTPResponseStatusMetric

type HTTPResponseStatusMetric struct{}

define metric used to add request method to jaeger metrics

func (HTTPResponseStatusMetric) EvaluateMetric

func (metric HTTPResponseStatusMetric) EvaluateMetric(ctx *gin.Context) interface{}

func (HTTPResponseStatusMetric) MetricName

func (metric HTTPResponseStatusMetric) MetricName() string

type HTTPUrlMetric

type HTTPUrlMetric struct{}

define metric used to add request route to jaeger metrics

func (HTTPUrlMetric) EvaluateMetric

func (metric HTTPUrlMetric) EvaluateMetric(ctx *gin.Context) interface{}

func (HTTPUrlMetric) MetricName

func (metric HTTPUrlMetric) MetricName() string

type JaegerConfig

type JaegerConfig struct {
	JaegerHost  string `json:"jaeger_host"`
	JaegerPort  int    `json:"jaeger_port"`
	ServiceName string `json:"service_name"`
}

type JaegerMetric

type JaegerMetric interface {
	MetricName() string
	EvaluateMetric(ctx *gin.Context) interface{}
}

interface used to add various jaeger metrics to the tracer config

type JaegerNegroniConfig

type JaegerNegroniConfig struct {
	JaegerConf         JaegerConfig   `json:"jaeger_conf"`
	PreRequestMetrics  []JaegerMetric `json:"pre_request_metrics"`
	PostRequestMetrics []JaegerMetric `json:"post_request_metrics"`
}

func Config

func Config(host, serviceName string, port int) JaegerNegroniConfig

function used to create new base configuration with base metrics

func (JaegerNegroniConfig) AddPostRequestMetric

func (cfg JaegerNegroniConfig) AddPostRequestMetric(metric JaegerMetric)

function used to add new pre-request metrics to jaeger configuration

func (JaegerNegroniConfig) AddPreRequestMetric

func (cfg JaegerNegroniConfig) AddPreRequestMetric(metric JaegerMetric)

function used to add new pre-request metrics to jaeger configuration

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier