connect

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

README

connectrpc adapter for Datadog APM Go Library

GitHub GitHub top language GitHub last commit (branch) GitHub Release Date - Published_At

Documentation

Index

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

func WithAnalytics(on bool) Option

WithAnalytics enables Trace Analytics for all started spans.

func WithAnalyticsRate

func WithAnalyticsRate(rate float64) Option

WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.

func WithCustomTag

func WithCustomTag(key string, value interface{}) Option

WithCustomTag will attach the value to the span tagged by the key.

func WithIgnoredMetadata

func WithIgnoredMetadata(ms ...string) Option

WithIgnoredMetadata specifies keys to be ignored while tracing the metadata. Must be used in conjunction with WithMetadataTags.

func WithIgnoredMethods deprecated

func WithIgnoredMethods(ms ...string) Option

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

func WithServiceName(name string) Option

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

func WithStreamCalls(enabled bool) Option

WithStreamCalls enables or disables tracing of streaming calls. This option does not apply to the stats handler.

func WithStreamMessages

func WithStreamMessages(enabled bool) Option

WithStreamMessages enables or disables tracing of streaming messages. This option does not apply to the stats handler.

func WithUntracedMethods

func WithUntracedMethods(ms ...string) Option

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.

Jump to

Keyboard shortcuts

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