Skip to content
Discussion options

You must be logged in to vote

Hi @allenhumphreys

For more fine grained detail you could look at the trace extension... https://www.encode.io/httpcore/extensions/#trace

import httpx

def log(event_name, info):
    print(event_name, info)

client = httpx.Client()
resp = client.get("https://www.example.org/", extensions={"trace": log})

That's probably not really quite what you're looking for, but perhaps it'd be helpful?

I suppose the alternative might be adding an 'exception' event hook or something like that?

It'd also be interesting to take a look at what third party tracing packages exist for requests?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lovelydinosaur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants