apm-agent-python icon indicating copy to clipboard operation
apm-agent-python copied to clipboard

Limit the length for all fields

Open alvarolobato opened this issue 7 years ago • 6 comments

All fields should be limited to KEYWORD_MAX_LENGTH, with the exception of the fields noted in the long fields spec, which should be limited to a length of 10000. Optionally, we can make the latter limit configurable, as stated in the spec.

alvarolobato avatar Oct 23 '18 12:10 alvarolobato

I think this is enforced for most things at this point.

Obviously any keyword fields are already shortened.

@beniwohli I think with the age of this issue I'm going to close it as resolved. If we do run into any more issues I suppose we could write a processor that would shorten everything -- but that's probably not a precise-enough instrument, since different things need to be shortened differently. Keep me posted if you think there's still work to do here.

basepi avatar Oct 07 '20 16:10 basepi

Just kidding. Found some more conversation in the cross-agent meta issue, I guess this is still in flux despite the issue-open date. Pardon my noise.

basepi avatar Oct 07 '20 17:10 basepi

https://github.com/elastic/apm/blob/main/specs/agents/field-limits.md#long_field_max_length-configuration was spec'd a while ago. That covers a specific set of fields. (The Node.js APM agent truncates other fields at 1024.)

trentm avatar Aug 11 '22 20:08 trentm

LONG_FIELD_MAX_LENGTH introduced in #1610 and added to Django's capture_body. First of many places.

basepi avatar Aug 12 '22 19:08 basepi

Length of exception message field limited in https://github.com/elastic/apm-agent-python/pull/1619

basepi avatar Aug 18 '22 22:08 basepi

Length of Starlette bodies limited in https://github.com/elastic/apm-agent-python/pull/1549

basepi avatar Aug 29 '22 15:08 basepi