Versions in this module Expand all Collapse all v1 v1.0.0 Oct 21, 2022 Changes in this version + const TraceEnvPrefix + var HarborHTTPTraceOptions = []otelhttp.Option + func Enabled() bool + func GetGlobalTracer(instrumentationName string, opts ...oteltrace.TracerOption) oteltrace.Tracer + func HarborSpanNameFormatter(operation string, r *http.Request) string + func InitGlobalConfig(opts ...Option) + func NewHandler(h http.Handler, operation string) http.Handler + func RecordError(span oteltrace.Span, err error, description string) + func SpanFromHTTPRequest(req *http.Request) oteltrace.Span + func StartSpan(ctx context.Context, name string) (context.Context, oteltrace.Span) + func StartTrace(ctx context.Context, tracerName string, spanName string, ...) (context.Context, oteltrace.Span) + type Config struct + Attributes map[string]string + Enabled bool + Jaeger JaegerConfig + Namespace string + Otel OtelConfig + SampleRate float64 + ServiceName string + var C Config + func GetGlobalConfig() Config + func NewConfig(opts ...Option) Config + func (c *Config) String() string + type JaegerConfig struct + AgentHost string + AgentPort string + Endpoint string + Password string + Username string + func (c *JaegerConfig) String() string + type Option func(*Config) + func WithAttributes(attributes map[string]string) Option + func WithEnabled(enabled bool) Option + func WithJaegerAgentHost(host string) Option + func WithJaegerAgentPort(port string) Option + func WithJaegerEndpoint(endpoint string) Option + func WithJaegerPassword(password string) Option + func WithJaegerUsername(username string) Option + func WithNamespace(namespace string) Option + func WithOtelCompression(compression bool) Option + func WithOtelEndpoint(endpoint string) Option + func WithOtelInsecure(insecure bool) Option + func WithOtelTimeout(timeout int) Option + func WithOtelURLPath(urlPath string) Option + func WithSampleRate(sampleRate float64) Option + func WithServiceName(serviceName string) Option + type OtelConfig struct + Compression bool + Endpoint string + Insecure bool + Timeout int + URLPath string + func (c *OtelConfig) String() string + type ShutdownFunc func() + func InitGlobalTracer(ctx context.Context) ShutdownFunc + func (s ShutdownFunc) Shutdown()