Documentation ¶
Overview ¶
Package tracing contains tracing logic for the cloud.google.com/go/pubsub.v1 instrumentation.
WARNING: this package SHOULD NOT import cloud.google.com/go/pubsub.
The motivation of this package is to support orchestrion, which cannot use the main package because it imports the cloud.google.com/go/pubsub package, and since orchestrion modifies the library code itself, this would cause an import cycle.
Index ¶
- func TracePublish(ctx context.Context, topic Topic, msg *Message, opts ...Option) (context.Context, func(serverID string, err error))
- func TraceReceiveFunc(s Subscription, opts ...Option) func(ctx context.Context, msg *Message) (context.Context, func())
- type Message
- type Option
- type Subscription
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TracePublish ¶
func TraceReceiveFunc ¶
Types ¶
type Option ¶
type Option func(cfg *config)
Option is used to customize spans started by WrapReceiveHandler or Publish.
func WithMeasured ¶
func WithMeasured() Option
WithMeasured sets the measured tag for traces started by WrapReceiveHandler or Publish.
func WithServiceName ¶
WithServiceName sets the service name tag for traces started by WrapReceiveHandler or Publish.
type Subscription ¶
type Subscription interface {
String() string
}