launcher

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 16

Documentation

Index

Constants

View Source
const (
	DefaultSpanExporterEndpoint   = "ingest.lightstep.com:443"
	DefaultMetricExporterEndpoint = "ingest.lightstep.com:443"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.11.0

type Config struct {
	SpanExporterEndpoint                string            `env:"OTEL_EXPORTER_OTLP_SPAN_ENDPOINT,default=ingest.lightstep.com:443"`
	SpanExporterEndpointInsecure        bool              `env:"OTEL_EXPORTER_OTLP_SPAN_INSECURE,default=false"`
	ServiceName                         string            `env:"LS_SERVICE_NAME"`
	ServiceVersion                      string            `env:"LS_SERVICE_VERSION,default=unknown"`
	Headers                             map[string]string `env:"OTEL_EXPORTER_OTLP_HEADERS"`
	MetricExporterEndpoint              string            `env:"OTEL_EXPORTER_OTLP_METRIC_ENDPOINT,default=ingest.lightstep.com:443"`
	MetricExporterEndpointInsecure      bool              `env:"OTEL_EXPORTER_OTLP_METRIC_INSECURE,default=false"`
	MetricExporterTemporalityPreference string            `env:"OTEL_EXPORTER_OTLP_METRIC_TEMPORALITY_PREFERENCE,default=cumulative"`
	MetricsEnabled                      bool              `env:"LS_METRICS_ENABLED,default=true"`
	MetricsBuiltinsEnabled              bool              `env:"LS_METRICS_BUILTINS_ENABLED,default=true"`
	MetricsBuiltinLibraries             []string          `env:"LS_METRICS_BUILTIN_LIBRARIES,default=all:stable"`
	LogLevel                            string            `env:"OTEL_LOG_LEVEL,default=info"`
	Propagators                         []string          `env:"OTEL_PROPAGATORS,default=b3"`
	MetricReportingPeriod               string            `env:"OTEL_EXPORTER_OTLP_METRIC_PERIOD,default=30s"`
	ResourceAttributes                  map[string]string
	Resource                            *resource.Resource
	// contains filtered or unexported fields
}

type DefaultLogger

type DefaultLogger struct {
}

func (*DefaultLogger) Debugf

func (l *DefaultLogger) Debugf(format string, v ...interface{})

func (*DefaultLogger) Fatalf

func (l *DefaultLogger) Fatalf(format string, v ...interface{})

type Launcher

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

func ConfigureOpentelemetry

func ConfigureOpentelemetry(opts ...Option) Launcher

func (Launcher) Shutdown

func (ls Launcher) Shutdown()

type Logger

type Logger interface {
	Fatalf(format string, v ...interface{})
	Debugf(format string, v ...interface{})
}

type Option

type Option func(*Config)

func WithAccessToken

func WithAccessToken(accessToken string) Option

WithAccessToken configures the lightstep access token remain compatible with the Lightstep-only launcher for now...

func WithErrorHandler

func WithErrorHandler(handler otel.ErrorHandler) Option

Configures a global error handler to be used throughout an OpenTelemetry instrumented project. See "go.opentelemetry.io/otel"

func WithHeaders added in v1.5.0

func WithHeaders(headers map[string]string) Option

WithHeaders configures OTLP/gRPC connection headers

func WithLightstepMetricsSDK added in v1.7.0

func WithLightstepMetricsSDK(alt bool) Option

WithLightstepMetricsSDK is a no-op. The Lightstep Metrics SDK is always used.

func WithLogLevel

func WithLogLevel(loglevel string) Option

WithLogLevel configures the logging level for OpenTelemetry

func WithLogger

func WithLogger(logger Logger) Option

func WithMetricExporterEndpoint

func WithMetricExporterEndpoint(url string) Option

WithMetricExporterEndpoint configures the endpoint for sending metrics via OTLP

func WithMetricExporterInsecure

func WithMetricExporterInsecure(insecure bool) Option

WithMetricExporterInsecure permits connecting to the metric endpoint without a certificate

func WithMetricExporterTemporalityPreference added in v1.7.0

func WithMetricExporterTemporalityPreference(prefName string) Option

WithMetricTemporalityPreference controls the temporality preference used for Counter and Histogram (only not for UpDownCounter, which ignores this preference for specified reasons).

func WithMetricReportingPeriod added in v0.11.0

func WithMetricReportingPeriod(p time.Duration) Option

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

func WithMetricsBuiltinLibraries added in v1.11.0

func WithMetricsBuiltinLibraries(builtinLibraries []string) Option

WithMetricsBuiltinLibraries configures the set of builtin metrics libraries that are started automatically. When this is

func WithMetricsBuiltinsEnabled added in v1.11.0

func WithMetricsBuiltinsEnabled(builtinsEnabled bool) Option

WithMetricBuiltinsEnabled configures whether builtin metrics should be enabled. Metrics will be disabled when MetricsEnabled is false.

func WithMetricsEnabled added in v0.14.0

func WithMetricsEnabled(enabled bool) Option

WithMetricEnabled configures whether metrics should be enabled.

func WithPropagators

func WithPropagators(propagators []string) Option

WithPropagators configures propagators

func WithResourceAttributes added in v0.10.2

func WithResourceAttributes(attributes map[string]string) Option

WithResourceAttributes configures attributes on the resource

func WithServiceName

func WithServiceName(name string) Option

WithServiceName configures a "service.name" resource label

func WithServiceVersion

func WithServiceVersion(version string) Option

WithServiceVersion configures a "service.version" resource label

func WithSpanExporterEndpoint

func WithSpanExporterEndpoint(url string) Option

WithSpanExporterEndpoint configures the endpoint for sending traces via OTLP

func WithSpanExporterInsecure

func WithSpanExporterInsecure(insecure bool) Option

WithSpanExporterInsecure permits connecting to the trace endpoint without a certificate

Jump to

Keyboard shortcuts

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