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

Fix translation from otlp.Request to pdata representation #5197

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

bogdandrutu
Copy link
Member

The problem that this PR tries to fix, is that changes in the traces object return by the otlp.Request are not reflected in the Request.

The solution is to wrap the request proto instead of the data proto, since for the marshalers we don't have an equivalent object that shares the same problem as Request.

Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com

@bogdandrutu bogdandrutu force-pushed the fixtopdata branch 2 times, most recently from 52752a9 to 1ca333e Compare April 12, 2022 22:04
@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #5197 (b0345ca) into main (698fbae) will increase coverage by 0.02%.
The diff coverage is 97.56%.

@@            Coverage Diff             @@
##             main    #5197      +/-   ##
==========================================
+ Coverage   90.35%   90.38%   +0.02%     
==========================================
  Files         188      187       -1     
  Lines       11055    11087      +32     
==========================================
+ Hits         9989    10021      +32     
  Misses        841      841              
  Partials      225      225              
Impacted Files Coverage Δ
pdata/plog/json.go 85.00% <80.00%> (+0.78%) ⬆️
pdata/ptrace/json.go 85.00% <80.00%> (+0.78%) ⬆️
pdata/internal/logs.go 87.17% <100.00%> (+5.69%) ⬆️
pdata/internal/metrics.go 88.69% <100.00%> (+1.31%) ⬆️
pdata/internal/traces.go 84.61% <100.00%> (+6.83%) ⬆️
pdata/plog/pb.go 100.00% <100.00%> (ø)
pdata/plog/plogotlp/logs.go 49.01% <100.00%> (ø)
pdata/pmetric/json.go 100.00% <100.00%> (ø)
pdata/pmetric/pb.go 100.00% <100.00%> (ø)
pdata/pmetric/pmetricotlp/metrics.go 53.19% <100.00%> (ø)
... and 2 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 698fbae...b0345ca. Read the comment docs.

Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

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

LGTM

@bogdandrutu bogdandrutu force-pushed the fixtopdata branch 2 times, most recently from f3f16eb to 26f14a0 Compare April 13, 2022 00:13
@bogdandrutu bogdandrutu marked this pull request as ready for review April 13, 2022 00:13
@bogdandrutu bogdandrutu requested review from a team and codeboten April 13, 2022 00:13
The problem that this PR tries to fix, is that changes in the traces object return by the otlp.Request are not reflected in the Request.

The solution is to wrap the request proto instead of the data proto, since for the marshalers we don't have an equivalent object that shares the same problem as Request.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@bogdandrutu bogdandrutu merged commit 70e040a into open-telemetry:main Apr 14, 2022
@bogdandrutu bogdandrutu deleted the fixtopdata branch April 14, 2022 17:52
Nicholaswang pushed a commit to Nicholaswang/opentelemetry-collector that referenced this pull request Jun 7, 2022
…etry#5197)

The problem that this PR tries to fix, is that changes in the traces object return by the otlp.Request are not reflected in the Request.

The solution is to wrap the request proto instead of the data proto, since for the marshalers we don't have an equivalent object that shares the same problem as Request.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
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.

2 participants