common

package module
v1.0.107 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 43

Documentation

Index

Constants

View Source
const OdigosResourceNamespace = "instrumentation.odigos.io"

This is the resource namespace of the lister in k8s device plugin manager. from the "github.com/kubevirt/device-plugin-manager" package source: GetResourceNamespace must return namespace (vendor ID) of implemented Lister. e.g. for resources in format "color.example.com/<color>" that would be "color.example.com".

Variables

View Source
var (
	OtelSdkNativeCommunity  = OtelSdk{SdkType: NativeOtelSdkType, SdkTier: CommunityOtelSdkTier}
	OtelSdkEbpfCommunity    = OtelSdk{SdkType: EbpfOtelSdkType, SdkTier: CommunityOtelSdkTier}
	OtelSdkNativeEnterprise = OtelSdk{SdkType: NativeOtelSdkType, SdkTier: EnterpriseOtelSdkTier}
	OtelSdkEbpfEnterprise   = OtelSdk{SdkType: EbpfOtelSdkType, SdkTier: EnterpriseOtelSdkTier}
)

Functions

func GetVersion added in v1.0.97

func GetVersion(versionString string) *version.Version

func InstrumentationDeviceNameToComponents

func InstrumentationDeviceNameToComponents(deviceName string) (ProgrammingLanguage, OtelSdk)

func InstrumentationPluginName

func InstrumentationPluginName(language ProgrammingLanguage, otelSdk OtelSdk) string

func InstrumentationPluginNameToComponents

func InstrumentationPluginNameToComponents(pluginName string) (ProgrammingLanguage, OtelSdk)

func MapOdigosToSemConv added in v1.0.99

func MapOdigosToSemConv(odigosPrograminglang ProgrammingLanguage) string

MapOdigosToSemConv maps odigos programming language to OpenTelemetry semantic conventions It is supported only for the languages that are supported by OpenTelemetry [not for mysql, nginx, etc.]

func SpanKindOdigosToOtel

func SpanKindOdigosToOtel(kind SpanKind) trace.SpanKind

func StartPprofServer added in v1.0.71

func StartPprofServer(logger logr.Logger)

StartPprofServer starts the pprof server. This is blocking, so it should be run in a goroutine. If the server is unable to start, the process will exit with a non-zero exit code.

Types

type AgentHealthStatus added in v1.0.87

type AgentHealthStatus string
const (
	// AgentHealthStatusHealthy represents the healthy status of an agent
	// It started the OpenTelemetry SDK with no errors, processed any configuration and is ready to receive data.
	AgentHealthStatusHealthy AgentHealthStatus = "Healthy"

	// AgentHealthStatusStarting represents that the agent is starting and there is still no health status available.
	// Once the agent finishes starting, it should report an either healthy or unhealthy status depending on the result.
	AgentHealthStatusStarting AgentHealthStatus = "Starting"

	// AgentHealthStatusUnsupportedRuntimeVersion represents that the agent is running on an unsupported runtime version
	// For example: Otel sdk supports node.js >= 14 and workload is running with node.js 12
	AgentHealthStatusUnsupportedRuntimeVersion AgentHealthStatus = "UnsupportedRuntimeVersion"

	// AgentHealthStatusNoHeartbeat is when the server did not receive a 3 heartbeats from the agent, thus it is considered unhealthy
	AgentHealthStatusNoHeartbeat AgentHealthStatus = "NoHeartbeat"

	// AgentHealthStatusProcessTerminated is when the agent process is terminated.
	// The termination can be due to normal shutdown (e.g. event loop run out of work)
	// due to explicit termination (e.g. code calls exit(), or OS signal), or due to an error (e.g. unhandled exception)
	AgentHealthProcessTerminated AgentHealthStatus = "ProcessTerminated"

	// AgentHealthStatusAgentFailure is when the opamp agent encountered an error during runtime.
	AgentFailure AgentHealthStatus = "AgentFailure"
)

type CollectorGatewayConfiguration added in v1.0.93

type CollectorGatewayConfiguration struct {
	// RequestMemoryMiB is the memory request for the cluster gateway collector deployment.
	// it will be embedded in the deployment as a resource request of the form "memory: <value>Mi"
	// default value is 500Mi
	RequestMemoryMiB int `json:"requestMemoryMiB,omitempty"`

	// this parameter sets the "limit_mib" parameter in the memory limiter configuration for the collector gateway.
	// it is the hard limit after which a force garbage collection will be performed.
	// if not set, it will be 50Mi below the memory request.
	MemoryLimiterLimitMiB int `json:"memoryLimiterLimitMiB,omitempty"`

	// this parameter sets the "spike_limit_mib" parameter in the memory limiter configuration for the collector gateway.
	// note that this is not the processor soft limit, but the diff in Mib between the hard limit and the soft limit.
	// if not set, this will be set to 20% of the hard limit (so the soft limit will be 80% of the hard limit).
	MemoryLimiterSpikeLimitMiB int `json:"memoryLimiterSpikeLimitMiB,omitempty"`

	// the GOMEMLIMIT environment variable value for the collector gateway deployment.
	// this is when go runtime will start garbage collection.
	// if not specified, it will be set to 80% of the hard limit of the memory limiter.
	GoMemLimitMib int `json:"goMemLimitMiB,omitempty"`
}

type DestinationType

type DestinationType string
const (
	AWSS3DestinationType                  DestinationType = "s3"
	AxiomDestinationType                  DestinationType = "axiom"
	AzureBlobDestinationType              DestinationType = "azureblob"
	CauselyDestinationType                DestinationType = "causely"
	ChronosphereDestinationType           DestinationType = "chronosphere"
	ClickhouseDestinationType             DestinationType = "clickhouse"
	CoralogixDestinationType              DestinationType = "coralogix"
	DatadogDestinationType                DestinationType = "datadog"
	DebugDestinationType                  DestinationType = "debug"
	DynatraceDestinationType              DestinationType = "dynatrace"
	ElasticAPMDestinationType             DestinationType = "elasticapm"
	ElasticsearchDestinationType          DestinationType = "elasticsearch"
	GCSDestinationType                    DestinationType = "gcs"
	GenericOTLPDestinationType            DestinationType = "otlp"
	GoogleCloudDestinationType            DestinationType = "googlecloud"
	GrafanaCloudLokiDestinationType       DestinationType = "grafanacloudloki"
	GrafanaCloudPrometheusDestinationType DestinationType = "grafanacloudprometheus"
	GrafanaCloudTempoDestinationType      DestinationType = "grafanacloudtempo"
	HoneycombDestinationType              DestinationType = "honeycomb"
	JaegerDestinationType                 DestinationType = "jaeger"
	LightstepDestinationType              DestinationType = "lightstep"
	LogzioDestinationType                 DestinationType = "logzio"
	LokiDestinationType                   DestinationType = "loki"
	MiddlewareDestinationType             DestinationType = "middleware"
	NewRelicDestinationType               DestinationType = "newrelic"
	OpsVerseDestinationType               DestinationType = "opsverse"
	OtlpHttpDestinationType               DestinationType = "otlphttp"
	PrometheusDestinationType             DestinationType = "prometheus"
	QrynDestinationType                   DestinationType = "qryn"
	QuickwitDestinationType               DestinationType = "quickwit"
	SentryDestinationType                 DestinationType = "sentry"
	SignozDestinationType                 DestinationType = "signoz"
	SplunkDestinationType                 DestinationType = "splunk"
	SumoLogicDestinationType              DestinationType = "sumologic"
	TempoDestinationType                  DestinationType = "tempo"
	UptraceDestinationType                DestinationType = "uptrace"
)

type ObservabilitySignal

type ObservabilitySignal string

+kubebuilder:validation:Enum=LOGS;TRACES;METRICS

const (
	LogsObservabilitySignal    ObservabilitySignal = "LOGS"
	TracesObservabilitySignal  ObservabilitySignal = "TRACES"
	MetricsObservabilitySignal ObservabilitySignal = "METRICS"
)

type OdigosConfiguration added in v1.0.93

type OdigosConfiguration struct {
	ConfigVersion     int                             `json:"configVersion"`
	TelemetryEnabled  bool                            `json:"telemetryEnabled,omitempty"`
	OpenshiftEnabled  bool                            `json:"openshiftEnabled,omitempty"`
	IgnoredNamespaces []string                        `json:"ignoredNamespaces,omitempty"`
	IgnoredContainers []string                        `json:"ignoredContainers,omitempty"`
	Psp               bool                            `json:"psp,omitempty"`
	ImagePrefix       string                          `json:"imagePrefix,omitempty"`
	OdigletImage      string                          `json:"odigletImage,omitempty"`
	InstrumentorImage string                          `json:"instrumentorImage,omitempty"`
	AutoscalerImage   string                          `json:"autoscalerImage,omitempty"`
	DefaultSDKs       map[ProgrammingLanguage]OtelSdk `json:"defaultSDKs,omitempty"`
	CollectorGateway  *CollectorGatewayConfiguration  `json:"collectorGateway,omitempty"`
	Profiles          []ProfileName                   `json:"profiles,omitempty"`

	// this is internal currently, and is not exposed on the CLI / helm
	// used for odigos enterprise
	GoAutoIncludeCodeAttributes bool `json:"goAutoIncludeCodeAttributes,omitempty"`
}

OdigosConfiguration defines the desired state of OdigosConfiguration

type OdigosInstrumentationDevice

type OdigosInstrumentationDevice string

func InstrumentationDeviceName

func InstrumentationDeviceName(language ProgrammingLanguage, otelSdk OtelSdk) OdigosInstrumentationDevice

type OdigosTier

type OdigosTier string
const (

	// community is the opensource tier of odigos
	CommunityOdigosTier OdigosTier = "community"

	// cloud is the SaaS offering of odigos
	CloudOdigosTier OdigosTier = "cloud"

	// on premises comes with enterprise features and does not require
	// network connectivity to odigos cloud
	OnPremOdigosTier OdigosTier = "onprem"
)

type OtelSdk

type OtelSdk struct {
	SdkType OtelSdkType `json:"sdkType"`
	SdkTier OtelSdkTier `json:"sdkTier"`
}

type OtelSdkTier

type OtelSdkTier string
const (
	CommunityOtelSdkTier  OtelSdkTier = "community"
	EnterpriseOtelSdkTier OtelSdkTier = "enterprise"
)

type OtelSdkType

type OtelSdkType string

Odigos supports two types of OpenTelemetry SDKs: native and ebpf.

const (
	// The native SDK is implemented in the language of the application and
	// is integrated into the application code via runtime support (e.g. Java agent).
	NativeOtelSdkType OtelSdkType = "native"

	// EbpfOtelSdkType SDK can record telemetry data from the application with eBPF
	// code injected into the application process.
	EbpfOtelSdkType OtelSdkType = "ebpf"
)

type ProfileName added in v1.0.105

type ProfileName string

type ProgramLanguageDetails added in v1.0.93

type ProgramLanguageDetails struct {
	Language       ProgrammingLanguage
	RuntimeVersion *version.Version
}

type ProgrammingLanguage

type ProgrammingLanguage string

+kubebuilder:validation:Enum=java;python;go;dotnet;javascript;mysql;nginx;unknown;ignored

const (
	JavaProgrammingLanguage       ProgrammingLanguage = "java"
	PythonProgrammingLanguage     ProgrammingLanguage = "python"
	GoProgrammingLanguage         ProgrammingLanguage = "go"
	DotNetProgrammingLanguage     ProgrammingLanguage = "dotnet"
	JavascriptProgrammingLanguage ProgrammingLanguage = "javascript"
	// This is an experimental feature, It is not a language
	// but in order to avoid huge refactoring we are adding it here for now
	MySQLProgrammingLanguage ProgrammingLanguage = "mysql"
	NginxProgrammingLanguage ProgrammingLanguage = "nginx"
	// Used when the language detection is not successful for all the available inspectors
	UnknownProgrammingLanguage ProgrammingLanguage = "unknown"
	// Ignored is used when the odigos is configured to ignore the process/container
	IgnoredProgrammingLanguage ProgrammingLanguage = "ignored"
)

type SpanKind

type SpanKind string

SpanKind is already defined in opentelemetry-go as int. this value can go into the CRD in which case it will be string for user convenience. +kubebuilder:validation:Enum=client;server;producer;consumer;internal

const (
	ClientSpanKind   SpanKind = "client"
	ServerSpanKind   SpanKind = "server"
	ProducerSpanKind SpanKind = "producer"
	ConsumerSpanKind SpanKind = "consumer"
	InternalSpanKind SpanKind = "internal"
)

func ConvertSpanKindToString

func ConvertSpanKindToString(spanKind trace.SpanKind) SpanKind

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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