cloudprovider

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package cloudprovider allows to automatically set consistent logs' fields and traces' attributes for OpenTelemetry based on the cloud provider hosting the running helix service.

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 CloudProvider

type CloudProvider interface {

	// String returns the string representation of the cloud provider.
	//
	// Examples:
	//
	//   "kubernetes"
	//   "nomad"
	//   "render"
	//   "qovery"
	//   "unknown"
	String() string

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

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

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

CloudProvider defines the requirements each cloud provider must meet to be compatible with the helix.go ecosystem.

var Detected CloudProvider

Detected is the cloud provider detected by the service package on init. If no known cloud provider 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 qovery provides a helper to detect if the service is being run by Qovery, as well as utilities for consistent OpenTelemetry logs and traces.
Package qovery provides a helper to detect if the service is being run by Qovery, as well as utilities for consistent OpenTelemetry logs and traces.
Package render provides a helper to detect if the service is being run by Render, as well as utilities for consistent OpenTelemetry logs and traces.
Package render provides a helper to detect if the service is being run by Render, as well as utilities for consistent OpenTelemetry logs and traces.
Package unknown provides a fallback helper in case no cloud provider has been detected, as well as utilities for consistent OpenTelemetry logs and traces when not running within a known cloud provider.
Package unknown provides a fallback helper in case no cloud provider has been detected, as well as utilities for consistent OpenTelemetry logs and traces when not running within a known cloud provider.

Jump to

Keyboard shortcuts

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