tracing

package
v2.0.0-...-ae247ba Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracing

type Tracing struct {
	// SpanName is a span name. It should follow the naming guidelines here:
	// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#span
	SpanName string `json:"span"`
	// contains filtered or unexported fields
}

Tracing implements an HTTP handler that adds support for distributed tracing, using OpenTelemetry. This module is responsible for the injection and propagation of the trace context. Configure this module via environment variables (see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md). Some values can be overwritten in the configuration file.

func (Tracing) CaddyModule

func (Tracing) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Tracing) Cleanup

func (ot *Tracing) Cleanup() error

Cleanup implements caddy.CleanerUpper and closes any idle connections. It calls Shutdown method for a trace provider https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#shutdown.

func (*Tracing) Provision

func (ot *Tracing) Provision(ctx caddy.Context) error

Provision implements caddy.Provisioner.

func (*Tracing) ServeHTTP

func (ot *Tracing) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

ServeHTTP implements caddyhttp.MiddlewareHandler.

func (*Tracing) UnmarshalCaddyfile

func (ot *Tracing) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the module from Caddyfile tokens. Syntax:

tracing {
    [span <span_name>]
}

Jump to

Keyboard shortcuts

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