example

package module
v0.0.0-...-9388d9d Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

Kafka Sarama instrumentation example

A Kafka producer and consumer using Sarama with instrumentation.

These instructions expect you have docker-compose installed.

Bring up the Kafka and ZooKeeper services to run the example:

docker-compose up -d zoo kafka

Then up the kafka-producer service to produce a message into Kafka:

docker-compose up kafka-producer

At last, up the kafka-consumer service to consume messages from Kafka:

docker-compose up kafka-consumer

Shut down the services when you are finished with the example:

docker-compose down

Documentation

Index

Constants

View Source
const (
	// KafkaTopic name.
	KafkaTopic = "sarama-instrumentation-example"
)

Variables

This section is empty.

Functions

func InitTracer

func InitTracer() (*sdktrace.TracerProvider, error)

InitTracer creates and registers globally a new TracerProvider.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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