observability

package
v0.46.3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultLogURLTemplate is used to set the default log url template
	DefaultLogURLTemplate = ""

	// DefaultRequestLogTemplate is the default format for emitting request logs.
	DefaultRequestLogTemplate = `` /* 497-byte string literal not displayed */

	// ReqLogTemplateKey is the CM key for the request log template.
	RequestLogTemplateKey = "logging.request-log-template"

	// EnableReqLogKey is the CM key to enable request log.
	EnableRequestLogKey = "logging.enable-request-log"

	// EnableProbeReqLogKey is the CM key to enable request logs for probe requests.
	EnableProbeRequestLogKey = "logging.enable-probe-request-log"
)

Variables

This section is empty.

Functions

func WithConfig

func WithConfig(ctx context.Context, cfg *Config) context.Context

WithConfig associates a observability configuration with the context.

Types

type BaseConfig

type BaseConfig = pkgo11y.Config

type Config

type Config struct {
	BaseConfig

	RequestMetrics MetricsConfig `json:"requestMetrics"`

	// EnableVarLogCollection specifies whether the logs under /var/log/ should be available
	// for collection on the host node by the fluentd daemon set.
	//
	// We elide this value from JSON serialization because it's not relevant for
	// the queue proxy
	EnableVarLogCollection bool `json:",omitempty"`

	// LoggingURLTemplate is a string containing the logging url template where
	// the variable REVISION_UID will be replaced with the created revision's UID.
	//
	// We elide this value from JSON serialization because it's not relevant for
	// the queue proxy
	LoggingURLTemplate string `json:",omitempty"`

	// EnableRequestLog enables activator/queue-proxy to write request logs.
	EnableRequestLog bool `json:"enableRequestLog,omitempty"`

	// RequestLogTemplate is the go template to use to shape the request logs.
	RequestLogTemplate string `json:"requestLogTemplate,omitempty"`

	// EnableProbeRequestLog enables queue-proxy to write health check probe request logs.
	EnableProbeRequestLog bool `json:"enableProbeRequestLog,omitempty"`
}

+k8s:deepcopy-gen=true

func DefaultConfig

func DefaultConfig() *Config

func GetConfig

func GetConfig(ctx context.Context) *Config

GetConfig gets the observability config from the provided context.

func NewFromMap

func NewFromMap(m map[string]string) (*Config, error)

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Config) Validate

func (c *Config) Validate() error

type MetricsConfig

type MetricsConfig = pkgo11y.MetricsConfig

type RuntimeConfig

type RuntimeConfig = pkgo11y.RuntimeConfig

type TracingConfig

type TracingConfig = pkgo11y.TracingConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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