-
Notifications
You must be signed in to change notification settings - Fork 47
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
GO-3753 Add write to file #1617
Conversation
Coverage provided by https://github.com/seriousben/go-patch-cover-action |
b61e969
to
c43bf87
Compare
pkg/lib/global/global.go
Outdated
@@ -0,0 +1,4 @@ | |||
package global |
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.
should we choose a different name? common? shared?
root/
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.
environment
message SetParameters { | ||
message Request { | ||
option (no_auth) = true; | ||
string platform = 1; | ||
string version = 2; | ||
string workdir = 3; | ||
string logLevel = 4; | ||
bool doNotSendLogs = 5; |
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.
because we want to send logs by default
c43bf87
to
c694eac
Compare
core/metrics.go
Outdated
func (mw *Middleware) MetricsSetParameters(cctx context.Context, req *pb.RpcMetricsSetParametersRequest) *pb.RpcMetricsSetParametersResponse { | ||
response := func(code pb.RpcMetricsSetParametersResponseErrorCode, err error) *pb.RpcMetricsSetParametersResponse { | ||
m := &pb.RpcMetricsSetParametersResponse{Error: &pb.RpcMetricsSetParametersResponseError{Code: code}} | ||
func (mw *Middleware) SetInitialParams(cctx context.Context, req *pb.RpcInitialSetParametersRequest) *pb.RpcInitialSetParametersResponse { |
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.
instead of setmetricsparams
core/metrics.go
Outdated
errors.New("version is empty. Version must be in format: 1.0.0-optional-commit-hash-for-dev-builds")) | ||
} | ||
mw.applicationService.SetClientVersion(req.Platform, req.Version) | ||
|
||
metrics.Service.SetPlatform(req.Platform) | ||
metrics.Service.SetStartVersion(req.Version) | ||
logging.Init(req.Workdir, req.LogLevel, !req.DoNotSendLogs) |
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.
if workdir is empty we don't write the logs
if loglevel is empty we use defaultlog levels
if donotsend we don't send gelf
c443bd9
to
4060d85
Compare
46b837d
to
6a92ccb
Compare
4f17f5d
to
fdb5187
Compare
Add an opt-out for gelf Add an opt-out for telemetry
fdb5187
to
776e333
Compare
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?