Documentation
¶
Overview ¶
Package catalog provides a catalog-based metric transformer that routes metrics to registered specialized transformers.
The catalog transformer orchestrates multiple specialized transformers to provide automatic routing based on metric characteristics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transformer ¶
type Transformer struct {
// contains filtered or unexported fields
}
Transformer implements types.MetricTransformer using a catalog of specialized transformers.
Each transformer in the catalog processes all metrics sequentially. Transformers identify which metrics they can handle and transform those while passing through others unchanged.
func NewTransformer ¶
func NewTransformer(transformers ...types.MetricTransformer) *Transformer
NewTransformer creates a new catalog transformer with the provided specialized transformers.
Transformers are applied sequentially - each transformer receives all metrics and decides which ones to transform based on implementation-specific logic (e.g., metric name patterns).
func (*Transformer) Transform ¶
func (t *Transformer) Transform(ctx context.Context, metrics []types.Metric) ([]types.Metric, error)
Transform processes metrics by routing them sequentially through specialized transformers.
Processing flow:
- Pass metrics through first transformer
- Pass results through second transformer
- Continue until all transformers have processed the metrics
This implements the types.MetricTransformer interface.