mirror of
https://github.com/hanzoai/otel-collector.git
synced 2026-10-30 18:26:25 +00:00
- Go module: github.com/SigNoz/signoz-otel-collector → github.com/hanzoai/otel-collector - All signoz-prefixed packages → o11y-prefixed - Docker: signoz/* → ghcr.io/hanzoai/otel-collector - ClickHouse exporter → Hanzo Datastore - Env vars: SIGNOZ_* → HANZO_* - Directory renames for all processor/receiver/exporter packages
33 lines
887 B
Go
33 lines
887 B
Go
// Brought in as is from logstransform processor in opentelemetry-collector-contrib
|
|
package o11ylogspipelineprocessor
|
|
|
|
import (
|
|
"errors"
|
|
|
|
o11ylogspipelinestanzaadapter "github.com/hanzoai/otel-collector/processor/o11ylogspipelineprocessor/stanza/adapter"
|
|
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator"
|
|
"go.opentelemetry.io/collector/component"
|
|
)
|
|
|
|
type Config struct {
|
|
o11ylogspipelinestanzaadapter.BaseConfig `mapstructure:",squash"`
|
|
}
|
|
|
|
var _ component.Config = (*Config)(nil)
|
|
|
|
func (cfg *Config) Validate() error {
|
|
if len(cfg.BaseConfig.Operators) == 0 {
|
|
return errors.New("no operators were configured for o11ylogspipeline processor")
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (cfg *Config) OperatorConfigs() []operator.Config {
|
|
ops := []operator.Config{}
|
|
|
|
for _, op := range cfg.BaseConfig.Operators {
|
|
ops = append(ops, operator.Config(op))
|
|
}
|
|
return ops
|
|
}
|