Documentation ¶
Index ¶
- type Metrics
- func (m *Metrics) GaugeName() string
- func (m *Metrics) Gauges(_ context.Context) map[string][]system.TaggedValue
- func (m *Metrics) RoundTrip(req *http.Request) (*http.Response, error)
- func (m *Metrics) WithTracer(ctx context.Context, route string) context.Context
- func (m *Metrics) Wrap(name string, r http.RoundTripper) http.RoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new Metrics for capturing metrics from http trace. the context is needed to extract the metrics provider.
func (*Metrics) RoundTrip ¶
RoundTrip makes Metrics a http.RoundTripper. It adds reference counting to round trips to be able to count inflight requests.
func (*Metrics) WithTracer ¶
WithTracer adds the tracer onto the context for this request. nolint:funlen
func (*Metrics) Wrap ¶
func (m *Metrics) Wrap(name string, r http.RoundTripper) http.RoundTripper
Wrap wraps r with the Metrics reference counted round tripper.
Click to show internal directories.
Click to hide internal directories.