span

package
v4.0.0-...-13a3402 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtractTracingSpanMappingDocs = docs.FieldBloblang(
	"extract_tracing_map", "EXPERIMENTAL: A [Bloblang mapping](/docs/guides/bloblang/about) that attempts to extract an object containing tracing propagation information, which will then be used as the root tracing span for the message. The specification of the extracted fields must match the format used by the service wide tracer.",
	`root = meta()`,
	`root = this.meta.span`,
).AtVersion("3.45.0").Advanced()

ExtractTracingSpanMappingDocs returns a docs spec for a mapping field.

Functions

func NewReader

func NewReader(inputName, mapping string, rdr input.Async, mgr bundle.NewManagement) (input.Async, error)

NewReader wraps an async reader with a mechanism for extracting tracing spans from the consumed message using a Bloblang mapping.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader wraps an async reader with a mechanism for extracting tracing spans from the consumed message using a Bloblang mapping.

func (*Reader) Close

func (s *Reader) Close(ctx context.Context) error

Close triggers the shut down of this component and blocks until completion or context cancellation.

func (*Reader) Connect

func (s *Reader) Connect(ctx context.Context) error

Connect attempts to establish a connection to the source, if unsuccessful returns an error. If the attempt is successful (or not necessary) returns nil.

func (*Reader) ReadBatch

func (s *Reader) ReadBatch(ctx context.Context) (message.Batch, input.AsyncAckFn, error)

ReadBatch attempts to read a new message from the source. If successful a message is returned along with a function used to acknowledge receipt of the returned message. It's safe to process the returned message and read the next message asynchronously.

Jump to

Keyboard shortcuts

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