Skip to content
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

Merged
merged 1 commit into from
Jun 19, 2022

Conversation

bogdandrutu
Copy link
Member

Signed-off-by: Bogdan Drutu [email protected]

@bogdandrutu bogdandrutu requested review from a team and codeboten June 15, 2022 14:43
@bogdandrutu bogdandrutu added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jun 15, 2022
@bogdandrutu
Copy link
Member Author

/cc @mx-psi this is the third PR extracted from #5512

@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #5542 (930fc5c) into main (e77f3d4) will increase coverage by 0.01%.
The diff coverage is 71.84%.

@@            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              
Impacted Files Coverage Δ
service/service.go 55.55% <0.00%> (+9.40%) ⬆️
service/internal/pipelines/pipelines.go 72.63% <72.63%> (ø)
service/host.go 100.00% <100.00%> (ø)
service/zpages.go 68.08% <100.00%> (-7.96%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e77f3d4...930fc5c. Read the comment docs.


// StartAll starts all pipelines.
//
// Start with exporters, processors (in revers configured order), then receivers.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revers -> reverse

service/internal/pipelines/pipelines.go Outdated Show resolved Hide resolved
service/internal/pipelines/pipelines.go Outdated Show resolved Hide resolved
service/internal/pipelines/pipelines.go Outdated Show resolved Hide resolved
}

// 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) {
Copy link
Member

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:

  1. 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.
  2. 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?
  3. Do nothing and just document it; accept that we can't change it and that we have this weirdness in the API

Copy link
Member Author

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).

Copy link
Member

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

@bogdandrutu bogdandrutu merged commit 0545c98 into open-telemetry:main Jun 19, 2022
@bogdandrutu bogdandrutu deleted the createpipelines branch June 19, 2022 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants