telemetry

package
v0.3.28 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup() error

Cleanup flushes the remaining traces and metrics in memory to the exporter and releases any telemetry resources.

func RecordErrorOnSpan

func RecordErrorOnSpan(span trace.Span) func(error) error

RecordErrorOnSpan records the error returned by the function in the given span. Should be used like `return RecordErrorOnSpan(span)(c.client.NetworkRemove(ctx, networkID))`

func RecordErrorOnSpanOneChannel

func RecordErrorOnSpanOneChannel[T any](span trace.Span) func(<-chan T, error) (<-chan T, error)

RecordErrorOnSpanOneChannel is similar to RecordErrorOnSpanTwo but one parameter is a channel.

func RecordErrorOnSpanReadCloserAndClose

func RecordErrorOnSpanReadCloserAndClose(span trace.Span) func(io.ReadCloser, error) (io.ReadCloser, error)

RecordErrorOnSpanReadCloserAndClose is similar to RecordError but takes an additional parameter that is an io.ReadCloser. The function will end the given span when the io.ReadCloser is closed. The caller is expected to _not_ call end on the span.

func RecordErrorOnSpanReadCloserTwoAndClose

func RecordErrorOnSpanReadCloserTwoAndClose[T any](span trace.Span) func(io.ReadCloser, T, error) (io.ReadCloser, T, error)

RecordErrorOnSpanReadCloserTwoAndClose is similar to RecordErrorOnSpanReadCloserAndClose but takes an additional parameter.

func RecordErrorOnSpanThree

func RecordErrorOnSpanThree[T any, S any](span trace.Span) func(T, S, error) (T, S, error)

RecordErrorOnSpanThree is similar to RecordError but the function being called takes an additional parameter.

func RecordErrorOnSpanTwo

func RecordErrorOnSpanTwo[T any](span trace.Span) func(T, error) (T, error)

RecordErrorOnSpanTwo is similar to RecordErrorOnSpan but the function being called takes an additional parameter.

func RecordErrorOnSpanTwoChannels

func RecordErrorOnSpanTwoChannels[T any](span trace.Span) func(<-chan T, <-chan error) (<-chan T, <-chan error)

RecordErrorOnSpanTwoChannels is similar to RecordErrorOnSpanTwo but both parameters are channels.

func SetupFromEnvs

func SetupFromEnvs()

Types

This section is empty.

Jump to

Keyboard shortcuts

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