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

Add configsource component #2720

Merged
merged 19 commits into from
Mar 23, 2021

Conversation

pjanotti
Copy link
Contributor

@pjanotti pjanotti commented Mar 16, 2021

Why

Adding an internal ConfigSource component. This makes the initial exploration of config sources interfaces/usage/implementation possible, related doc.

What

Description:

  • Added the new, internal, component type, ConfigSource, that can inject data into a configuration.

Link to related Issue:
#2469

@pjanotti pjanotti requested a review from a team March 16, 2021 22:22
@codecov
Copy link

codecov bot commented Mar 16, 2021

Codecov Report

Merging #2720 (481a89f) into main (26fc241) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2720   +/-   ##
=======================================
  Coverage   91.80%   91.80%           
=======================================
  Files         290      290           
  Lines       15553    15553           
=======================================
  Hits        14279    14279           
  Misses        876      876           
  Partials      398      398           

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 26fc241...481a89f. Read the comment docs.

component/configsource.go Outdated Show resolved Hide resolved
config/configmodels/configsource.go Outdated Show resolved Hide resolved
config/configmodels/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
component/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
component/configsource.go Outdated Show resolved Hide resolved
component/configsource.go Outdated Show resolved Hide resolved
component/configsource.go Outdated Show resolved Hide resolved
component/configsource.go Outdated Show resolved Hide resolved
component/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/configsource/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/component/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/component/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/component/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/component/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/configsource.go Outdated Show resolved Hide resolved
go.sum Outdated Show resolved Hide resolved
@owais
Copy link
Contributor

owais commented Mar 17, 2021

@pjanotti Do we expect to have one instance of a configsource per collector instance or one instance per config item. For example, given the following config:

config_sources:
    cfgsrc:

receivers:
  $cfgsrc: { key: "rcvr_sub_section" }

exporter:
  $cfgsrc: { key: "exp_sub_section" }

will the collector create one or two instances of cfgsrc config source.

@pjanotti
Copy link
Contributor Author

Reducing the scope of this PR by removing parsing implementation. This way we can focus on the interface of the config sources.

// See the License for the specific language governing permissions and
// limitations under the License.

package component
Copy link
Member

Choose a reason for hiding this comment

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

For the moment I would put everything in configsource package.

config/internal/configsource/component/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/component/configsource.go Outdated Show resolved Hide resolved
config/internal/configsource/component/configsource.go Outdated Show resolved Hide resolved
@bogdandrutu
Copy link
Member

@pjanotti please update PR description to reflect what is in this PR

config/internal/configsource/component.go Outdated Show resolved Hide resolved
@bogdandrutu bogdandrutu merged commit c31e762 into open-telemetry:main Mar 23, 2021
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
* Add test for custom collectd plugin

* fix linting issues

* simplify the test to skip if running outside of containers
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants