Documentation ¶
Index ¶
- Constants
- type Config
- type DefaultLogger
- type Launcher
- type Logger
- type Option
- func WithAccessToken(accessToken string) Option
- func WithAuthAccessTokenHeader(header 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 WithMetricsEnabled(enabled bool) Option
- func WithMetricsExporterEndpoint(url string) Option
- func WithMetricsExporterInsecure(insecure bool) Option
- func WithMetricsReportingPeriod(p time.Duration) Option
- func WithPropagators(propagators []string) Option
- func WithResourceAttributes(attributes map[string]string) Option
- func WithServiceName(name string) Option
- func WithServiceVersion(version string) Option
- func WithTracesExporterEndpoint(url string) Option
- func WithTracesExporterInsecure(insecure bool) Option
Constants ¶
const ( // DefaultTracesExporterEndpoint - DefaultTracesExporterEndpoint = "otlp.nr-data.net:443" // DefaultMetricsExporterEndpoint - DefaultMetricsExporterEndpoint = "otlp.nr-data.net:443" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { TracesExporterEndpoint string `env:"OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,default=otlp.nr-data.net:443"` TracesExporterEndpointInsecure bool `env:"OTEL_EXPORTER_OTLP_TRACES_INSECURE,default=false"` ServiceName string `env:"OTEL_SERVICE_NAME"` ServiceVersion string `env:"OTEL_SERVICE_VERSION,default=unknown"` Headers map[string]string `env:"OTEL_EXPORTER_OTLP_HEADERS"` MetricsExporterEndpoint string `env:"OTEL_EXPORTER_OTLP_METRICS_ENDPOINT,default=otlp.nr-data.net:443"` MetricsExporterEndpointInsecure bool `env:"OTEL_EXPORTER_OTLP_METRICS_INSECURE,default=false"` MetricsEnabled bool `env:"OTEL_METRICS_ENABLED,default=true"` LogLevel string `env:"OTEL_LOG_LEVEL,default=info"` Propagators []string `env:"OTEL_PROPAGATORS,default=b3"` MetricReportingPeriod string `env:"OTEL_EXPORTER_OTLP_METRICS_PERIOD,default=30s"` AuthEnabled bool `env:"AUTH_ENABLED,default=true"` AuthAccessTokenHeader string `env:"AUTH_ACCESS_TOKEN_HEADER,default=api-key"` ResourceAttributes map[string]string Resource *resource.Resource // contains filtered or unexported fields }
Config -
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 ¶
ConfigureOpentelemetry - configures otel values
type Option ¶
type Option func(*Config)
Option -
func WithAccessToken ¶
WithAccessToken configures the access token
func WithAuthAccessTokenHeader ¶
WithAuthAccessTokenHeader -
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 WithMetricsEnabled ¶
WithMetricEnabled configures whether metrics should be enabled
func WithMetricsExporterEndpoint ¶
WithMetricsExporterEndpoint configures the endpoint for sending metrics via OTLP
func WithMetricsExporterInsecure ¶
WithMetricsExporterInsecure permits connecting to the metric endpoint without a certificate
func WithMetricsReportingPeriod ¶
WithMetricReportingPeriod configures the metric reporting period, how often the controller collects and exports metric data.
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 WithTracesExporterEndpoint ¶
WithTracesExporterEndpoint configures the endpoint for sending traces via OTLP
func WithTracesExporterInsecure ¶
WithTracesExporterInsecure permits connecting to the trace endpoint without a certificate