telemetry

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package telemetry contains code that emits telemetry (logging, metrics, tracing).

Index

Constants

View Source
const (
	Throttled string = "Throttled"
)

Variables

This section is empty.

Functions

func ContextWithRPCInfo added in v1.3.2

func ContextWithRPCInfo(ctx context.Context, rpcInfo RPCInfo) context.Context

ContextWithRPCInfo will save the rpc method and service information in context

func MustNewTracerProvider added in v0.3.4

func MustNewTracerProvider(opts ...TracerOption) *sdktrace.TracerProvider

func TraceError

func TraceError(span trace.Span, err error)

TraceError marks the span as having an error, except if the error is context.Canceled, in which case it does nothing.

Types

type RPCInfo added in v1.3.2

type RPCInfo struct {
	Method  string
	Service string
}

func RPCInfoFromContext added in v1.3.2

func RPCInfoFromContext(ctx context.Context) RPCInfo

RPCInfoFromContext returns method and service stored in context

type TracerOption added in v1.3.0

type TracerOption func(d *customTracer)

func WithAttributes added in v1.3.0

func WithAttributes(attrs ...attribute.KeyValue) TracerOption

func WithOTLPEndpoint added in v1.3.0

func WithOTLPEndpoint(endpoint string) TracerOption

func WithOTLPInsecure added in v1.3.2

func WithOTLPInsecure() TracerOption

func WithSamplingRatio added in v1.3.0

func WithSamplingRatio(samplingRatio float64) TracerOption

Jump to

Keyboard shortcuts

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