tracing

package
v0.0.0-...-c91c74a Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package tracing otelhttp

Index

Constants

View Source
const (
	// ServerName Used in query
	ServerName = "bcs-monitor-query"
	// TracerName tracer name
	TracerName = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
)

Variables

This section is empty.

Functions

func InitTracing

func InitTracing(op *config.TracingConf) (func(context.Context) error, error)

InitTracing init tracing

func SetServiceName

func SetServiceName(s string)

SetServiceName set serviceName

Types

type TracingTransport

type TracingTransport struct {
	Transport      http.RoundTripper
	TracerProvider trace.TracerProvider
	Propagators    propagation.TextMapPropagator
}

TracingTransport used by http Transport

func NewTracingTransport

func NewTracingTransport(transport http.RoundTripper) *TracingTransport

NewTracingTransport make a new tracing transport, default transport can be nil

func (*TracingTransport) RoundTrip

func (t *TracingTransport) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip tracing Transport

Jump to

Keyboard shortcuts

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