observability

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	policies.UnimplementedGenerator
	// contains filtered or unexported fields
}

Generator generates nginx configuration based on an observability policy.

func NewGenerator

func NewGenerator(telemetry dataplane.Telemetry) *Generator

NewGenerator returns a new instance of Generator.

func (Generator) GenerateForInternalLocation

func (g Generator) GenerateForInternalLocation(pols []policies.Policy) policies.GenerateResultFiles

GenerateForInternalLocation generates policy configuration for an internal location block. otel_span_attr and otel_span_name are set in the internal location, with otel_trace and otel_trace_context being specified in the external location that redirects to the internal location.

func (Generator) GenerateForLocation

func (g Generator) GenerateForLocation(pols []policies.Policy, location http.Location) policies.GenerateResultFiles

GenerateForLocation generates policy configuration for a normal location block. For a normal location, all directives are applied. When the configuration involves a normal location redirecting to an internal location, only otel_trace and otel_trace_context are applied to the normal location.

type Validator

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

Validator validates an ObservabilityPolicy. Implements policies.Validator interface.

func NewValidator

func NewValidator(genericValidator validation.GenericValidator) *Validator

NewValidator returns a new instance of Validator.

func (*Validator) Conflicts

func (v *Validator) Conflicts(polA, polB policies.Policy) bool

Conflicts returns true if the two ObservabilityPolicies conflict.

func (*Validator) Validate

func (v *Validator) Validate(
	policy policies.Policy,
	globalSettings *policies.GlobalSettings,
) []conditions.Condition

Validate validates the spec of an ObservabilityPolicy.

Jump to

Keyboard shortcuts

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