Skip to content

Fix the CaptureBody in AspNetCore#2623

Merged
stevejgordon merged 9 commits into
mainfrom
fix_captureBody_broken_aspnet
Aug 18, 2025
Merged

Fix the CaptureBody in AspNetCore#2623
stevejgordon merged 9 commits into
mainfrom
fix_captureBody_broken_aspnet

Conversation

@JeremyBessonElastic
Copy link
Copy Markdown
Contributor

Fix the CaptureBody in AspNetCore.

Related to the issue #2029

Fix the CaptureBody in AspNetCore.

Related to the issue #2029
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 9, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@stevejgordon stevejgordon force-pushed the fix_captureBody_broken_aspnet branch from 11687b1 to a1f2f44 Compare August 12, 2025 08:05
Copy link
Copy Markdown
Contributor

@stevejgordon stevejgordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JeremyBessonElastic. A few possible changes. Also, are we able to add/update a test/integration test for ASP.NET Core to validate this and avoid future regressions?

Comment thread src/integrations/Elastic.Apm.AspNetCore/AspNetCoreHttpRequest.cs
Comment thread src/integrations/Elastic.Apm.AspNetCore/AspNetCoreHttpRequest.cs Outdated
Comment thread src/Elastic.Apm/Extensions/TransactionExtensions.cs Outdated
@JeremyBessonElastic
Copy link
Copy Markdown
Contributor Author

Thanks @JeremyBessonElastic. A few possible changes. Also, are we able to add/update a test/integration test for ASP.NET Core to validate this and avoid future regressions?

I have added integration tests for the 8 cases:
CaptureBody in {all, transactions, errors, off} and success request (200) or failure request (500)

Copy link
Copy Markdown
Contributor

@stevejgordon stevejgordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating and adding the tests. A couple of small nits for consistency and I think we're good.

Comment thread test/integrations/Elastic.Apm.AspNetCore.Tests/BodyCapturingTests.cs Outdated
Comment thread test/integrations/Elastic.Apm.AspNetCore.Tests/BodyCapturingTests.cs Outdated
Copy link
Copy Markdown
Contributor

@stevejgordon stevejgordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants