Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture request body in ASP.NET Full Framework #379

Closed
SergeyKleyman opened this issue Jul 17, 2019 · 8 comments · Fixed by #1806
Closed

Capture request body in ASP.NET Full Framework #379

SergeyKleyman opened this issue Jul 17, 2019 · 8 comments · Fixed by #1806

Comments

@SergeyKleyman
Copy link
Contributor

Derived from #213,

@katzdan
Copy link
Contributor

katzdan commented Jul 17, 2019

Hi @SergeyKleyman ,

I can start working on this one. I might need some guidance though.
I'm assuming that the implementation should be identical to what's written in the docs (https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#capture-body).

@SergeyKleyman
Copy link
Contributor Author

Here are the links to all other Elastic APM agents that already have this feature implemented (I've taken them from Elastic APM Backend Agent Config Comparison spreadsheet)

I would recommend to start with the requirements for this feature by going over other agents' documentation for this feature to make sure requirements for .NET agent align with the other agents.

@gregkalapos
Copy link
Contributor

@katzdan it's totally fine if you start with this, just some thoughts:

Our ASP.NET Core part is more advanced, and the ASP.NET Full Framework project is not yet released. So #213 is maybe a better candidate to make it into production sooner - also writing tests is I think simpler for that case - although for Full Framework we already also have a nice setup, but it maybe needs more learning, the ASP.NET Core tests are simpler in-process tests.

@katzdan
Copy link
Contributor

katzdan commented Jul 17, 2019

I'll start with #213 then. Thanks.

@andrewharry
Copy link

Can you consider including redacting requirement? I often have business requirements to ensure sensitive data such as credit cards are not accidentally logged.

This could be as simple as some kind of regex replacement...

@gregkalapos
Copy link
Contributor

Can you consider including redacting requirement? I often have business requirements to ensure sensitive data such as credit cards are not accidentally logged.

This could be as simple as some kind of regex replacement...

@andrewharry thanks for the input.

That'd be covered by #300. We already have an ongoing PR by @katzdan. I'd say in the first round we won't do it - just to reduce the scope and make sure that at least some part of the feature lands soon. In #300 we'll come back to it.

@Sarabjit-Tatra
Copy link

@gregkalapos - I would like to work on this so want to understand if someone has already submitted their work for it or not ?
If no one has yet submitted their work on this than based on code review it seems we have Elastic.Apm.AspNetFullFramework project which is created for ASP.Net Full framework application's instrumentation and ElasticApmModule.cs is having code related to monitoring of ProcessBeginRequest which seems to right point to investigate it further, so let me know if I am in right direction for this ?

@gregkalapos
Copy link
Contributor

I would like to work on this so want to understand if someone has already submitted their work for it or not ?

Awesome! So far there is no PR for this, so feel free to work on it.

based on code review it seems we have Elastic.Apm.AspNetFullFramework project which is created for ASP.Net Full framework application's instrumentation and ElasticApmModule.cs is having code related to monitoring of ProcessBeginRequest which seems to right point to investigate it further, so let me know if I am in right direction for this ?

Yes, that's all correct - so ElasticApmModule.cs is a good entry point for this feature. ElasticApmModule.cs is basically an IIS module we use for capturing requests for ASP.NET Classic.

The same feature (capturing request body) already exists for ASP.NET Core. Here you can see how it works in that case. There are 2 configs related to this feature - docs here and here.

Just ping me if you have any question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants