-
Notifications
You must be signed in to change notification settings - Fork 0
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
Iter9 #8
Iter9 #8
Conversation
for to range
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.
Please add the codecov report
https://about.codecov.io/blog/getting-started-with-code-coverage-for-golang/
internal/agent/uploader/uploader.go
Outdated
@@ -94,3 +114,89 @@ func (u *Uploader) SendCounterMetrics(metrics map[string]int64) error { | |||
} | |||
return nil | |||
} | |||
|
|||
func (u *Uploader) sendMetricsJSON(url string, metrics metrics.Metrics) error { |
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.
It seems this function should work with data as bytes
internal/agent/uploader/uploader.go
Outdated
@@ -94,3 +114,89 @@ func (u *Uploader) SendCounterMetrics(metrics map[string]int64) error { | |||
} | |||
return nil | |||
} | |||
|
|||
func (u *Uploader) sendMetricsJSON(url string, metrics metrics.Metrics) error { |
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.
func (u *Uploader) sendMetricsJSON(url string, metrics metrics.Metrics) error { | |
func (u *Uploader) sendMetricsJSON(url string, metrics []byte) error { |
internal/agent/uploader/uploader.go
Outdated
} | ||
}() | ||
|
||
switch resp.Header.Get("Content-Encoding") { |
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.
It would be better if it is in a middleware
c.Set(logger, log) | ||
c.Next() | ||
|
||
if err := log.Sync(); err != nil && (!errors.Is(err, syscall.EBADF) && !errors.Is(err, syscall.ENOTTY)) { |
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 err := log.Sync(); err != nil && (!errors.Is(err, syscall.EBADF) && !errors.Is(err, syscall.ENOTTY)) { | |
if err := log.Sync(); err != nil { |
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.
Why do you need it?
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.
uber-go/zap#328
проблема zap sync на маке, но если не паниковать,то можно и без этого обойтись)
…for uoloader for client json requests
No description provided.