package octtrpc

import "github.com/Microsoft/hcsshim/pkg/octtrpc"

Index

Functions

func ClientInterceptor

func ClientInterceptor(opts ...Option) ttrpc.UnaryClientInterceptor

ClientInterceptor returns a TTRPC unary client interceptor that automatically creates a new span for outgoing TTRPC calls, and passes the span context as metadata on the call.

func ServerInterceptor

func ServerInterceptor(opts ...Option) ttrpc.UnaryServerInterceptor

ServerInterceptor returns a TTRPC unary server interceptor that automatically creates a new span for incoming TTRPC calls, and parents the span to the span context received via metadata, if it exists.

Types

type Option

type Option func(*options)

Option represents an option function that can be used with the OC TTRPC interceptors.

func WithSampler

func WithSampler(sampler trace.Sampler) Option

WithSampler returns an option function to set the OC sampler used for the auto-created spans.

Source Files

interceptor.go

Version
v0.12.9 (latest)
Published
Oct 30, 2024
Platform
linux/amd64
Imports
9 packages
Last checked
12 hours ago

Tools for package owners.