Documentation ¶
Index ¶
- Constants
- type Config
- type DefaultLogger
- type Launcher
- type Logger
- type Option
- func WithAccessToken(accessToken string) Option
- func WithErrorHandler(handler otel.ErrorHandler) Option
- func WithHeaders(headers map[string]string) Option
- func WithLogLevel(loglevel string) Option
- func WithLogger(logger Logger) Option
- func WithMetricExporterEndpoint(url string) Option
- func WithMetricExporterInsecure(insecure bool) Option
- func WithMetricReportingPeriod(p time.Duration) Option
- func WithMetricsEnabled(enabled bool) Option
- func WithPropagators(propagators []string) Option
- func WithResourceAttributes(attributes map[string]string) Option
- func WithServiceName(name string) Option
- func WithServiceVersion(version string) Option
- func WithSpanExporterEndpoint(url string) Option
- func WithSpanExporterInsecure(insecure bool) Option
Constants ¶
const ( DefaultSpanExporterEndpoint = "ingest.lightstep.com:443" DefaultMetricExporterEndpoint = "ingest.lightstep.com:443" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SpanExporterEndpoint string `env:"OTEL_EXPORTER_OTLP_SPAN_ENDPOINT,default=localhost"` 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=localhost"` MetricExporterEndpointInsecure bool `env:"OTEL_EXPORTER_OTLP_METRIC_INSECURE,default=false"` MetricsEnabled bool `env:"LS_METRICS_ENABLED,default=true"` AccessToken string `env:"LS_ACCESS_TOKEN"` 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"` 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 ¶
type Option ¶
type Option func(*Config)
func WithAccessToken ¶
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 ¶
WithHeaders configures OTLP/gRPC connection headers
func WithLogLevel ¶
WithLogLevel configures the logging level for OpenTelemetry
func WithLogger ¶
func WithMetricExporterEndpoint ¶
WithMetricExporterEndpoint configures the endpoint for sending metrics via OTLP
func WithMetricExporterInsecure ¶
WithMetricExporterInsecure permits connecting to the metric endpoint without a certificate
func WithMetricReportingPeriod ¶
WithMetricReportingPeriod configures the metric reporting period, how often the controller collects and exports metric data.
func WithMetricsEnabled ¶
WithMetricEnabled configures whether metrics should be enabled
func WithPropagators ¶
WithPropagators configures propagators
func WithResourceAttributes ¶
WithResourceAttributes configures attributes on the resource
func WithServiceName ¶
WithServiceName configures a "service.name" resource label
func WithServiceVersion ¶
WithServiceVersion configures a "service.version" resource label
func WithSpanExporterEndpoint ¶
WithSpanExporterEndpoint configures the endpoint for sending traces via OTLP
func WithSpanExporterInsecure ¶
WithSpanExporterInsecure permits connecting to the trace endpoint without a certificate