treemuxotel

package module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2021 License: MIT Imports: 7 Imported by: 0

README

OpenTelemetry integration for treemux

To install:

go get github.com/uptrace/treemux/extra/treemuxotel

To use:

import "github.com/uptrace/treemux/extra/treemuxotel"

router := treemux.New(
    treemux.WithMiddleware(treemuxotel.NewMiddleware()),
)

With options:

import "github.com/uptrace/treemux/extra/treemuxotel"

otelMiddleware := treemuxotel.NewMiddleware(
    treemuxotel.WithClientIP(false),
)

router := treemux.New(
    treemux.WithMiddleware(otelMiddleware),
)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware

func NewMiddleware(opts ...Option) treemux.MiddlewareFunc

Types

type Option

type Option func(c *config)

func WithClientIP

func WithClientIP(on bool) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL