observability

package
v0.0.0-...-bb56650 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package observability provides abstractions for tracing, metrics, etc.

TODO https://github.com/FerretDB/FerretDB/issues/3244

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncCall

func FuncCall(ctx context.Context) func()

FuncCall adds observability to a function call.

It should be called at the very beginning of the function, and returned function should be called at exit. The returned function must not be passed or stored. The only valid way to use FuncCall is:

func foo(ctx context.Context) {
    defer FuncCall(ctx)()
    // ...

For the Go execution tracer, FuncCall creates a new region for the function call and attaches it to the task in the context (or background task).

func SetupOtel

func SetupOtel(service string) func(context.Context) error

SetupOtel sets up OpenTelemetry exporter with fixed values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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