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 factory and new-style config for Batch processor #53

Merged
merged 1 commit into from
Jun 25, 2019

Conversation

tigrannajaryan
Copy link
Member

This is part of remaining migration to new configuration format.

  • Added zap.Logger to ProcessorFactory functions because it is
    needed by this processor (and can be used if needed in other processors
    in the future).

  • Added Name/SetName to Processor interface because it is
    needed by this processor (this now also makes Processor uniform with
    Receiver and Exporter interfaces).

Github issue: #52

Testing done: make

@@ -69,6 +69,7 @@ type Exporters map[string]Exporter
// Processor is the configuration of a processor. Specific processors must implement this
// interface and will typically embed ProcessorSettings struct or a struct that extends it.
type Processor interface {
NamedEntity
Copy link
Member

Choose a reason for hiding this comment

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

Where is this used?

Copy link
Member Author

Choose a reason for hiding this comment

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

SetName() is called in internal/configv2/configv2.go. The name is used in internal/collector/processor/nodebatcher/factory.go

Copy link
Member

Choose a reason for hiding this comment

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

I see, thanks for clarifying.

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

The usual minor nit.

internal/collector/processor/nodebatcher/config.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Jun 25, 2019

Codecov Report

Merging #53 into master will decrease coverage by 0.13%.
The diff coverage is 91.83%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #53      +/-   ##
=========================================
- Coverage   69.43%   69.3%   -0.14%     
=========================================
  Files          85      85              
  Lines        5558    5567       +9     
=========================================
- Hits         3859    3858       -1     
- Misses       1480    1489       +9     
- Partials      219     220       +1
Impacted Files Coverage Δ
internal/factories/factories.go 100% <ø> (ø) ⬆️
internal/configv2/example_factories.go 55.33% <ø> (ø) ⬆️
internal/configmodels/configmodels.go 0% <0%> (ø) ⬆️
...nternal/collector/processor/nodebatcher/factory.go 100% <100%> (ø)
cmd/occollector/app/builder/pipelines_builder.go 92.72% <100%> (ø) ⬆️
internal/configv2/configv2.go 98.64% <100%> (ø) ⬆️
processor/addattributesprocessor/factory.go 100% <100%> (ø) ⬆️
internal/collector/processor/queued/options.go 23.68% <0%> (-36.85%) ⬇️
cmd/occollector/app/collector/collector.go 80.92% <0%> (-1.4%) ⬇️
internal/collector/processor/queued/factory.go
... and 3 more

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 38f1390...fb146b9. Read the comment docs.

This is part of remaining migration to new configuration format.

- Added zap.Logger to ProcessorFactory functions because it is
needed by this processor (and can be used if needed in other processors
in the future).

- Added Name/SetName to Processor interface because it is
needed by this processor (this now also makes Processor uniform with
Receiver and Exporter interfaces).

Github issue: open-telemetry#52

Testing done: make
@pjanotti pjanotti merged commit 5553892 into open-telemetry:master Jun 25, 2019
@tigrannajaryan tigrannajaryan deleted the feature/tigran/batch branch June 26, 2019 00:58
pjanotti referenced this pull request in pjanotti/opentelemetry-service Jun 27, 2019
* Return immediately if the first message doesn't
have a non-nil Node. Previously we leniently
spun 15 times as a best case retry but that's
unnecessary
* If the first message is valid and has spans, those
spans MUST be consumed and NOT discarded.

Fixes #51
Fixes #53
@flands flands added this to the 0.1.0 milestone Jun 28, 2019
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
swiatekm pushed a commit to swiatekm/opentelemetry-collector that referenced this pull request Oct 9, 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