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 connector validation to otelcol #7001

Merged

Conversation

djaglowski
Copy link
Member

Part of #6700

This PR finishes adding connectors to the otelcol config including validation. Validation for connectors is the same as with other components, except two additional checks are included:

  1. That each connector is used as an exporter in at least one pipeline, and also as a receiver in at least one pipeline.
  2. That each connector ID is distinct from receivers and exporters. (Depends on decision on Add Config method to pipeline component builders #6927 (comment))

@djaglowski djaglowski added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jan 23, 2023
@djaglowski djaglowski force-pushed the connectors-otelcol-validation branch from 058104f to 362ed2d Compare January 23, 2023 21:52
@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Base: 90.38% // Head: 90.37% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (2db6b73) compared to base (3a0a3c5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7001      +/-   ##
==========================================
- Coverage   90.38%   90.37%   -0.01%     
==========================================
  Files         243      243              
  Lines       14575    14597      +22     
==========================================
+ Hits        13173    13192      +19     
- Misses       1133     1136       +3     
  Partials      269      269              
Impacted Files Coverage Δ
otelcol/collector.go 77.44% <100.00%> (+0.17%) ⬆️
otelcol/config.go 96.66% <100.00%> (+1.58%) ⬆️
extension/extension.go 97.61% <0.00%> (-2.39%) ⬇️
exporter/exporter.go 99.00% <0.00%> (-1.00%) ⬇️
receiver/receiver.go 99.00% <0.00%> (-1.00%) ⬇️
processor/processor.go 99.00% <0.00%> (-1.00%) ⬇️
connector/connector.go 99.58% <0.00%> (-0.42%) ⬇️
component/component.go 38.63% <0.00%> (+0.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@djaglowski djaglowski marked this pull request as ready for review January 23, 2023 22:11
@djaglowski djaglowski requested review from a team and jpkrohling January 23, 2023 22:11
Copy link
Member

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

LGTM, just perhaps one error message could be improved.

otelcol/config.go Outdated Show resolved Hide resolved
Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>
@djaglowski djaglowski force-pushed the connectors-otelcol-validation branch from 60ef9f6 to 2db6b73 Compare January 24, 2023 18:22
@bogdandrutu bogdandrutu merged commit 0d9c455 into open-telemetry:main Jan 24, 2023
@djaglowski djaglowski deleted the connectors-otelcol-validation branch January 24, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:connector 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