ddtrace

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: 15 Imported by: 0

Documentation

Overview

Package ddtrace is the implementation of instrumentation.Tracer for Datadog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (instrumentation.Tracer, error)

Init initializes the Datadog tracer and returns an instance of instrumentation.Tracer. This function starts the Datadog tracer.

func ShutDown

func ShutDown()

ShutDown stops the Datadog tracer. This function should be called to properly shut down the tracer and flush any remaining traces.

Types

type MessageCarrier

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

MessageCarrier implements the Datadog carrier interface for kafka.Message (github.com/segmentio/kafka-go). It allows injecting and extracting trace context into/from Kafka messages.

func NewKafkaCarrier

func NewKafkaCarrier(msg *kafka.Message) MessageCarrier

NewKafkaCarrier creates a new MessageCarrier for the given kafka.Message.

func (MessageCarrier) ForeachKey

func (c MessageCarrier) ForeachKey(handler func(key, val string) error) error

ForeachKey iterates over every header in the carrier and invokes the given handler function for each key-value pair.

func (MessageCarrier) Set

func (c MessageCarrier) Set(key, val string)

Set sets a header in the carrier.

Jump to

Keyboard shortcuts

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