Skip to content

Filter out httpx logs #173

@maxmouchet

Description

@maxmouchet

httpx logs are too verbose, even at the INFO level, and pollute the logs with very long messages:

worker_1         | [2024-01-07 08:02:41,815] [PID 803] [Thread-4] [httpx] [INFO] HTTP Request: POST http://clickhouse:8123/?database=iris&enable_http_compression=true&query=%0A%20%20%20%20%20%20%20%20SELECT%0A%20%20%20%20%20%20%20%20%20%20%20%20current.probe_protocol%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20current.probe_dst_prefix%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20groupArray%28%28current.probe_ttl%2C%20current.cumulative_probes%2C%20previous.cumulative_probes%29%29%20AS%20probes_per_ttl%0A%20%20%20%20%20%20%20%20FROM%20probes__47ccf97f_363b_4793_ae1e_68921a7493d6__ddd8541d_b4f5_42ce_b163_e3e9bfcd0a47%20AS%20current%0A%20%20%20%20%20%20%20%20LEFT%20JOIN%20%28%0A%20%20%20%20%20%20%20%20%20%20%20%20SELECT%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20probe_protocol%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20probe_dst_prefix%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20probe_ttl%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20cumulative_probes%0A%20%20%20%20%20%20%20%20%20%20%20%20FROM%20probes__47ccf97f_363b_4793_ae1e_68921a7493d6__ddd8541d_b4f5_42ce_b163_e3e9bfcd0a47%0A%20%20%20%20%20%20%20%20%20%20%20%20WHERE%20%28probe_dst_prefix%20%3E%3D%20toIPv6%28%27%3A%3Affff%3Aca70%3A0%27%29%20AND%20probe_dst_prefix%20%3C%3D%20toIPv6%28%27%3A%3Affff%3Aca7f%3Affff%27%29%29%20AND%20round%20%3D%203%0A%20%20%20%20%20%20%20%20%29%20AS%20previous%0A%20%20%20%20%20%20%20%20ON%20current.probe_protocol%20%3D%20previous.probe_protocol%0A%20%20%20%20%20%20%20%20AND%20current.probe_dst_prefix%20%3D%20previous.probe_dst_prefix%0A%20%20%20%20%20%20%20%20AND%20current.probe_ttl%20%3D%20previous.probe_ttl%0A%20%20%20%20%20%20%20%20WHERE%20%28%28%28probe_dst_prefix%20%3E%3D%20toIPv6%28%27%3A%3Affff%3Aca70%3A0%27%29%20AND%20probe_dst_prefix%20%3C%3D%20toIPv6%28%27%3A%3Affff%3Aca7f%3Affff%27%29%29%20AND%20probe_ttl%20%3C%3D%20255%29%20AND%20round%20%3D%204%29%0A%20%20%20%20%20%20%20%20GROUP%20BY%20%28current.probe_protocol%2C%20current.probe_dst_prefix%29%0A%20%20%20%20%20%20%20%20&limit=0&offset=0&default_format=JSONEachRow&output_format_json_quote_64bit_integers=0 "HTTP/1.1 200 OK"

The Python logger should be configured to filter out these logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions