macaron

package module
v0.0.0-...-f2c18b3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package macaron provides functions to trace the macaron.v1 package (https://github.com/go-macaron/macaron).

Currently only the routing of a received message can be instrumented. To do it, use the Middleware function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(service string, opts ...Option) macaron.Handler

Middleware returns a macaron Handler to trace requests to the server.

Types

type Config

type Config struct {
	Tracer      trace.Tracer
	Propagators propagation.Propagators
}

Config is a helper struct to configure Macaron options

type Option

type Option func(*Config)

Option specifies instrumentation configuration options.

func WithPropagators

func WithPropagators(propagators propagation.Propagators) Option

WithPropagators specifies propagators to use for extracting information from the HTTP requests. If none are specified, global ones will be used.

func WithTracer

func WithTracer(tracer trace.Tracer) Option

WithTracer specifies a tracer to use for creating spans. If none is specified, a tracer named "go.opentelemetry.io/contrib/plugins/macaron" from the global provider is used.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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