elastic / apm-agent-python

https://www.elastic.co/guide/en/apm/agent/python/current/index.html
BSD 3-Clause "New" or "Revised" License
411 stars 217 forks source link

Limit the length for all fields #305

Open alvarolobato opened 5 years ago

alvarolobato commented 5 years ago

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.

basepi commented 4 years ago

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 commented 4 years ago

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.

trentm commented 2 years ago

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.)

basepi commented 2 years ago

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

basepi commented 2 years ago

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

basepi commented 2 years ago

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