kinesis

package module
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 26 Imported by: 1

README

opencensus-go-exporter-kinesis

Tests

Some of the tests depend on a mock Kinesis server.

  • Run make mock-server to start the mock Kinesis server.
  • Run make test to run the test suite.

Documentation

Overview

Package jaeger contains an OpenCensus tracing exporter for AWS Kinesis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter takes spans in jaeger proto format and forwards them to a kinesis stream

func NewExporter

func NewExporter(o *Options, logger *zap.Logger) (*Exporter, error)

NewExporter returns a trace.Exporter implementation that exports the collected spans to Jaeger.

func (*Exporter) ExportSpan

func (e *Exporter) ExportSpan(span *gen.Span) error

ExportSpan exports a Jaeger protbuf span to Kinesis

func (*Exporter) Flush

func (e *Exporter) Flush()

Flush flushes queues and stops exporters

type HookProducer

type HookProducer func(name, streamName, shardID string) KinesisHooker

HookProducer should be a factory for generating KinesisHooker's so you can do your metricization in your own way

type KinesisHooker

type KinesisHooker interface {
	OnDrain(bytes, length int64)
	OnPutRecords(batches, spanlists, bytes, putLatencyMS int64, reason string)
	OnPutErr(errCode string)
	OnDropped(batches, spanlists, bytes int64)
	OnSpanEnqueued()
	OnSpanDequeued()
	OnXLSpanDropped(size int)
	OnPutSpanListFlushed(spans, bytes int64)
	OnCompressed(original, compressed int64)
}

KinesisHooker interface abstracts away the hook so one can pass in a producer and inject your own implementation

type Options

type Options struct {
	Name                    string
	StreamName              string
	AWSRegion               string
	AWSRole                 string
	AWSKinesisEndpoint      string
	QueueSize               int
	NumWorkers              int
	MaxListSize             int
	ListFlushInterval       int
	KPLAggregateBatchCount  int
	KPLAggregateBatchSize   int
	KPLBatchSize            int
	KPLBatchCount           int
	KPLBacklogCount         int
	KPLFlushIntervalSeconds int
	KPLMaxConnections       int
	KPLMaxRetries           int
	KPLMaxBackoffSeconds    int
	MaxAllowedSizePerSpan   int
	// to be called if data is put on an unexpected shard
	OnReshard func()
	// if you want to inject your own hooks into the exporter, else th default hooks will be created
	HookProducer HookProducer

	// Encoding defines the format in which spans should be exporter to kinesis
	// only Jaeger is supported right now
	Encoding string
}

Options are the options to be used when initializing a Jaeger exporter.

type Shard

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

Shard holds the information for a kinesis shard

type ShardInfo

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

ShardInfo provides a way to find the index for which shard to put a span in

Directories

Path Synopsis
models
gen

Jump to

Keyboard shortcuts

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