telemetry

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

README

This package was copied from Lightstep's OpenTelemetry Go Launcher. It was modified as follows:

  • Use of go-kit/log logging API for consistency with this code base
  • Remove the use of environment variables, as this code base prefers configuration files
  • Remove Lightstep-specific functionality
  • Standard log package and gRPC logging integration.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetVerboseLevel

func SetVerboseLevel(level int)

func VerboseLevel

func VerboseLevel() int

Types

type Config

type Config struct {
	ExporterEndpoint         string
	ExporterEndpointInsecure bool
	Propagators              []string
	MetricReportingPeriod    time.Duration
	ResourceAttributes       map[string]string
	Headers                  map[string]string
	ExportTimeout            time.Duration
	// contains filtered or unexported fields
}

type Option

type Option func(*Config)

func WithExportTimeout

func WithExportTimeout(t time.Duration) Option

WithExportTimeout configures the timeout used for Export().

func WithExporterEndpoint added in v0.2.0

func WithExporterEndpoint(url string) Option

WithExporterEndpoint configures the endpoint for sending metrics via OTLP

func WithExporterInsecure added in v0.2.0

func WithExporterInsecure(insecure bool) Option

WithExporterInsecure permits connecting to the trace endpoint without a certificate

func WithHeaders

func WithHeaders(headers map[string]string) Option

func WithLogger

func WithLogger(logger log.Logger) Option

func WithMetricReportingPeriod

func WithMetricReportingPeriod(p time.Duration) Option

WithMetricReportingPeriod configures the metric reporting period, how often the controller collects and exports metric data.

func WithPropagators

func WithPropagators(propagators ...string) Option

WithPropagators configures propagators

func WithResourceAttributes

func WithResourceAttributes(attributes map[string]string) Option

WithResourceAttributes configures attributes on the resource

type Telemetry

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

func ConfigureOpentelemetry

func ConfigureOpentelemetry(opts ...Option) *Telemetry

func (*Telemetry) Shutdown

func (tel *Telemetry) Shutdown(ctx context.Context)

Jump to

Keyboard shortcuts

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