hasura / hasura/graphql-engine
Wrong datatype in log json field
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v2.0.10
### Environment
Kubernetes 1.19
### What is the expected behaviour?
Same datatype in same field.
### Keywords
log detail json field
### What is the current behaviour?
The log object from server has field _detail_ which`s value is sometimes string and sometimes json object.
### Screenshots or Screencast
```
{"type":"http-log","timestamp":"2021-12-21T12:23:35.625+0000","level":"info","detail":{"operation":{"query_execution_time":8.9198e-4,"user_vars":{"x-hasura-role":"admin"},"request_id":"5eb9dd04-f69d-4753-bb51-bdad4625fe73","response_size":64,"request_mode":"single","request_read_time":3.97e-6},"request_id":"5eb9dd04-f69d-4753-bb51-bdad4625fe73","http_info":{"status":200,"http_version":"HTTP/1.1","url":"/v1/graphql","ip":"10.xxx.107.555","method":"POST","content_encoding":"gzip"}}}
{"type":"unstructured","timestamp":"2021-12-21T12:23:36.627+0000","level":"info","detail":"Thread pollQuery.PollerId {unPollerId = b1299e03-2e78-4a57-bc0d-0a750fd0a8ff} (re)started"}
```
### Any possible solutions?
is possible to change behavior to use always same datatype for field?
Contributor guide
Research direction
No source file, test, or entry point is named. Start by locating the server's JSON logging path for the detail field and compare the supplied http-log and unstructured examples. Done means the field uses one consistent datatype, with coverage for both log types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100