elastic / apm-agent-dotnet

https://www.elastic.co/guide/en/apm/agent/dotnet/current/index.html
Apache License 2.0
585 stars 208 forks source link

Config for RequestBodyMaxLength #1359

Open fuzolan opened 3 years ago

fuzolan commented 3 years ago

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.

gregkalapos commented 3 years ago

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

sean-jost commented 6 months ago

Have a need for this in .net agent. Would be nice if we can get long_string_max_length implemented, as defined in elastic/apm#488.