cfg

package
v0.0.0-...-19bf477 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOTELResourceFromEnv

func NewOTELResourceFromEnv(ctx context.Context) (res *resource.Resource, env string, err error)

NewOTELResourceFromEnv creates a new OpenTelemetry resource from environment variables. It loads various resource attributes from the environment, including service, container, Kubernetes, and cloud resources. It also sets the deployment environment attribute.

Parameters:

  • ctx: The context for resource creation.

Returns:

  • res: The created OpenTelemetry resource.
  • env: The deployment environment value.
  • err: An error if any occurred during resource creation or if required environment variables are missing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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