opencensus

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.1.0

type Option interface {
	// contains filtered or unexported methods
}

Option interface defines for configuration settings to be applied to receivers.

withReceiver applies the configuration to the given receiver.

func WithCorsOrigins added in v0.1.0

func WithCorsOrigins(origins []string) Option

WithCorsOrigins is an option to specify the allowed origins to enable writing HTTP/JSON requests to the grpc-gateway adapter using CORS.

func WithMetricsReceiverOptions added in v0.1.0

func WithMetricsReceiverOptions(opts ...ocmetrics.Option) Option

WithMetricsReceiverOptions is an option to specify the options that will be passed to the New call for ocmetrics.Receiver

func WithTraceReceiverOptions added in v0.1.0

func WithTraceReceiverOptions(opts ...octrace.Option) Option

WithTraceReceiverOptions is an option to specify the options that will be passed to the New call for octrace.Receiver

type Receiver added in v0.0.4

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

Receiver is the type that exposes Trace and Metrics reception.

func New

func New(addr string, opts ...Option) (*Receiver, error)

New just creates the OpenCensus receiver services. It is the caller's responsibility to invoke the respective Start*Reception methods as well as the various Stop*Reception methods or simply Stop to end it.

func (*Receiver) Start added in v0.0.4

Start runs all the receivers/services namely, Trace and Metrics services.

func (*Receiver) StartMetricsReception added in v0.0.4

func (ocr *Receiver) StartMetricsReception(ctx context.Context, ms receiver.MetricsReceiverSink) error

StartMetricsReception exclusively runs the Metrics receiver on the gRPC server. To start both Trace and Metrics receivers/services, please use Start.

func (*Receiver) StartTraceReception added in v0.0.4

func (ocr *Receiver) StartTraceReception(ctx context.Context, ts receiver.TraceReceiverSink) error

StartTraceReception exclusively runs the Trace receiver on the gRPC server. To start both Trace and Metrics receivers/services, please use Start.

func (*Receiver) Stop added in v0.0.4

func (ocr *Receiver) Stop() error

Stop stops the underlying gRPC server and all the services running on it.

func (*Receiver) StopMetricsReception added in v0.0.4

func (ocr *Receiver) StopMetricsReception(ctx context.Context) error

StopMetricsReception is a method to turn off receiving metrics. It currently is a noop because we don't yet know if gRPC allows stopping a specific service.

func (*Receiver) StopTraceReception added in v0.0.4

func (ocr *Receiver) StopTraceReception(ctx context.Context) error

StopTraceReception is a method to turn off receiving traces. It currently is a noop because we don't yet know if gRPC allows stopping a specific service.

Directories

Path Synopsis
Package ocmetrics is the logic for receiving OpenCensus metrics proto from already instrumented applications and then passing them onto a metricsink instance.
Package ocmetrics is the logic for receiving OpenCensus metrics proto from already instrumented applications and then passing them onto a metricsink instance.
Package octrace is the logic for receiving OpenCensus trace protobuf defined spans from already instrumented applications and then passing them onto a TraceReceiverSink instance.
Package octrace is the logic for receiving OpenCensus trace protobuf defined spans from already instrumented applications and then passing them onto a TraceReceiverSink instance.

Jump to

Keyboard shortcuts

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