Documentation ¶
Index ¶
- func NewHandler(handler http.Handler, operation string, opts ...otelhttp.Option) http.Handler
- func NewTracerProvider() (*trace.TracerProvider, error)
- func NewTracerProviderWithLogin(url, apiKey string) (*trace.TracerProvider, error)
- func OpenDB(dataSourceName string) (*sql.DB, error)
- func WrapGorillaMuxRouter(router *mux.Router) (*mux.Router, error)
- func WrapHandler(handler http.Handler, pattern string) http.Handler
- func WrapHandlerFunc(handlerFunc http.HandlerFunc, pattern string) http.HandlerFunc
- type ServeMux
- func (sm *ServeMux) Handle(pattern string, handler http.Handler)
- func (sm *ServeMux) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
- func (sm *ServeMux) Handler(r *http.Request) (h http.Handler, pattern string)
- func (sm *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
NewHandler returns a new http.Handler that instruments requests with OpenTelemetry.
func NewTracerProvider ¶
func NewTracerProvider() (*trace.TracerProvider, error)
NewTracerProvider returns a new tracer provider with the metis exporter. The url and apiKey can be set with the environment variables METIS_EXPORTER_URL and METIS_API_KEY.
func NewTracerProviderWithLogin ¶
func NewTracerProviderWithLogin(url, apiKey string) (*trace.TracerProvider, error)
NewTracerProviderWithLogin returns a new tracer provider with the metis exporter.
func WrapHandler ¶
WrapHandler wraps an http.Handler with OpenTelemetry instrumentation.
func WrapHandlerFunc ¶
func WrapHandlerFunc(handlerFunc http.HandlerFunc, pattern string) http.HandlerFunc
WrapHandlerFunc wraps an http.HandlerFunc with OpenTelemetry instrumentation.
Types ¶
type ServeMux ¶
func NewServeMux ¶
func NewServeMux() *ServeMux
func (*ServeMux) HandleFunc ¶
Click to show internal directories.
Click to hide internal directories.