telemetry

package
v5.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendDialOptions

func AppendDialOptions(opts []grpc.DialOption, propagator propagation.TextMapPropagator, tracerProvider trace.TracerProvider) []grpc.DialOption

AppendDialOptions appends unary and stream interceptors using the given propagator and tracer provider. If either propagator or tracerProvider are nil, this function returns the given opts as they were provided.

func AppendServerInterceptors

AppendServerInterceptors appends unary and stream interceptors using the given propagator and tracer provider. If either propagator or tracerProvider are nil, this function returns the given streams and unaries as they were provided.

func NewChildSpan

func NewChildSpan(ctx context.Context, name string) (context.Context, trace.Span)

NewChildSpan initializes a new child span.

func NewClientInterceptor

NewClientInterceptor initializes a new client interceptor for gRPC using the given propagator and tracer provider.

func NewJaegerPropagator

func NewJaegerPropagator() jaegerPropagator.Jaeger

NewJaegerPropagator initializes a new Open Telemetry traces propagator for Jaeger. The propagator serializes and deserializes Jaeger headers to/from a context.Context.

func NewJaegerTracerProvider

func NewJaegerTracerProvider(service, url, environment string) (trace.TracerProvider, error)

NewJaegerTracerProvider initializes a new Open Telemetry tracer provider for Jaeger.

service: Describes the service that will be exporting traces into Jaeger. Usually contains the service name.
url: Contains the endpoint where to publish traces to. For Jaeger, it's the collector's endpoint.
environment: Used to identify the environment that a certain service is publishing traces from. Defaults to "development".

func NewServerInterceptor

NewServerInterceptor initializes a new server interceptor for gRPC using the given propagator and tracer provider.

func NewSpan

func NewSpan(ctx context.Context) trace.Span

NewSpan initializes a new span from the given context. Span is the individual component of a trace. It represents a single named and timed operation of a workflow that is traced. A Tracer is used to create a Span, and it is then up to the operation the Span represents to properly end the Span when the operation itself ends. If no Span is currently set in ctx a NoOp span is returned instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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