-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract builder for pipelines components into one struct #5542
Conversation
a6f56e8
to
3720160
Compare
Codecov Report
@@ Coverage Diff @@
## main #5542 +/- ##
==========================================
+ Coverage 90.94% 90.96% +0.01%
==========================================
Files 191 192 +1
Lines 11375 11397 +22
==========================================
+ Hits 10345 10367 +22
Misses 807 807
Partials 223 223
Continue to review full report at Codecov.
|
3720160
to
27820f5
Compare
|
||
// StartAll starts all pipelines. | ||
// | ||
// Start with exporters, processors (in revers configured order), then receivers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revers -> reverse
} | ||
|
||
// Build builds all pipelines from config. | ||
func Build(ctx context.Context, telemetry component.TelemetrySettings, buildInfo component.BuildInfo, cfg *config.Config, factories component.Factories) (*BuiltPipelines, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels weird to pass both component.TelemetrySettings
and service.Config
as arguments, given that the config struct has service.ConfigServiceTelemetry
within it. I definitely want to be able to customize the component.TelemetrySettings
for my use case, and I think several other people have expressed their need for this, so not passing the telemetry structs in some way does not feel like an option. Some possibilities are:
- Move
service.ConfigServiceTelemetry
out of its current location in the configuration. I think this is not a realistic option if it affects the YAML, since it will break too many things, but we could do it with a custom unmarshaling function if we want to go this way. - Do a 'telemetry provider' kind of thing. It makes this somewhat more clunky to use for e.g. my use case, but maybe it's the way to go?
- Do nothing and just document it; accept that we can't change it and that we have this weirdness in the API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will address this issue separately, I am planning to actually send only what is needed (no telemetry settings).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 , yeah, thinking about this later, the Extensions
field is also a problem, so probably we can just send exactly what we need
Signed-off-by: Bogdan Drutu <[email protected]>
27820f5
to
930fc5c
Compare
Signed-off-by: Bogdan Drutu [email protected]