telemetry

package
v0.0.0-...-cf1a61a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExporterNameForOtelOutput

func GetExporterNameForOtelOutput(output v1alpha1.OtelOutput) string

Types

type AttributesProcessor

type AttributesProcessor struct {
	Actions []AttributesProcessorAction `yaml:"actions"`
}

type AttributesProcessorAction

type AttributesProcessorAction struct {
	Action        string `yaml:"action"`
	Key           string `yaml:"key"`
	Value         string `yaml:"value,omitempty"`
	FromAttribute string `yaml:"from_attribute,omitempty"`
	FromContext   string `yaml:"from_context,omitempty"`
}

type CORSConfig

type CORSConfig struct {
	// AllowedOrigins sets the allowed values of the Origin header for
	// HTTP/JSON requests to an OTLP receiver. An origin may contain a
	// wildcard (*) to replace 0 or more characters (e.g.,
	// "http://*.domain.com", or "*" to allow any origin).
	AllowedOrigins []string `yaml:"allowed_origins"`

	// AllowedHeaders sets what headers will be allowed in CORS requests.
	// The Accept, Accept-Language, Content-Type, and Content-Language
	// headers are implicitly allowed. If no headers are listed,
	// X-Requested-With will also be accepted by default. Include "*" to
	// allow any request header.
	AllowedHeaders []string `yaml:"allowed_headers"`

	// MaxAge sets the value of the Access-Control-Max-Age response header.
	// Set it to the number of seconds that browsers should cache a CORS
	// preflight response for.
	MaxAge int `yaml:"max_age"`
}

CORSConfig configures a receiver for HTTP cross-origin resource sharing (CORS). See the underlying https://github.com/rs/cors package for details.

type CollectorReconciler

type CollectorReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

CollectorReconciler reconciles a Collector object

func (*CollectorReconciler) Reconcile

func (r *CollectorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*CollectorReconciler) SetupWithManager

func (r *CollectorReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type CountConnectorAttributeConfig

type CountConnectorAttributeConfig struct {
	Key          string `yaml:"key,omitempty"`
	DefaultValue string `yaml:"default_value,omitempty"`
}

type CountConnectorMetricInfo

type CountConnectorMetricInfo struct {
	Description string                          `yaml:"description,omitempty"`
	Conditions  []string                        `yaml:"conditions,omitempty"`
	Attributes  []CountConnectorAttributeConfig `yaml:"attributes,omitempty"`
}

type DeltatoCumulativeConfig

type DeltatoCumulativeConfig struct {
	MaxStale   time.Duration `yaml:"max_stale,omitempty"`
	MaxStreams int           `yaml:"max_streams,omitempty"`
}

type HTTPServerConfig

type HTTPServerConfig struct {
	// Endpoint configures the listening address for the server.
	Endpoint string `yaml:"endpoint,omitempty"`

	// TLSSetting struct exposes TLS client configuration.
	TLSSetting *TLSServerConfig `yaml:"tls,omitempty"`

	// CORS configures the server for HTTP cross-origin resource sharing (CORS).
	CORS *CORSConfig `yaml:"cors,omitempty"`

	// Auth for this receiver
	Auth *configauth.Authentication `yaml:"auth,omitempty"`

	// MaxRequestBodySize sets the maximum request body size in bytes
	MaxRequestBodySize int64 `yaml:"max_request_body_size,omitempty"`

	// IncludeMetadata propagates the client metadata from the incoming requests to the downstream consumers
	// Experimental: *NOTE* this option is subject to change or removal in the future.
	IncludeMetadata bool `yaml:"include_metadata,omitempty"`

	// Additional headers attached to each HTTP response sent to the client.
	// Header values are opaque since they may be sensitive.
	ResponseHeaders map[string]configopaque.String `yaml:"response_headers,omitempty"`
}

type OtelColConfigIR

type OtelColConfigIR struct {
	Receivers  map[string]any `yaml:"receivers,omitempty"`
	Exporters  map[string]any `yaml:"exporters,omitempty"`
	Processors map[string]any `yaml:"processors,omitempty"`
	Connectors map[string]any `yaml:"connectors,omitempty"`
	Services   Services       `yaml:"service,omitempty"`
}

func (*OtelColConfigIR) ToYAML

func (cfg *OtelColConfigIR) ToYAML() (string, error)

func (*OtelColConfigIR) ToYAMLRepresentation

func (cfg *OtelColConfigIR) ToYAMLRepresentation() ([]byte, error)

type OtelColConfigInput

type OtelColConfigInput struct {
	// These must only include resources that are selected by the collector, tenant labelselectors, and listed outputs in the subscriptions
	Tenants       []v1alpha1.Tenant
	Subscriptions map[v1alpha1.NamespacedName]v1alpha1.Subscription
	Outputs       []v1alpha1.OtelOutput
	MemoryLimiter v1alpha1.MemoryLimiter

	// Subscriptions map, where the key is the Tenants' name, value is a slice of subscriptions' namespaced name
	TenantSubscriptionMap map[string][]v1alpha1.NamespacedName
	SubscriptionOutputMap map[v1alpha1.NamespacedName][]v1alpha1.NamespacedName
	Debug                 bool
}

func (*OtelColConfigInput) ToIntermediateRepresentation

func (cfgInput *OtelColConfigInput) ToIntermediateRepresentation(ctx context.Context) *OtelColConfigIR

type Pipeline

type Pipeline struct {
	Receivers  []string `yaml:"receivers,omitempty,flow"`
	Processors []string `yaml:"processors,omitempty,flow"`
	Exporters  []string `yaml:"exporters,omitempty,flow"`
}

type Pipelines

type Pipelines struct {
	Traces         Pipeline            `yaml:"traces,omitempty"`
	Metrics        Pipeline            `yaml:"metrics,omitempty"`
	Logs           Pipeline            `yaml:"logs,omitempty"`
	NamedPipelines map[string]Pipeline `yaml:",inline,omitempty"`
}

type PrometheusExporterConfig

type PrometheusExporterConfig struct {
	HTTPServerConfig `yaml:",inline"`

	// Namespace if set, exports metrics under the provided value.
	Namespace string `yaml:"namespace,omitempty"`

	// ConstLabels are values that are applied for every exported metric.
	ConstLabels prometheus.Labels `yaml:"const_labels,omitempty"`

	// SendTimestamps will send the underlying scrape timestamp with the export
	SendTimestamps bool `yaml:"send_timestamps,omitempty"`

	// MetricExpiration defines how long metrics are kept without updates
	MetricExpiration time.Duration `yaml:"metric_expiration,omitempty"`

	// ResourceToTelemetrySettings defines configuration for converting resource attributes to metric labels.
	ResourceToTelemetrySettings resourcetotelemetry.Settings `yaml:"resource_to_telemetry_conversion,omitempty"`

	// EnableOpenMetrics enables the use of the OpenMetrics encoding option for the prometheus exporter.
	EnableOpenMetrics bool `yaml:"enable_open_metrics,omitempty"`

	// AddMetricSuffixes controls whether suffixes are added to metric names. Defaults to true.
	AddMetricSuffixes bool `yaml:"add_metric_suffixes,omitempty"`
}

type ResourceProcessor

type ResourceProcessor struct {
	Actions []ResourceProcessorAction `yaml:"attributes"`
}

type ResourceProcessorAction

type ResourceProcessorAction struct {
	Action        string `yaml:"action"`
	Key           string `yaml:"key"`
	Value         string `yaml:"value,omitempty"`
	FromAttribute string `yaml:"from_attribute,omitempty"`
	FromContext   string `yaml:"from_context,omitempty"`
}

type RouteReconciler

type RouteReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

CollectorReconciler reconciles a Collector object

func (*RouteReconciler) Reconcile

func (r *RouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*RouteReconciler) SetupWithManager

func (r *RouteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type RoutingConnector

type RoutingConnector struct {
	Name             string                      `yaml:"-"`
	DefaultPipelines []string                    `yaml:"default_pipelines,flow,omitempty"`
	Table            []RoutingConnectorTableItem `yaml:"table"`
}

func (*RoutingConnector) AddRoutingConnectorTableElem

func (rc *RoutingConnector) AddRoutingConnectorTableElem(newTableItem RoutingConnectorTableItem)

type RoutingConnectorTableItem

type RoutingConnectorTableItem struct {
	Statement string   `yaml:"statement"`
	Pipelines []string `yaml:"pipelines,flow"`
}

type Services

type Services struct {
	Extensions map[string]any `yaml:"extensions,omitempty"`
	Pipelines  Pipelines      `yaml:"pipelines,omitempty"`
	Telemetry  map[string]any `yaml:"telemetry,omitempty"`
}

type TLSServerConfig

type TLSServerConfig struct {
	// squash ensures fields are correctly decoded in embedded struct.
	v1alpha1.TLSSetting `yaml:",squash"`

	// Path to the TLS cert to use by the server to verify a client certificate. (optional)
	// This sets the ClientCAs and ClientAuth to RequireAndVerifyClientCert in the TLSConfig. Please refer to
	// https://godoc.org/crypto/tls#Config for more information. (optional)
	ClientCAFile string `yaml:"client_ca_file"`

	// Reload the ClientCAs file when it is modified
	// (optional, default false)
	ReloadClientCAFile bool `yaml:"client_ca_file_reload"`
}

type TenantFailedError

type TenantFailedError struct {
	// contains filtered or unexported fields
}

func (*TenantFailedError) Error

func (e *TenantFailedError) Error() string

Jump to

Keyboard shortcuts

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