Documentation ¶
Index ¶
- func Cleanup() error
- func RecordErrorOnSpan(span trace.Span) func(error) error
- func RecordErrorOnSpanOneChannel[T any](span trace.Span) func(<-chan T, error) (<-chan T, error)
- func RecordErrorOnSpanReadCloserAndClose(span trace.Span) func(io.ReadCloser, error) (io.ReadCloser, error)
- func RecordErrorOnSpanReadCloserTwoAndClose[T any](span trace.Span) func(io.ReadCloser, T, error) (io.ReadCloser, T, error)
- func RecordErrorOnSpanThree[T any, S any](span trace.Span) func(T, S, error) (T, S, error)
- func RecordErrorOnSpanTwo[T any](span trace.Span) func(T, error) (T, error)
- func RecordErrorOnSpanTwoChannels[T any](span trace.Span) func(<-chan T, <-chan error) (<-chan T, <-chan error)
- func SetupFromEnvs()
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 ¶
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 ¶
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 ¶
RecordErrorOnSpanThree is similar to RecordError but the function being called takes an additional parameter.
func RecordErrorOnSpanTwo ¶
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.