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

[pkg/stanza] Extract a reader factory #12135

Merged

Conversation

djaglowski
Copy link
Member

@djaglowski djaglowski commented Jul 6, 2022

This PR localizes Reader-related configuration settings and clarifies Reader instantiation patterns.

  • Removes circular reference from Reader to Input struct.
  • Pulls all Reader-related static configuration values into a single shared struct called readerConfig.
  • Pulls Reader creation logic into a readerBuilder to unify logic.
  • Introduces a readerFactory with constructors for the various specific use cases in this codebase. The factory then configures and runs a builder to produce the expected result.

@djaglowski djaglowski added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jul 11, 2022
@djaglowski djaglowski marked this pull request as ready for review July 11, 2022 19:23
@djaglowski djaglowski requested a review from a team as a code owner July 11, 2022 19:23
@djaglowski djaglowski merged commit ec809ba into open-telemetry:main Jul 12, 2022
@djaglowski djaglowski deleted the pkg-stanza-reader-factory branch July 12, 2022 17:42
atoulme pushed a commit to atoulme/opentelemetry-collector-contrib that referenced this pull request Jul 16, 2022
ag-ramachandran referenced this pull request in ag-ramachandran/opentelemetry-collector-contrib Sep 15, 2022
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.

None yet

3 participants