Documentation ¶
Overview ¶
Package opentr provides convenience functions for setting up OpenTracing spans to represent Rinq operations.
Index ¶
- Variables
- func AddTraceID(s opentracing.Span, id string)
- func ChildOf(ctx context.Context, tracer opentracing.Tracer, ...) (opentracing.Span, context.Context)
- func FollowsFrom(ctx context.Context, tracer opentracing.Tracer, ...) (opentracing.Span, context.Context)
- func LogInvokerCall(s opentracing.Span, attrs attributes.Catalog, p *rinq.Payload)
- func LogInvokerCallAsync(s opentracing.Span, attrs attributes.Catalog, p *rinq.Payload)
- func LogInvokerError(s opentracing.Span, err error)
- func LogInvokerExecute(s opentracing.Span, attrs attributes.Catalog, p *rinq.Payload)
- func LogInvokerSuccess(s opentracing.Span, p *rinq.Payload)
- func LogListenerReceived(s opentracing.Span, ref ident.Ref, n rinq.Notification)
- func LogNotifierError(s opentracing.Span, err error)
- func LogNotifierMulticast(s opentracing.Span, attrs attributes.Catalog, con constraint.Constraint, ...)
- func LogNotifierUnicast(s opentracing.Span, attrs attributes.Catalog, target ident.SessionID, ...)
- func LogServerError(s opentracing.Span, err error)
- func LogServerRequest(s opentracing.Span, peerID ident.PeerID, p *rinq.Payload)
- func LogServerSuccess(s opentracing.Span, p *rinq.Payload)
- func LogSessionClearRequest(s opentracing.Span, rev ident.Revision)
- func LogSessionClearSuccess(s opentracing.Span, rev ident.Revision, diff *attributes.Diff)
- func LogSessionDestroyRequest(s opentracing.Span, rev ident.Revision)
- func LogSessionDestroySuccess(s opentracing.Span)
- func LogSessionError(s opentracing.Span, err error)
- func LogSessionFetchRequest(s opentracing.Span, keys []string)
- func LogSessionFetchSuccess(s opentracing.Span, rev ident.Revision, attrs attributes.Collection)
- func LogSessionUpdateRequest(s opentracing.Span, rev ident.Revision, attrs attributes.Collection)
- func LogSessionUpdateSuccess(s opentracing.Span, rev ident.Revision, diff *attributes.Diff)
- func SetupCommand(s opentracing.Span, id ident.MessageID, ns string, cmd string)
- func SetupNotification(s opentracing.Span, id ident.MessageID, ns string, t string)
- func SetupSessionClear(s opentracing.Span, ns string, sessID ident.SessionID)
- func SetupSessionDestroy(s opentracing.Span, sessID ident.SessionID)
- func SetupSessionFetch(s opentracing.Span, ns string, sessID ident.SessionID)
- func SetupSessionUpdate(s opentracing.Span, ns string, sessID ident.SessionID)
Constants ¶
This section is empty.
Variables ¶
var CommonSpanOptions = []opentracing.StartSpanOption{ opentracing.Tag{ Key: string(ext.Component), Value: "rinq-go/" + rinq.Version, }, }
CommonSpanOptions contains span options that should be applied to any spans started by Rinq.
Functions ¶
func AddTraceID ¶
func AddTraceID(s opentracing.Span, id string)
AddTraceID configures span s to have traceID set to the given id.
func ChildOf ¶
func ChildOf( ctx context.Context, tracer opentracing.Tracer, opts ...opentracing.StartSpanOption, ) (opentracing.Span, context.Context)
ChildOf creates a new span that with a child-of relationship to the span in, if any.
func FollowsFrom ¶
func FollowsFrom( ctx context.Context, tracer opentracing.Tracer, opts ...opentracing.StartSpanOption, ) (opentracing.Span, context.Context)
FollowsFrom creates a new span that with a follows-from relationship to the span in ctx, if any.
func LogInvokerCall ¶
func LogInvokerCall( s opentracing.Span, attrs attributes.Catalog, p *rinq.Payload, )
LogInvokerCall logs information about a "call" style invocation to s.
func LogInvokerCallAsync ¶
func LogInvokerCallAsync( s opentracing.Span, attrs attributes.Catalog, p *rinq.Payload, )
LogInvokerCallAsync logs information about a "call-sync" style invocation to s.
func LogInvokerError ¶
func LogInvokerError(s opentracing.Span, err error)
LogInvokerError logs information about err to s.
func LogInvokerExecute ¶
func LogInvokerExecute( s opentracing.Span, attrs attributes.Catalog, p *rinq.Payload, )
LogInvokerExecute logs information about an "execute" style invoation to s.
func LogInvokerSuccess ¶
func LogInvokerSuccess(s opentracing.Span, p *rinq.Payload)
LogInvokerSuccess logs information about a successful command response to s.
func LogListenerReceived ¶
func LogListenerReceived(s opentracing.Span, ref ident.Ref, n rinq.Notification)
LogListenerReceived logs information about a received notification to s.
func LogNotifierError ¶
func LogNotifierError(s opentracing.Span, err error)
LogNotifierError logs information about err to s.
func LogNotifierMulticast ¶
func LogNotifierMulticast( s opentracing.Span, attrs attributes.Catalog, con constraint.Constraint, p *rinq.Payload, )
LogNotifierMulticast logs informatin about a multicast notification to s.
func LogNotifierUnicast ¶
func LogNotifierUnicast( s opentracing.Span, attrs attributes.Catalog, target ident.SessionID, p *rinq.Payload, )
LogNotifierUnicast logs information about a unicast notification to s.
func LogServerError ¶
func LogServerError(s opentracing.Span, err error)
LogServerError logs information about err to s.
func LogServerRequest ¶
LogServerRequest logs information about an incoming command request to s.
func LogServerSuccess ¶
func LogServerSuccess(s opentracing.Span, p *rinq.Payload)
LogServerSuccess logs information about a successful command response to s.
func LogSessionClearRequest ¶
func LogSessionClearRequest(s opentracing.Span, rev ident.Revision)
LogSessionClearRequest logs information about a session clear attempt to s.
func LogSessionClearSuccess ¶
func LogSessionClearSuccess(s opentracing.Span, rev ident.Revision, diff *attributes.Diff)
LogSessionClearSuccess logs information about a successful session clear to s. diff is optional, as the information is not known on the remote end.
func LogSessionDestroyRequest ¶
func LogSessionDestroyRequest(s opentracing.Span, rev ident.Revision)
LogSessionDestroyRequest logs information about a session destroy attempt to s.
func LogSessionDestroySuccess ¶
func LogSessionDestroySuccess(s opentracing.Span)
LogSessionDestroySuccess logs information about a successful destroy attempt to s.
func LogSessionError ¶
func LogSessionError(s opentracing.Span, err error)
LogSessionError logs information about an error during a session operation.
func LogSessionFetchRequest ¶
func LogSessionFetchRequest(s opentracing.Span, keys []string)
LogSessionFetchRequest logs information about a session fetch attempt to s.
func LogSessionFetchSuccess ¶
func LogSessionFetchSuccess(s opentracing.Span, rev ident.Revision, attrs attributes.Collection)
LogSessionFetchSuccess logs information about a successful session fetch to s.
func LogSessionUpdateRequest ¶
func LogSessionUpdateRequest(s opentracing.Span, rev ident.Revision, attrs attributes.Collection)
LogSessionUpdateRequest logs information about a session update attempt to s.
func LogSessionUpdateSuccess ¶
func LogSessionUpdateSuccess(s opentracing.Span, rev ident.Revision, diff *attributes.Diff)
LogSessionUpdateSuccess logs information about a successful session update to s.
func SetupCommand ¶
SetupCommand configures span as a command-related span.
func SetupNotification ¶
SetupNotification configures span as a command-related span.
func SetupSessionClear ¶
func SetupSessionClear(s opentracing.Span, ns string, sessID ident.SessionID)
SetupSessionClear configures s as an attribute update operation.
func SetupSessionDestroy ¶
func SetupSessionDestroy(s opentracing.Span, sessID ident.SessionID)
SetupSessionDestroy configures s as a destroy operation.
func SetupSessionFetch ¶
func SetupSessionFetch(s opentracing.Span, ns string, sessID ident.SessionID)
SetupSessionFetch configures s as an attribute fetch operation.
func SetupSessionUpdate ¶
func SetupSessionUpdate(s opentracing.Span, ns string, sessID ident.SessionID)
SetupSessionUpdate configures s as an attribute update operation.
Types ¶
This section is empty.