feat: improve dropped point logging#26257
Conversation
coordinator/points_writer.go
Outdated
| if s.Dropped() <= 0 { | ||
| return "" | ||
| } | ||
| return fmt.Sprintf("dropped %d points outside retention policy and %d points outside write window: %s to %s", |
There was a problem hiding this comment.
Do we want to include the retention policy and/or write window bounds in the summary? Might make debugging customer issues easier, especially if their retention or write window is now what they think it is.
There was a problem hiding this comment.
DroppedPoint.String() prints that information, so we get it for the max and min points.
Log the reason for a point being dropped, the type of boundary violated, and the time that was the boundary. Prints the maximum and minimum points (by time) that were dropped closes #26252
a885a1f to
e10e9ca
Compare
| atomic.AddInt64(&w.stats.SubWriteOK, 1) | ||
|
|
||
| if err == nil && len(shardMappings.Dropped) > 0 { | ||
| err = tsdb.PartialWriteError{Reason: "points beyond retention policy or outside permissible write window", |
There was a problem hiding this comment.
The new code would have an error message of "dropped %d points outside retention policy of duration". I assume this message is what the client will receive. Any risk of this breaking any client libraries or C1 alerting?
There was a problem hiding this comment.
In theory, it could break picky client code, but my hope is that people are switching on the 4XX HTTP error, not the message text.
Log the reason for a point being dropped, the type of boundary violated, and the time that was the boundary. Prints the maximum and minimum points (by time) that were dropped closes #26252 * fix: better time formatting and additional testing * fix: differentiate point time boundary violations * chore: clean up switch statement * fix: improve error messages (cherry picked from commit 62e803e) closes #26295
Log the reason for a point being dropped, the type of boundary violated, and the time that was the boundary. Prints the maximum and minimum points (by time) that were dropped closes #26252 * fix: better time formatting and additional testing * fix: differentiate point time boundary violations * chore: clean up switch statement * fix: improve error messages (cherry picked from commit 62e803e)
Log the reason for a point being dropped,
the type of boundary violated, and the
time that was the boundary. Prints the
maximum and minimum points (by time)
that were dropped
closes #26252