telemetry

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package telemetry allows setting up telemetry for pubsublite consumers and producers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consumer

func Consumer(
	receive pubsubabs.ReceiveFunc,
	tracer trace.Tracer,
	metrics ConsumerMetrics,
	topic string,
	commonAttrs []attribute.KeyValue,
) pubsubabs.ReceiveFunc

Consumer decorates an existing consumer with tracing and metering.

Types

type ConsumerMetrics

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

ConsumerMetrics holds the metrics that are recorded for consumers

func NewConsumerMetrics

func NewConsumerMetrics(mp metric.MeterProvider) (cm ConsumerMetrics, err error)

NewConsumerMetrics instantiates the producer metrics.

type Producer

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

Producer wraps a publisher client to provider tracing and metering.

func NewProducer

func NewProducer(
	client pubsubabs.Publisher,
	tracer trace.Tracer,
	metrics PublisherMetrics,
	attrs []attribute.KeyValue,
) *Producer

NewProducer decorates an existing publisher with tracing and metering.

func (*Producer) Error

func (p *Producer) Error() error

Error returns the producer stop error.

func (*Producer) Publish

Publish wraps the pubsublite publish action with traces and metrics.

func (*Producer) Stop

func (p *Producer) Stop()

Stop stops the producer.

type PublisherMetrics

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

PublisherMetrics hold the metrics that are recorded for producers

func NewPublisherMetrics

func NewPublisherMetrics(mp metric.MeterProvider) (PublisherMetrics, error)

NewPublisherMetrics instantiates the producer metrics.

Jump to

Keyboard shortcuts

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