Skip to content

Conversation

@maquchizi
Copy link
Collaborator

  • This will allow us to parse logs better in Grafana

@maquchizi maquchizi requested a review from a team January 29, 2026 07:48
Copy link
Member

@kilemensi kilemensi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@maquchizi
Copy link
Collaborator Author

@codex review

@kilemensi Codex doesn't want to cooperate. Perhaps it needs some set up for this repo?

@kilemensi
Copy link
Member

@codex review

@kilemensi
Copy link
Member

@codex review

@kilemensi Codex doesn't want to cooperate. Perhaps it needs some set up for this repo?

Yeah, https://github.com/CodeForAfrica/ghost wasn't connected @maquchizi . Should be good now.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0cdf36cf85

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

server_name {{ .NOSSL_SERVER_NAME }};

access_log /var/log/nginx/{{ .APP }}-access.log;
access_log /var/log/nginx/{{ .APP }}-access.log json;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid mixed access log formats in same file

This server block now writes JSON to /var/log/nginx/{{ .APP }}-access.log, but the HTTPS server block below still writes to the same file without the json format. In deployments where HTTPS handles most traffic, the access log will therefore mix JSON and default log lines, which breaks JSON-only parsing (e.g., in Grafana) or drops entries. If the goal is to switch to JSON logs, the 443 access_log should use the same json format or a separate file.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG! This is actually a good catch. I forgot to change the format in the HTTPS block.

Copy link

@VinneyJ VinneyJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
What about adding upstream_response_time?

@maquchizi
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@maquchizi
Copy link
Collaborator Author

LGTM. What about adding upstream_response_time?

@VinneyJ We can add the upstream stuff at a later point if needed. Better to have only the relevant metrics for our current use case.

@maquchizi maquchizi merged commit 8fb5e8b into main Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants