Skip to content

Commit

Permalink
fix(internal): use correct max item size variable in log warning (#3210)
Browse files Browse the repository at this point in the history
fixes: #3209
  • Loading branch information
brettlangdon authored Feb 1, 2022
1 parent 78405d7 commit 665fed4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ddtrace/internal/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ def write(self, spans=None):
except BufferItemTooLarge as e:
payload_size = e.args[0]
log.warning(
"trace (%db) larger than payload buffer limit (%db), dropping",
"trace (%db) larger than payload buffer item limit (%db), dropping",
payload_size,
self._buffer_size,
self._encoder.max_item_size,
)
self._metrics_dist("buffer.dropped.traces", 1, tags=["reason:t_too_big"])
self._metrics_dist("buffer.dropped.bytes", payload_size, tags=["reason:t_too_big"])
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_single_trace_too_large(encoding, monkeypatch):
s.set_tag("a" * 10, "b" * 10)
t.shutdown()

calls = [mock.call("trace (%db) larger than payload buffer limit (%db), dropping", AnyInt(), AnyInt())]
calls = [mock.call("trace (%db) larger than payload buffer item limit (%db), dropping", AnyInt(), AnyInt())]
log.warning.assert_has_calls(calls)
log.error.assert_not_called()

Expand Down

0 comments on commit 665fed4

Please sign in to comment.