observability

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 12 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

This section is empty.

Types

type OTelTraceExporter added in v1.23.0

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

OTelTraceExporter represents the OTLP trace exporter using HTTP with protobuf payloads.

func NewOTelTraceExporter added in v1.23.0

func NewOTelTraceExporter(opts *OTelTraceExporterOpts) (*OTelTraceExporter, error)

NewOTelTraceExporter sets up OTelTraceExporter and global tracer provider that is available via `otel.Tracer("")`.

It must be called only once.

func (*OTelTraceExporter) Run added in v1.23.0

func (ot *OTelTraceExporter) Run(ctx context.Context)

Run runs OTLP trace exporter until ctx is canceled.

type OTelTraceExporterOpts added in v1.23.0

type OTelTraceExporterOpts struct {
	Logger *slog.Logger

	Service string
	Version string
	URL     string
}

OTelTraceExporterOpts represents OTelTraceExporter options.

Jump to

Keyboard shortcuts

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