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 grpc diagnostic #3394
Add grpc diagnostic #3394
Conversation
@@ -88,7 +88,7 @@ const ( | |||
// Tracee offers aggregation and filtering support on top of any logger implementation complying to it's interface. | |||
type LoggingConfig struct { | |||
Logger LoggerInterface | |||
loggerConfig LoggerConfig | |||
LoggerConfig LoggerConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this refactoring, but it had to be done because flags create a LoggingConfig, and if this field wasn't exposed it would be nil, generating a panic when you change the log level. But it is weird to allow the user to create a struct but have methods depending on it, we should enforce it by perhaps having these fields private and a constructor function. Nonetheless, I'll create a separate issue to handle this refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, in the future, using a constructor with options pattern.
5ea7017
to
6f01cca
Compare
6f01cca
to
6030550
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -88,7 +88,7 @@ const ( | |||
// Tracee offers aggregation and filtering support on top of any logger implementation complying to it's interface. | |||
type LoggingConfig struct { | |||
Logger LoggerInterface | |||
loggerConfig LoggerConfig | |||
LoggerConfig LoggerConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, in the future, using a constructor with options pattern.
1. Explain what the PR does
This PR is part of the work to support a v1 for GRPC. This PR implements the diagnostic rpc service. I've tested with
-race
no data races were found here.2. Explain how to test it
The below clients can be used to test the GRPC API:
3. Other comments
depends on #3395