Versions in this module Expand all Collapse all v0 v0.2.0 Nov 11, 2025 Changes in this version + func GetRequestLogger(r *http.Request) *slog.Logger + func NewContextWithLogger(parentContext context.Context, logger *slog.Logger) context.Context + func NewTracingMiddleware(exporters *OTelExporterResults, options ...TracingMiddlewareOption) func(http.Handler) http.Handler + type NewWrapResponseWriterFunc func(w http.ResponseWriter, protoMajor int) WrapResponseWriter + type OTELLogsExporterType string + const OTELLogsExporterNone + const OTELLogsExporterOTLP + type TracingMiddlewareOption func(*tracingMiddlewareOptions) + func AllowRequestHeaders(names []string) TracingMiddlewareOption + func AllowResponseHeaders(names []string) TracingMiddlewareOption + func DebugPaths(paths []string) TracingMiddlewareOption + func DisableHighCardinalityMetrics(disabled bool) TracingMiddlewareOption + func DisableHighCardinalitySpans(disabled bool) TracingMiddlewareOption + func ResponseWriterWrapperFunc(wrapper NewWrapResponseWriterFunc) TracingMiddlewareOption + type WrapResponseWriter interface + BytesWritten func() int + Discard func() + Status func() int + Tee func(w io.Writer) + Unwrap func() http.ResponseWriter v0.1.0 Oct 25, 2025 Changes in this version + var UserVisibilityAttribute = attribute.String("internal.visibility", "user") + func GetLogger(ctx context.Context) *slog.Logger + func IsSensitiveHeader(name string) bool + func MaskString(input string) string + func NewContextLogger(parentContext context.Context, logger *slog.Logger) context.Context + func NewJSONLogger(logLevel string) (*slog.Logger, slog.Level, error) + func NewTelemetryHeaders(httpHeaders http.Header, allowedHeaders ...string) http.Header + func SetSpanHeaderAttributes(span traceapi.Span, prefix string, httpHeaders http.Header, ...) + type LogHandler struct + func (l LogHandler) Enabled(ctx context.Context, level slog.Level) bool + func (l LogHandler) Handle(ctx context.Context, record slog.Record) error + func (l LogHandler) WithAttrs(attrs []slog.Attr) slog.Handler + func (l LogHandler) WithGroup(name string) slog.Handler + type OTELMetricsExporterType string + const OTELMetricsExporterNone + const OTELMetricsExporterOTLP + const OTELMetricsExporterPrometheus + type OTLPCompressionType string + const OTLPCompressionGzip + const OTLPCompressionNone + type OTLPConfig struct + DisableGoMetrics *bool + LogsExporter string + MetricsExporter string + OtlpCompression string + OtlpEndpoint string + OtlpInsecure *bool + OtlpLogsCompression string + OtlpLogsEndpoint string + OtlpLogsInsecure *bool + OtlpLogsProtocol string + OtlpMetricsCompression string + OtlpMetricsEndpoint string + OtlpMetricsInsecure *bool + OtlpMetricsProtocol string + OtlpProtocol string + OtlpTraceCompression string + OtlpTracesEndpoint string + OtlpTracesInsecure *bool + OtlpTracesProtocol string + PrometheusPort *uint + ServiceName string + type OTLPProtocol string + const OTLPProtocolGRPC + const OTLPProtocolHTTPProtobuf + type OTelExporterResults struct + Logger *slog.Logger + Meter metricapi.Meter + Shutdown func(context.Context) error + Tracer *Tracer + func SetupOTelExporters(ctx context.Context, config *OTLPConfig, serviceVersion string, ...) (*OTelExporterResults, error) + type Tracer struct + func NewTracer(name string, opts ...traceapi.TracerOption) *Tracer + func (t *Tracer) Start(ctx context.Context, spanName string, opts ...traceapi.SpanStartOption) (context.Context, traceapi.Span) + func (t *Tracer) StartInternal(ctx context.Context, spanName string, opts ...traceapi.SpanStartOption) (context.Context, traceapi.Span)