o11yutils

package
v11.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package o11yutils offers observability utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustOtelResource

func MustOtelResource(ctx context.Context, serviceName string) *resource.Resource

MustOtelResource is OtelResource for callers that have nowhere to put an error. Prefer OtelResource: everything in this repo that builds a resource is a constructor with an error in its signature.

func OtelResource

func OtelResource(ctx context.Context, serviceName string) (*resource.Resource, error)

OtelResource assembles the OpenTelemetry resource describing this process.

Every caller is a constructor that already returns an error, which is why this returns one too: resource detection reads the environment and the host, and a detector that fails is a misconfiguration the caller can report like any other, not grounds for taking the process down from inside a constructor.

Types

This section is empty.

Jump to

Keyboard shortcuts

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