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

Change callback signatures to pass down context where applicable #247

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

jaronoff97
Copy link
Contributor

Changes a few server callback interface methods to pass down a context to propagate request information effectively. This closes #214

@jaronoff97 jaronoff97 requested a review from a team January 22, 2024 19:30
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (c8cc40b) 72.50% compared to head (c646c8d) 72.79%.

Files Patch % Lines
server/serverimpl.go 64.00% 9 Missing ⚠️
client/internal/receivedprocessor.go 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #247      +/-   ##
==========================================
+ Coverage   72.50%   72.79%   +0.28%     
==========================================
  Files          25       25              
  Lines        2022     2025       +3     
==========================================
+ Hits         1466     1474       +8     
+ Misses        446      442       -4     
+ Partials      110      109       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

srv.OnMessage = func(msg *protobufs.AgentToServer) *protobufs.ServerToAgent {
rcvAgentInstanceUid.Store(msg.InstanceUid)
if sentInvalidId.Load() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

codecov was complaining that this was untested, so i added something that forced an error for an empty string and then resolves it. This will trigger the error checking logic.

@tigrannajaryan tigrannajaryan merged commit 4d07a6a into open-telemetry:main Jan 23, 2024
5 of 6 checks passed
@jaronoff97 jaronoff97 deleted the more-context branch January 23, 2024 20:47
tigrannajaryan pushed a commit that referenced this pull request Jan 26, 2024
This is a follow up to #237 and #247, adding context propagation for client methods. 

**This involves a breaking change for the client interfaces**
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.

Allow callbacks to contain a context
4 participants