Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPRequestDuration ¶
func HTTPRequestDuration() metadata
HTTPRequestDuration returns HTTP request duration metric metadata.
func HTTPRequestSize ¶
func HTTPRequestSize() metadata
HTTPRequestSize returns HTTP request size metric metadata.
func HTTPRequestsInflight ¶
func HTTPRequestsInflight() metadata
HTTPRequestsInflight returns HTTP requests inflight metric metadata.
func HTTPRequestsTotal ¶
func HTTPRequestsTotal() metadata
HTTPRequestsTotal returns HTTP requests total metric metadata.
func HTTPResponseSize ¶
func HTTPResponseSize() metadata
HTTPResponseSize returns HTTP response size metric metadata.
Types ¶
type HTTPInflightProperty ¶
HTTPInflightProperty stores properties for the HTTP metrics of an inflight request.
type HTTPRecorder ¶
type HTTPRecorder interface {
// RecordRequestDuration measures the duration of an HTTP request.
RecordRequestDuration(ctx context.Context, prop HTTPRequestProperty, duration time.Duration)
// RecordRequestSize measures the size of an HTTP request in bytes.
RecordRequestSize(ctx context.Context, prop HTTPRequestProperty, sizeBytes int64)
// RecordResponseSize measures the size of an HTTP response in bytes.
RecordResponseSize(ctx context.Context, prop HTTPRequestProperty, sizeBytes int64)
// AddTotalRequests increments the total of completed requests.
AddTotalRequests(ctx context.Context, prop HTTPRequestProperty, quantity int64)
// AddInflightRequests increments and decrements the number of inflight requests.
AddInflightRequests(ctx context.Context, prop HTTPInflightProperty, quantity int64)
}
HTTPRecorder records and measures the HTTP metrics. This interface has the required methods to be implemented by the HTTP metrics backend.
type HTTPRecorderConfig ¶
type HTTPRecorderConfig struct {
DurationBuckets []float64
SizeBuckets []float64
HostLabel string
EndpointLabel string
MethodLabel string
StatusLabel string
}
HTTPRecorderConfig stores configurations for the HTTP metrics recorder.
func (*HTTPRecorderConfig) Defaults ¶
func (c *HTTPRecorderConfig) Defaults()
Defaults sets default values for HTTP metrics recorder configurations.
Directories
¶
| Path | Synopsis |
|---|---|
|
backend
|
|
|
opentelemetry
IMPORTANT: This package is still a work in progress.
|
IMPORTANT: This package is still a work in progress. |