Versions in this module Expand all Collapse all v0 v0.1.0 Sep 1, 2025 Changes in this version + const ScopeName + func MetricAttributes(r *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue + func Middleware(opts ...Option) func(next http.Handler) http.Handler + func NewServerTotalRequests(meter metric.Meter) (metric.Int64Counter, error) + func RequestTraceAttrs(req *http.Request) []attribute.KeyValue + func ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue + func Version() string + type BodyWrapper struct + func NewBodyWrapper(body io.ReadCloser) *BodyWrapper + func (w *BodyWrapper) BytesRead() int64 + func (w *BodyWrapper) Close() error + func (w *BodyWrapper) Read(b []byte) (int, error) + type Filter func(*http.Request) bool + type HTTPMeter struct + func NewHTTPMeter(meter metric.Meter) HTTPMeter + func (m *HTTPMeter) Record(ctx context.Context, data MetricData) + type MetricData struct + AdditionalAttributes []attribute.KeyValue + ElapsedTime float64 + Request *http.Request + RequestSize int64 + ResponseSize int64 + StatusCode int + type Option func(*config) + func WithMeterProvider(provider metric.MeterProvider) Option + func WithMetricAttributesFn(fn func(*http.Request) []attribute.KeyValue) Option + func WithPropagators(propagators propagation.TextMapPropagator) Option + func WithPublicEndpoint() Option + func WithPublicEndpointFn(fn func(*http.Request) bool) Option + func WithSpanNameFormatter(formatter func(routeName string, r *http.Request) string) Option + func WithTracerProvider(provider trace.TracerProvider) Option + type ResponseTelemetry struct + ReadBytes int64 + StatusCode int + WriteBytes int64