Documentation ¶
Index ¶
- func AppendDialOptions(opts []grpc.DialOption, propagator propagation.TextMapPropagator, ...) []grpc.DialOption
- func AppendServerInterceptors(unaries []grpc.UnaryServerInterceptor, streams []grpc.StreamServerInterceptor, ...) ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor)
- func NewChildSpan(ctx context.Context, name string) (context.Context, trace.Span)
- func NewClientInterceptor(p propagation.TextMapPropagator, tp trace.TracerProvider) (grpc.UnaryClientInterceptor, grpc.StreamClientInterceptor)
- func NewJaegerPropagator() jaegerPropagator.Jaeger
- func NewJaegerTracerProvider(service, url, environment string) (trace.TracerProvider, error)
- func NewServerInterceptor(p propagation.TextMapPropagator, tp trace.TracerProvider) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
- func NewSpan(ctx context.Context) trace.Span
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 ¶
func AppendServerInterceptors(unaries []grpc.UnaryServerInterceptor, streams []grpc.StreamServerInterceptor, p propagation.TextMapPropagator, tp trace.TracerProvider) ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor)
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 ¶
NewChildSpan initializes a new child span.
func NewClientInterceptor ¶
func NewClientInterceptor(p propagation.TextMapPropagator, tp trace.TracerProvider) (grpc.UnaryClientInterceptor, grpc.StreamClientInterceptor)
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 ¶
func NewServerInterceptor(p propagation.TextMapPropagator, tp trace.TracerProvider) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
NewServerInterceptor initializes a new server interceptor for gRPC using the given propagator and tracer provider.
func NewSpan ¶
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.