Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Jan 11, 2024
1 parent a9aed14 commit eba6c76
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions otelcol/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,18 @@ func (cfg *Config) Validate() error {
}
return fmt.Errorf("service::pipelines::%s: references exporter %q which is not configured", pipelineID, ref)
}

// Validate that pipelines contain valid components for the type
// of pipeline.
switch pipelineID.Type() {
case component.DataTypeTraces:
for _, ref := range pipeline.Receivers {
receiver := cfg.Receivers[ref]
// TODO: somehow get receiver to return component.ErrDataTypeIsNotSupported
}
case component.DataTypeMetrics:
case component.DataTypeLogs:
}
}
return nil
}

0 comments on commit eba6c76

Please sign in to comment.