temporalio / temporalio/ui

Access logs for HTTP response 200 with `"error":""` (empty string). Should not include the error key at all

Open
#1,206 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
431
Forks
179
Avg merge
2d 9h
Merged PRs (30d)
71

Description

Is your feature request related to a problem? Please describe.

We visualize our logs with Grafana (via Loki and promtail).

Access logs looks like this

{"time":"2023-03-09T09:19:34.757983797Z","id":"","status":200,"error":"","remote_ip":"MASKED","host":"MASKED","method":"GET","uri":"/api/v1/namespaces/MASKEDtask-queues/SAIT-POLLER-SNMP-PRIMARY?taskQueueType=1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36","latency":6827916,"latency_human":"6.827916ms","bytes_in":0,"bytes_out":49}

This will be colored RED in Grafana, which I assume happens because there's an error key in the json.
As the http status was 200 and the error value was "" (empty string); could you possibly stop filling in the error key?

If you do this, I will not have to learn how to configure Loki/Promtail/Grafana to deal with this myself 😄

Describe the solution you'd like

Do not print "error":"" at all for access logs where the http answer is in the 200 range.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies no source file, test, or entry point for access-log generation. Start by locating the code that serializes HTTP access logs and reproduce a successful 200 response; done means 200-range logs omit the error key while other relevant errors remain represented, with tests covering the JSON output.

Written by the indexing model from the issue text.

Assessment

Tech stack
grafana, typescript
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.