opentr

package
v0.0.0-...-335d32b Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package opentr provides convenience functions for setting up OpenTracing spans to represent Rinq operations.

Index

Constants

This section is empty.

Variables

View Source
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

ChildOf creates a new span that with a child-of relationship to the span in, if any.

func FollowsFrom

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

func LogServerRequest(s opentracing.Span, peerID ident.PeerID, p *rinq.Payload)

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

func SetupCommand(
	s opentracing.Span,
	id ident.MessageID,
	ns string,
	cmd string,
)

SetupCommand configures span as a command-related span.

func SetupNotification

func SetupNotification(
	s opentracing.Span,
	id ident.MessageID,
	ns string,
	t string,
)

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.

Jump to

Keyboard shortcuts

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