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

Add full request and response to the log message context #13

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

itsgoingd
Copy link
Contributor

Hey, this PR adds the request and response objects to the context of the log messages logged by the Transport class. This allows us to build more powerful log handlers with the ability to pull any info from the request and response objects instead of just using the predefined log message.

What is this good for? For example I've used this to build an integration with Clockwork that allows me to interactively inspect the request and response content.

Screenshot 2022-10-30 at 22 52 28

@cla-checker-service
Copy link

cla-checker-service bot commented Oct 30, 2022

💚 CLA has been signed

@ezimuel
Copy link
Contributor

ezimuel commented Dec 29, 2022

@itsgoingd sorry for the late reply and thanks for the PR it looks very interesting. I'll have a look and merge asap, I didn't know the Clockwork project, looks awesome!
In the meantime can you sign the CLA here, this is needed to merge the PR. Thanks!

@ezimuel ezimuel self-requested a review December 29, 2022 07:45
@ezimuel ezimuel added this to the 8.6.0 milestone Dec 29, 2022
@itsgoingd
Copy link
Contributor Author

Thanks, just signed the CLA. If this gets merged, I'd like to add a first-party support for Elasticsearch queries in Clockwork. :)

Copy link
Contributor

@ezimuel ezimuel 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!

@ezimuel ezimuel merged commit c02e2e8 into elastic:main Jan 11, 2023
@ezimuel
Copy link
Contributor

ezimuel commented Jan 11, 2023

Thanks @itsgoingd for this PR, I look forward to use Clockwork. Let me know if you need some help for more integrations.

@ezimuel
Copy link
Contributor

ezimuel commented Jan 12, 2023

@itsgoingd I just released 8.6.0 that includes your PR, thanks again for your help.

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