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

Config for RequestBodyMaxLength

Open fuzolan opened this issue 3 years ago • 2 comments

The fixed value of 2048 could be rather limiting. Is there a technical issue, to capture bigger bodies? If I'm not misstaken, the java client has a bigger limit here.

It would be really nice, if this would be a config parameter for the client.

fuzolan avatar Jul 27 '21 08:07 fuzolan

Is there a technical issue, to capture bigger bodies?

No there isn't - by looking at the PR which introduces it, it seems it was an arbitrary choice. We definitely want limit this and not capture super long bodies, but the 2k limit isn't based on some specific thing.

If I'm not mistaken, the java client has a bigger limit here.

Correct, they use a 10K limit.

It would be really nice, if this would be a config parameter for the client.

Java has the same ask: https://github.com/elastic/apm-agent-java/issues/456

So, as a next step I opened https://github.com/elastic/apm-agent-dotnet/pull/1368 - if that gets merged the limit will be 10K in the next release.

I also leave this open and try to propose a cross agent setting to give users the option to change the limit. (fyi: if we introduce a setting then preferably we'd do that across all agents and not just for .NET).

https://github.com/elastic/apm-agent-java/issues/456

gregkalapos avatar Aug 03 '21 15:08 gregkalapos