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

feat(dotnet, node, php, python): exclude OPTIONS requests from being logged #1070

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

AndriiAndreiev
Copy link
Collaborator

🚥 Resolves #58

🧰 Changes

Add a middleware checks for skipping OPTIONS requests

Copy link
Member

@gratcliff gratcliff left a comment

Choose a reason for hiding this comment

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

@AndriiAndreiev can we add unit and integration tests for these changes?

@@ -39,6 +42,9 @@ def before_request(self):
self.config.LOGGER.exception(e)

def after_request(self, response):
if request.method == "OPTIONS":
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to get here in the request lifecycle when it's an OPTIONS call?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gratcliff @erunion i've added some tests for this feature and made some minor changes

@AndriiAndreiev AndriiAndreiev changed the title feat(dotnet, node, php, python): exclude OPTIONS requests from being logger feat(dotnet, node, php, python): exclude OPTIONS requests from being logged Sep 2, 2024
@gratcliff gratcliff merged commit 642c293 into main Sep 3, 2024
45 checks passed
@gratcliff gratcliff deleted the feat/exclude-options-requests branch September 3, 2024 23:53
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.

Exclude OPTIONS requests from being logged
2 participants