blocky icon indicating copy to clipboard operation
blocky copied to clipboard

[Request] Create` upstream` field in the logs

Open yellowhat opened this issue 2 years ago • 4 comments

Hi, consider the following example from the logs:

{
    "answer": "AAAA (2a00:1450:400f:800::2003)",
    "client_ip": "192.168.178.22",
    "client_names": "test",
    "duration_ms": 29,
    "hostname": "blocky-7dd7f4b47f-9n2lj",
    "level": "info",
    "msg": "query resolved",
    "prefix": "queryLog",
    "question_name": "ssl.gstatic.com.",
    "question_type": "AAAA",
    "response_code": "NOERROR",
    "response_reason": "RESOLVED (https://unicast.uncensoreddns.org/dns-query)",
    "response_type": "RESOLVED",
    "time": "2023-04-01T09:10:36Z"
}

I am not sure why response_reason contains response_type, is there a case where they can be different?

Apart that it would be great if the upstream used for the dns resolution has it is own field, like:

    "response_upstream": "https://unicast.uncensoreddns.org/dns-query",
    "response_type": "RESOLVED"

It would simplify the data parsing for that specific field.

Thanks

yellowhat avatar Apr 01 '23 09:04 yellowhat

Those fields aren't really connected. response_reason is a human readable message response_type is an enum which control some internal handling of the response

Simply splitting them isn't reasonable. Adding another field for upstream should be doable even if it would be empty most of the time (blocked and cached responses have no upstream).

kwitsch avatar Apr 01 '23 11:04 kwitsch

Adding another field would be great.

Thanks

yellowhat avatar Apr 01 '23 14:04 yellowhat

Looked at this quickly.

Do you think it's a good idea to add a more generic field, something like "responder", which could in the future serve for other things like the group that blocked a request?
I guess it depends on if we want those to be separate for metrics and db queries. What do you think is best?

ThinkChaos avatar Jul 05 '23 21:07 ThinkChaos

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 30 '24 04:06 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jul 05 '24 04:07 github-actions[bot]