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

Update filter processor to use pdata #1885

Merged
merged 5 commits into from
Oct 5, 2020
Merged

Update filter processor to use pdata #1885

merged 5 commits into from
Oct 5, 2020

Conversation

pmcollins
Copy link
Member

Updated filter processor to use pdata rather than OC. There's still some OC stuff in filter_processor_test.go, but am hoping that can be updated in a separate change.

Also replaced a benchmark test with a new one. (The previous benchmark test failed with a nil pointer.) The new benchmark test has the following results:

4233112 ns/op before this change
837378 ns/op after this change

@codecov
Copy link

codecov bot commented Sep 30, 2020

Codecov Report

Merging #1885 into master will increase coverage by 0.03%.
The diff coverage is 97.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1885      +/-   ##
==========================================
+ Coverage   91.30%   91.34%   +0.03%     
==========================================
  Files         280      281       +1     
  Lines       16628    16687      +59     
==========================================
+ Hits        15183    15242      +59     
  Misses       1011     1011              
  Partials      434      434              
Impacted Files Coverage Δ
processor/filterprocessor/filter_processor.go 90.47% <88.23%> (+1.58%) ⬆️
internal/processor/filtermetric/filtermetric.go 100.00% <100.00%> (ø)
processor/filterprocessor/metric_index.go 100.00% <100.00%> (ø)

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 322e8dc...8c1fa43. Read the comment docs.

processor/filterprocessor/filter_processor.go Outdated Show resolved Hide resolved
processor/filterprocessor/filter_processor.go Outdated Show resolved Hide resolved
processor/filterprocessor/filter_processor.go Outdated Show resolved Hide resolved
@james-bebbington
Copy link
Member

4233112 ns/op before this change
837378 ns/op after this change

Nice 😄

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

This is a good solution for the moment, we should maybe think in the future to add helpers filter[Metrics|Logs|Spans] in the future that allows to do this in-place.

@bogdandrutu bogdandrutu merged commit e5058dd into open-telemetry:master Oct 5, 2020
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
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.

3 participants