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 ID metadata to gRPC calls, and use it in logs #248

Closed
carlosms opened this issue Sep 13, 2018 · 1 comment · Fixed by #359
Closed

Add ID metadata to gRPC calls, and use it in logs #248

carlosms opened this issue Sep 13, 2018 · 1 comment · Fixed by #359
Assignees
Labels
enhancement New feature or request

Comments

@carlosms
Copy link
Contributor

carlosms commented Sep 13, 2018

Currently the logs for actions started by a gRPC call initialized by an analyzer do not contain any information to link it to a specific event or PR. Maybe we can include some metadata to the NotifyReviewEvent call and have the analyzers send it back when they call GetChanges.

Context in #245 and #181:

The service/git methods now get the log from the context, but the problem here is that the gRPC requests come from the analyzer, and we don't have the event-id or any other field.
I didn't look much into it, so I don't know if there is a way to pass some ID fields to the analyzer and get them back when they call GetFiles/GetChanges without modifying the proto messages.

Grpc allows to send metadata in header or trailer. There are some helpers in go-grpc-middleware for that.
We can include it in our sdk later to pass event-id to an analyzer and send it back.

@carlosms carlosms self-assigned this Sep 14, 2018
@bzz
Copy link
Contributor

bzz commented Sep 18, 2018

As discussed today, it may be a good idea to put in backlog so @dpordomingo could take over this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants