stats

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

README

messageprocessor - An implementation of messageprocessor that adds stats

GoDoc Build Status codecov.io

Contributing

License

This project is licensed under Apache 2.0. See LICENSE.txt for details.

Contributing Agreement

Atlassian requires signing a contributor's agreement before we can accept a patch. If you are an individual you can fill out the individual CLA. If you are contributing on behalf of your company then please fill out the corporate CLA.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStatBinder

NewStatBinder returns a function that wraps a `transport.Decorator` in a `StatTransport` `transport.Decorator`.

func NewStatMessageProcessor

NewStatMessageProcessor returns a function that wraps a `messageprocessor.MessageProcessor` in a `StatMessageProcessor` `messageprocessor.MessageProcessor`.

Types

type StatBinder

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

StatBinder is a `MessageProcessor` decorator that injects an `xstats.XStater` into the `context.Context` of the given `context`.

The `StatBinder` can then, in turn, be decorated with `Transport` to make use of the injected `xstats.XStater` to emit key HTTP metrics on each ProcessMessage.

func (*StatBinder) ProcessMessage

ProcessMessage injects an `xstats.XStater` into the context and invokes the wrapped `MessageProcessor`.

type StatMessageProcessor

type StatMessageProcessor struct {
	ConsumedCounter        string
	ConsumerSuccessCounter string
	ConsumerErrorCounter   string
	ConsumedSize           string
	ConsumerLag            string
	ConsumerTimingSuccess  string
	ConsumerTimingFailure  string
	// contains filtered or unexported fields
}

StatMessageProcessor is wrapper around MessageProcessor to capture and emit Kinesis related stats

func (StatMessageProcessor) ProcessMessage

ProcessMessage injects an `xstats.XStater` into the request and invokes the wrapped `MessageProcessor.ProcessMessage`.

type StatMessageProcessorComponent

type StatMessageProcessorComponent struct{}

StatMessageProcessorComponent implements the settings.Component interface.

func NewComponent

func NewComponent() *StatMessageProcessorComponent

NewComponent populates default values.

func (*StatMessageProcessorComponent) Settings

Settings generates a config populated with defaults.

type StatMessageProcessorConfig

type StatMessageProcessorConfig struct {
	ConsumedCounter        string `description:"Name of overall kinesis record consumption metric."`
	ConsumerSuccessCounter string `description:"Name of overall successful kinesis record consumption metric."`
	ConsumerErrorCounter   string `description:"Name of overall failed kinesis record consumption metric."`
	ConsumedSize           string `description:"Name of consumed kinesis record size metric."`
	ConsumerLag            string `description:"Name of lag time between kinesis production and consumption metric."`
	ConsumerTimingSuccess  string `description:"Name of time to process successful kinesis record metric."`
	ConsumerTimingFailure  string `description:"Name of time to process failed kinesis record metric."`
}

StatMessageProcessorConfig is the config for creating a StatMessageProcessor

func (*StatMessageProcessorConfig) Name

Name of the config root.

Jump to

Keyboard shortcuts

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