tracehttp

package
v0.6.88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 10 Imported by: 3

Documentation

Overview

Package tracehttp traces outbound HTTP requests without recording what a URL may hide: every request is a client span of the caller's trace whose attributes are the method, the server's host and port and the response status, never the path or the query (a device token, a webhook secret, a signed link), and the W3C trace context goes out in its headers. OpenTelemetry's otelhttp records the full URL and cannot be told not to.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

type Transport struct {
	// contains filtered or unexported fields
}

Transport traces the requests of base.

func NewTransport

func NewTransport(base http.RoundTripper) *Transport

NewTransport is a Transport over base (http.DefaultTransport when nil).

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip sends req as a client span of its context's trace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL