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

Log Support in Attribute Processor (2/2) #1934

Merged

Conversation

zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Oct 10, 2020

Contains merge for #1830

extract common tests from span and log filtering

@codecov
Copy link

codecov bot commented Oct 10, 2020

Codecov Report

Merging #1934 into master will increase coverage by 0.03%.
The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1934      +/-   ##
==========================================
+ Coverage   91.49%   91.53%   +0.03%     
==========================================
  Files         282      283       +1     
  Lines       16631    16679      +48     
==========================================
+ Hits        15217    15267      +50     
+ Misses        978      975       -3     
- Partials      436      437       +1     
Impacted Files Coverage Δ
processor/attributesprocessor/factory.go 82.60% <80.95%> (-2.58%) ⬇️
processor/attributesprocessor/attributes_log.go 100.00% <100.00%> (ø)
processor/attributesprocessor/attributes_trace.go 90.90% <100.00%> (ø)
internal/data/testdata/log.go 100.00% <0.00%> (+1.86%) ⬆️
internal/processor/filterlog/filterlog.go 100.00% <0.00%> (+10.52%) ⬆️

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 96a4455...a3b9e16. Read the comment docs.

Copy link
Contributor

@keitwb keitwb left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for doing this @zeitlinger.

@tigrannajaryan
Copy link
Member

@zeitlinger can you please rebase from master so that changes from 1830 are not visible here?

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 22, 2020
This complements the trace span support already present.

It shares the same config struct to maintain backwards-compatibility with spans in the cleanest way possible.
@zeitlinger zeitlinger requested a review from a team October 22, 2020 12:45
@zeitlinger
Copy link
Member Author

@tigrannajaryan rebase done

@tigrannajaryan
Copy link
Member

@zeitlinger Can you please split the PR into 2 parts: the refactoring of the common tests for spans and logs and addition of logs support to attributes processor. This PR is big and difficult to follow because it moves large volumes of code between files and it is hard to see what is changed in the behavior.

@zeitlinger
Copy link
Member Author

zeitlinger commented Oct 22, 2020

@zeitlinger Can you please split the PR into 2 parts: the refactoring of the common tests for spans and logs and addition of logs support to attributes processor. This PR is big and difficult to follow because it moves large volumes of code between files and it is hard to see what is changed in the behavior.

@tigrannajaryan done - test refactoring is moved to #1997

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

Thank you @zeitlinger ! Nice PR and highly wanted feature addition.

@@ -47,6 +47,7 @@ func newSpanProcessor(config Config) (*spanProcessor, error) {
if err != nil {
return nil, err
}

Copy link
Member

Choose a reason for hiding this comment

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

Nit: delete unneeded change.

rss := td.ResourceSpans()
for i := 0; i < rss.Len(); i++ {
rs := rss.At(i)
if rs.IsNil() {
continue
}
resource := rs.Resource()
ilss := rss.At(i).InstrumentationLibrarySpans()
ilss := rs.InstrumentationLibrarySpans()
Copy link
Member

Choose a reason for hiding this comment

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

👍 for attention to details.

@tigrannajaryan tigrannajaryan merged commit 3a185c5 into open-telemetry:master Oct 26, 2020
tigrannajaryan pushed a commit that referenced this pull request Oct 29, 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.

5 participants