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

Make sd adapter less verbose on server error #16821

Merged
merged 4 commits into from
Sep 4, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
make sd adapter less verbose
  • Loading branch information
bianpengyuan committed Sep 4, 2019
commit d12483b742398e20ef39d18ebe37654298cd16dc
3 changes: 2 additions & 1 deletion mixer/adapter/stackdriver/metric/bufferedClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ func (b *buffered) Send() {
if err != nil {
ets := handleError(err, timeSeries)
b.updateRetryBuffer(ets)
_ = b.l.Errorf("Stackdriver returned: %v\nGiven data: %v", err, timeSeries)
_ = b.l.Errorf("Stackdriver returned: %v\n", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. special case "out of order" and maintain a count of how many data points were rejected.
    1a. I hope err is not a large error message.
  2. It is ok to print other errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is really not reliable to figure out error type based on message, but it might be ok since it only affects the log output.

Number of points that are affected could be found from error message itself. An example server error message. An example error message: Points must be written in order. One or more of the points specified had an older start time than the most recent point.: timeSeries[12,13,18,19,49,50]

Copy link
Contributor Author

@bianpengyuan bianpengyuan Sep 4, 2019

Choose a reason for hiding this comment

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

Added a bit more to the message about total time series sent in RPC.

b.l.Debugf("Given data: %v", timeSeries)
} else {
b.l.Debugf("Successfully sent data to Stackdriver.")
}
Expand Down