orchestrator

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package orchestrator allows each orchestrator to set consistent logs' fields and traces' attributes for OpenTelemetry.

This package must not import any other package of this ecosystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Orchestrator

type Orchestrator interface {

	// String returns the string representation of the orchestrator.
	//
	// Examples:
	//
	//   "kubernetes"
	//   "nomad"
	//   "unknown"
	String() string

	// Service returns the service name detected by the orchestrator.
	Service() string

	// LoggerFields returns the fields populated by the orchestrator in OpenTelemetry
	// logs.
	LoggerFields() []zap.Field

	// TracerAttributes returns the attributes populated by the orchestrator in
	// OpenTelemetry traces.
	TracerAttributes() []attribute.KeyValue
}

Orchestrator defines the requirements each orchestrator must meet to be compatible with the helix.go ecosystem.

var Detected Orchestrator

Detected is the orchestrator detected by the service package on init. If no known orchestrator has been detected, this fallbacks to the "unknown" implementation.

Directories

Path Synopsis
Package kubernetes provides a helper to detect if the service is being run by Kubernetes, as well as utilities for consistent OpenTelemetry logs and traces.
Package kubernetes provides a helper to detect if the service is being run by Kubernetes, as well as utilities for consistent OpenTelemetry logs and traces.
Package nomad provides a helper to detect if the service is being run by Nomad, as well as utilities for consistent OpenTelemetry logs and traces.
Package nomad provides a helper to detect if the service is being run by Nomad, as well as utilities for consistent OpenTelemetry logs and traces.
Package unknown provides a fallback helper in case no orchestrator has been detected, as well as utilities for consistent OpenTelemetry logs and traces when not running within a known orchestrator.
Package unknown provides a fallback helper in case no orchestrator has been detected, as well as utilities for consistent OpenTelemetry logs and traces when not running within a known orchestrator.

Jump to

Keyboard shortcuts

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