Documentation ¶
Index ¶
- func NewServerInterceptor(opts ...Option) connect.Interceptor
- type InterceptorOption
- type Option
- func NoDebugStack() Option
- func WithAnalytics(on bool) Option
- func WithAnalyticsRate(rate float64) Option
- func WithCustomTag(key string, value interface{}) Option
- func WithIgnoredMetadata(ms ...string) Option
- func WithIgnoredMethods(ms ...string) Optiondeprecated
- func WithMetadataTags() Option
- func WithRequestTags() Option
- func WithServiceName(name string) Option
- func WithSpanOptions(opts ...ddtrace.StartSpanOption) Option
- func WithStreamCalls(enabled bool) Option
- func WithStreamMessages(enabled bool) Option
- func WithUntracedMethods(ms ...string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServerInterceptor ¶
func NewServerInterceptor(opts ...Option) connect.Interceptor
Types ¶
type InterceptorOption ¶
type InterceptorOption = Option
InterceptorOption represents an option that can be passed to the grpc unary client and server interceptors. InterceptorOption is deprecated in favor of Option.
func NonErrorCodes ¶
func NonErrorCodes(cs ...connect.Code) InterceptorOption
NonErrorCodes determines the list of codes which will not be considered errors in instrumentation. This call overrides the default handling of codes.Canceled as a non-error.
type Option ¶
type Option func(*config)
Option specifies a configuration option for the grpc package. Not all options apply to all instrumented structures.
func NoDebugStack ¶
func NoDebugStack() Option
NoDebugStack disables debug stacks for traces with errors. This is useful in situations where errors are frequent and the overhead of calling debug.Stack may affect performance.
func WithAnalytics ¶
WithAnalytics enables Trace Analytics for all started spans.
func WithAnalyticsRate ¶
WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.
func WithCustomTag ¶
WithCustomTag will attach the value to the span tagged by the key.
func WithIgnoredMetadata ¶
WithIgnoredMetadata specifies keys to be ignored while tracing the metadata. Must be used in conjunction with WithMetadataTags.
func WithIgnoredMethods
deprecated
WithIgnoredMethods specifies full methods to be ignored by the server side interceptor. When an incoming request's full method is in ms, no spans will be created.
Deprecated: This is deprecated in favor of WithUntracedMethods which applies to both the server side and client side interceptors.
func WithMetadataTags ¶
func WithMetadataTags() Option
WithMetadataTags specifies whether gRPC metadata should be added to spans as tags.
func WithRequestTags ¶
func WithRequestTags() Option
WithRequestTags specifies whether gRPC requests should be added to spans as tags.
func WithServiceName ¶
WithServiceName sets the given service name for the intercepted client.
func WithSpanOptions ¶
func WithSpanOptions(opts ...ddtrace.StartSpanOption) Option
WithSpanOptions defines a set of additional ddtrace.StartSpanOption to be added to spans started by the integration.
func WithStreamCalls ¶
WithStreamCalls enables or disables tracing of streaming calls. This option does not apply to the stats handler.
func WithStreamMessages ¶
WithStreamMessages enables or disables tracing of streaming messages. This option does not apply to the stats handler.
func WithUntracedMethods ¶
WithUntracedMethods specifies full methods to be ignored by the server side and client side interceptors. When a request's full method is in ms, no spans will be created.