Documentation
¶
Index ¶
- Variables
- func MiddlewareChain(routeName string, next http.Handler) http.Handler
- func PrometheusInstrumentation(name string, next http.Handler) http.HandlerFunc
- func SetupOTelSDK(ctx context.Context, config config.Config) (func(context.Context) error, error)
- func VersionHeaderResponseMiddleware(next http.Handler) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var TP *sdktrace.TracerProvider
View Source
var Version string = "development" // default value, overridden at build time
Functions ¶
func MiddlewareChain ¶
MiddlewareChain Is the standard middleware chain to apply to all routes. Change this to add a middleware for all routes
func PrometheusInstrumentation ¶
func PrometheusInstrumentation(name string, next http.Handler) http.HandlerFunc
PrometheusInstrumentation This middle ware is sensitive to order in the middleware chain. For a close to real timing measurement. It must be as high in the chain as possible, be the first one declared.
func SetupOTelSDK ¶
SetupOTelSDK initializes OpenTelemetry with the OTLP exporter for tracing.
func VersionHeaderResponseMiddleware ¶
func VersionHeaderResponseMiddleware(next http.Handler) http.HandlerFunc
VersionHeaderResponseMiddleware sets an "x-version" header to the response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.