Skip to content

feat: ensure statusCode is included in router logs#19668

Open
jtuglu1 wants to merge 2 commits into
apache:masterfrom
jtuglu1:add-status-code-to-router-logs
Open

feat: ensure statusCode is included in router logs#19668
jtuglu1 wants to merge 2 commits into
apache:masterfrom
jtuglu1:add-status-code-to-router-logs

Conversation

@jtuglu1

@jtuglu1 jtuglu1 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

We rely on query logs for observability, operations. Currently the only source of query status code on the router is in the metric emitted by the router. We should make sure it's emitted as part of the query log as well.

Release note

Ensures that the statusCode dimension is included in router logs for better historical analysis.


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@jtuglu1 jtuglu1 added this to the 38.0.0 milestone Jul 8, 2026
@jtuglu1 jtuglu1 requested a review from maytasm July 9, 2026 00:30

@kfaraz kfaraz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

int metricStatusCode
) throws IOException
{
if (isSqlQuery) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like this method is always being called for SQL queries only.

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.

Reviewed 2 of 2 changed files.


This is an automated review by Codex GPT-5.5

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.

3 participants