otel

package
v6.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package otel is the implementation of instrumentation.Tracer for OpenTelemetry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (instrumentation.Tracer, error)

Init initializes the global tracer provider and meter provider for OpenTelemetry.

func ShutDown

func ShutDown()

ShutDown shuts down the global tracer provider.

Types

type MessageCarrier

type MessageCarrier struct {
	*cKafka.Message
	// contains filtered or unexported fields
}

MessageCarrier implements the otel TextMapCarrier interface for kafka.Message.

func NewMessageCarrier

func NewMessageCarrier(msg *kafka.Message) *MessageCarrier

NewMessageCarrier creates a new MessageCarrier from the given kafka.Message.

func (*MessageCarrier) Get

func (kc *MessageCarrier) Get(key string) string

Get returns the value associated with the passed key.

func (*MessageCarrier) Keys

func (kc *MessageCarrier) Keys() []string

Keys lists the keys stored in this carrier.

func (*MessageCarrier) Set

func (kc *MessageCarrier) Set(key string, value string)

Set stores the key-value pair.

Jump to

Keyboard shortcuts

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