config

package
v0.0.0-...-b8a1a0e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNKNOWN_DATA  = 0
	CBPF_NET_SPAN = uint32(1 << datatype.SIGNAL_SOURCE_PACKET)
	EBPF_SYS_SPAN = uint32(1 << datatype.SIGNAL_SOURCE_EBPF)
	OTEL_APP_SPAN = uint32(1 << datatype.SIGNAL_SOURCE_OTEL)
)
View Source
const (
	UNKNOWN_DATA_TYPE = 0

	SERVICE_INFO uint32 = 1 << iota
	TRACING_INFO
	NETWORK_LAYER
	FLOW_INFO
	CLIENT_UNIVERSAL_TAG
	SERVER_UNIVERSAL_TAG
	TUNNEL_INFO
	TRANSPORT_LAYER
	APPLICATION_LAYER
	CAPTURE_INFO
	CLIENT_CUSTOM_TAG
	SERVER_CUSTOM_TAG
	NATIVE_TAG
	METRICS
	K8S_LABEL
)
View Source
const (
	DefaultOtlpExportBatchCount = 32
	DefaultOtlpExportQueueCount = 4
	DefaultOtlpExportQueueSize  = 100000
)

Variables

View Source
var DefaultOtlpExportDataTypes = []string{"service_info", "tracing_info", "network_layer", "flow_info", "transport_layer", "application_layer", "metrics"}
View Source
var DefaultOtlpExportDatas = []string{"cbpf-net-span", "ebpf-sys-span"}

Functions

func ExportedDataBitsToString

func ExportedDataBitsToString(bits uint32) string

func ExportedDataTypeBitsToString

func ExportedDataTypeBitsToString(bits uint32) string

func StringToExportedData

func StringToExportedData(str string) uint32

func StringToExportedDataType

func StringToExportedDataType(str string) uint32

Types

type ExportersCfg

type ExportersCfg struct {
	Enabled bool `yaml:"enabled"`

	// global config, could be overridden by same fields under each exporter.
	OverridableCfg `yaml:",inline"`

	// OtlpExporter config for OTLP exporters
	OtlpExporterCfgs []OtlpExporterConfig `yaml:"otlp-exporters"`
}

ExporterCfg holds configs of different exporters.

func NewDefaultExportersCfg

func NewDefaultExportersCfg() ExportersCfg

func (*ExportersCfg) Validate

func (ec *ExportersCfg) Validate() error

type OtlpExporterConfig

type OtlpExporterConfig struct {
	Enabled          bool              `yaml:"enabled"`
	Addr             string            `yaml:"addr"`
	QueueCount       int               `yaml:"queue-count"`
	QueueSize        int               `yaml:"queue-size"`
	ExportBatchCount int               `yaml:"export-batch-count"`
	GrpcHeaders      map[string]string `yaml:"grpc-headers"`

	OverridableCfg `yaml:",inline"`
}

func NewOtlpDefaultConfig

func NewOtlpDefaultConfig() OtlpExporterConfig

func (*OtlpExporterConfig) Validate

func (cfg *OtlpExporterConfig) Validate(overridableCfg OverridableCfg) error

type OtlpExporterConfigDeprecated

type OtlpExporterConfigDeprecated struct {
	Enabled                     bool              `yaml:"enabled"`
	Addr                        string            `yaml:"addr"`
	QueueCount                  int               `yaml:"queue-count"`
	QueueSize                   int               `yaml:"queue-size"`
	ExportDatas                 []string          `yaml:"export-datas"`
	ExportDataTypes             []string          `yaml:"export-data-types"`
	ExportCustomK8sLabelsRegexp string            `yaml:"export-custom-k8s-labels-regexp"`
	ExportOnlyWithTraceID       bool              `yaml:"export-only-with-traceid"`
	ExportBatchCount            int               `yaml:"export-batch-count"`
	GrpcHeaders                 map[string]string `yaml:"grpc-headers"`
}

Preserved for backward compatibility ONLY

func NewOtlpDefaultConfigDeprecated

func NewOtlpDefaultConfigDeprecated() OtlpExporterConfigDeprecated

type OverridableCfg

type OverridableCfg struct {
	ExportDatas                 []string `yaml:"export-datas"`
	ExportDataBits              uint32   // generate from 'ExportDatas'
	ExportDataTypes             []string `yaml:"export-data-types"`
	ExportDataTypeBits          uint32   // generate from 'ExportDataTypes'
	ExportCustomK8sLabelsRegexp string   `yaml:"export-custom-k8s-labels-regexp"`
	ExportOnlyWithTraceID       *bool    `yaml:"export-only-with-traceid"`
}

Jump to

Keyboard shortcuts

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