Documentation ¶
Overview ¶
Package transform provides some intermediate nodes that might filter/process/transform the events
Index ¶
- Constants
- func ConvertToSpan(in <-chan []any, out chan<- []HTTPRequestSpan)
- func KubeDecoratorProvider(_ context.Context, cfg KubernetesDecorator) (node.MiddleFunc[[]HTTPRequestSpan, []HTTPRequestSpan], error)
- func RoutesProvider(_ context.Context, rc *RoutesConfig) (node.MiddleFunc[[]HTTPRequestSpan, []HTTPRequestSpan], error)
- type EventType
- type HTTPRequestSpan
- type KubeEnableFlag
- type KubernetesDecorator
- type MetadataTag
- type RoutesConfig
- type Timings
- type UnmatchType
Constants ¶
View Source
const ( EnabledTrue = KubeEnableFlag("true") EnabledFalse = KubeEnableFlag("false") EnabledAutodetect = KubeEnableFlag("autodetect") EnabledDefault = EnabledFalse )
View Source
const ( // UnmatchUnset leaves the Route field as empty UnmatchUnset = UnmatchType("unset") // UnmatchPath sets the Route field to the same values as the Path UnmatchPath = UnmatchType("path") // UnmatchWildcard sets the route field to a generic asterisk symbol UnmatchWildcard = UnmatchType("wildcard") UnmatchDefault = UnmatchWildcard )
Variables ¶
This section is empty.
Functions ¶
func ConvertToSpan ¶
func ConvertToSpan(in <-chan []any, out chan<- []HTTPRequestSpan)
func KubeDecoratorProvider ¶
func KubeDecoratorProvider(_ context.Context, cfg KubernetesDecorator) (node.MiddleFunc[[]HTTPRequestSpan, []HTTPRequestSpan], error)
func RoutesProvider ¶
func RoutesProvider(_ context.Context, rc *RoutesConfig) (node.MiddleFunc[[]HTTPRequestSpan, []HTTPRequestSpan], error)
Types ¶
type HTTPRequestSpan ¶
type HTTPRequestSpan struct { Type EventType ID uint64 Method string Path string Route string Peer string Host string HostPort int Status int ContentLength int64 RequestStart int64 Start int64 End int64 ServiceName string Metadata []MetadataTag TraceID string }
HTTPRequestSpan contains the information being submitted by the following nodes in the graph. It enables comfortable handling of data from Go.
func (*HTTPRequestSpan) Inside ¶
func (s *HTTPRequestSpan) Inside(parent *HTTPRequestSpan) bool
func (*HTTPRequestSpan) Timings ¶
func (s *HTTPRequestSpan) Timings() Timings
type KubeEnableFlag ¶
type KubeEnableFlag string
type KubernetesDecorator ¶
type KubernetesDecorator struct { Enable KubeEnableFlag `yaml:"enable" env:"KUBE_METADATA_ENABLE"` // KubeconfigPath is optional. If unset, it will look in the usual location. KubeconfigPath string `yaml:"kubeconfig_path" env:"KUBE_METADATA_KUBECONFIG_PATH"` InformersSyncTimeout time.Duration `yaml:"informers_sync_timeout" env:"KUBE_INFORMERS_SYNC_TIMEOUT"` }
func (KubernetesDecorator) Enabled ¶
func (d KubernetesDecorator) Enabled() bool
type MetadataTag ¶
type RoutesConfig ¶
type RoutesConfig struct { // Unmatch specifies what to do when a route pattern is not matched Unmatch UnmatchType `yaml:"unmatch"` // Patterns of the paths that will match to a route Patterns []string `yaml:"patterns"` }
RoutesConfig allows grouping URLs sharing a given pattern.
type UnmatchType ¶
type UnmatchType string
UnmatchType defines which actions to do when a route pattern is not recognized
Click to show internal directories.
Click to hide internal directories.