ot

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMetrics added in v0.5.2

func RegisterMetrics() error

RegisterMetrics enables prometheus metrics for OpenTelemetry.

func RegisterTracing added in v0.5.2

func RegisterTracing(ctx context.Context, log logr.Logger) error

RegisterTracing enables code tracing via OpenTelemetry.

Types

type OpenTelemetryAutorestTracer

type OpenTelemetryAutorestTracer struct {
	// contains filtered or unexported fields
}

OpenTelemetryAutorestTracer implements the tracing interface for AutoRest.

func NewOpenTelemetryAutorestTracer

func NewOpenTelemetryAutorestTracer(tracer trace.Tracer) *OpenTelemetryAutorestTracer

NewOpenTelemetryAutorestTracer creates a new Autorest tracing adapter for OpenTelemetry.

func (*OpenTelemetryAutorestTracer) EndSpan

func (ot *OpenTelemetryAutorestTracer) EndSpan(ctx context.Context, httpStatusCode int, err error)

EndSpan ends the current context span. It ignores the httpsStatusCode and error since they are recorded by the otelhttp.Transport.

func (*OpenTelemetryAutorestTracer) NewTransport

NewTransport creates a new http.RoundTripper which will augment the base http.RoundTripper with OpenTelemetry tracing and metrics.

func (*OpenTelemetryAutorestTracer) StartSpan

StartSpan creates a new span of a given name and adds it to the given context.Context.

Jump to

Keyboard shortcuts

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