Documentation
¶
Index ¶
- func Instrument(ctx context.Context, serviceName, serviceVersion string, runtimeMetrics bool) (func(context.Context) error, error)
- func MetricsMiddleware(metrics *StdHTTPMetrics, next http.Handler) http.Handler
- func TracingMiddleware(scopeName, version string, next http.Handler) http.Handler
- type StdHTTPMetrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Instrument ¶
func Instrument( ctx context.Context, serviceName, serviceVersion string, runtimeMetrics bool, ) (func(context.Context) error, error)
Instrument bootstraps the OpenTelemetry pipeline. If it does not return an error, make sure to call shutdown for proper cleanup.
func MetricsMiddleware ¶ added in v1.4.0
func MetricsMiddleware(metrics *StdHTTPMetrics, next http.Handler) http.Handler
Types ¶
type StdHTTPMetrics ¶ added in v1.4.0
type StdHTTPMetrics struct {
// contains filtered or unexported fields
}
func StandardHTTPMetrics ¶ added in v1.4.0
func StandardHTTPMetrics(prefix, version string) (*StdHTTPMetrics, error)
func (*StdHTTPMetrics) Bump ¶ added in v1.4.0
func (s *StdHTTPMetrics) Bump( ctx context.Context, responseWrapper http.ResponseWriter, bodyWrapper *response.BodyWrapper, req *http.Request, duration time.Duration, attributes ...attribute.KeyValue, )
Click to show internal directories.
Click to hide internal directories.