Skip to content

2.32.3.9

Latest
Compare
Choose a tag to compare
@u-ways u-ways released this 17 Dec 09:55

What's Changed

  • feat: Introduce support for response_source attribute by @u-ways in #27

Details

The HTTP log record will now include a new attribute, response_source. It will try to collect it from the X_SOURCE_HEADER if that cannot be found, it will rely on the request.url host (and port) values.

record.response_source = response.headers.get(X_SOURCE_HEADER, None)

if record.response_source is None:
    try:
        record.response_source = urlparse(response.request.url).netloc
    except ValueError:
        record.response_source = "UNKNOWN"

Full Changelog: 2.32.3.8...2.32.3.9