wrapper

package
v3.10.43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ClientRequestDurationSeconds specifies meter metric name
	ClientRequestDurationSeconds = "client_request_duration_seconds"
	// ClientRequestLatencyMicroseconds specifies meter metric name
	ClientRequestLatencyMicroseconds = "client_request_latency_microseconds"
	// ClientRequestTotal specifies meter metric name
	ClientRequestTotal = "client_request_total"
	// ClientRequestInflight specifies meter metric name
	ClientRequestInflight = "client_request_inflight"
	// ServerRequestDurationSeconds specifies meter metric name
	ServerRequestDurationSeconds = "server_request_duration_seconds"
	// ServerRequestLatencyMicroseconds specifies meter metric name
	ServerRequestLatencyMicroseconds = "server_request_latency_microseconds"
	// ServerRequestTotal specifies meter metric name
	ServerRequestTotal = "server_request_total"
	// ServerRequestInflight specifies meter metric name
	ServerRequestInflight = "server_request_inflight"
	// PublishMessageDurationSeconds specifies meter metric name
	PublishMessageDurationSeconds = "publish_message_duration_seconds"
	// PublishMessageLatencyMicroseconds specifies meter metric name
	PublishMessageLatencyMicroseconds = "publish_message_latency_microseconds"
	// PublishMessageTotal specifies meter metric name
	PublishMessageTotal = "publish_message_total"
	// PublishMessageInflight specifies meter metric name
	PublishMessageInflight = "publish_message_inflight"
	// SubscribeMessageDurationSeconds specifies meter metric name
	SubscribeMessageDurationSeconds = "subscribe_message_duration_seconds"
	// SubscribeMessageLatencyMicroseconds specifies meter metric name
	SubscribeMessageLatencyMicroseconds = "subscribe_message_latency_microseconds"
	// SubscribeMessageTotal specifies meter metric name
	SubscribeMessageTotal = "subscribe_message_total"
	// SubscribeMessageInflight specifies meter metric name
	SubscribeMessageInflight = "subscribe_message_inflight"

	// DefaultSkipEndpoints contains list of endpoints that not evaluted by wrapper
	DefaultSkipEndpoints = []string{"Meter.Metrics", "Health.Live", "Health.Ready", "Health.Version"}
)

Functions

func NewCallWrapper

func NewCallWrapper(opts ...Option) client.CallWrapper

NewCallWrapper create new call wrapper

func NewClientWrapper

func NewClientWrapper(opts ...Option) client.Wrapper

NewClientWrapper create new client wrapper

func NewHandlerWrapper

func NewHandlerWrapper(opts ...Option) server.HandlerWrapper

NewHandlerWrapper create new server handler wrapper deprecated

func NewServerHandlerWrapper added in v3.9.15

func NewServerHandlerWrapper(opts ...Option) server.HandlerWrapper

NewServerHandlerWrapper create new server handler wrapper

func NewServerSubscriberWrapper added in v3.9.15

func NewServerSubscriberWrapper(opts ...Option) server.SubscriberWrapper

func NewSubscriberWrapper

func NewSubscriberWrapper(opts ...Option) server.SubscriberWrapper

NewSubscriberWrapper create server subscribe wrapper deprecated

Types

type Option

type Option func(*Options)

Option func signature

func Meter

func Meter(m meter.Meter) Option

Meter passes meter

func ServiceID

func ServiceID(id string) Option

ServiceID passes service id to meter label

func ServiceName

func ServiceName(name string) Option

ServiceName passes service name to meter label

func ServiceVersion

func ServiceVersion(version string) Option

ServiceVersion passes service version to meter label

func SkipEndoints

func SkipEndoints(eps ...string) Option

SkipEndoints add endpoint to skip

type Options

type Options struct {
	Meter meter.Meter

	SkipEndpoints []string
	// contains filtered or unexported fields
}

Options struct

func NewOptions

func NewOptions(opts ...Option) Options

NewOptions creates new Options struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL