Skip to content

Avoid logging stack trace during expected remote-config exception#11328

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
masterfrom
sarahchen6/apms-19495
Jun 9, 2026
Merged

Avoid logging stack trace during expected remote-config exception#11328
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
masterfrom
sarahchen6/apms-19495

Conversation

@sarahchen6

@sarahchen6 sarahchen6 commented May 8, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Avoid logging the full stack trace during an expected remote-config exception. Instead log just the exception class and message.

Motivation

This exception occurs when the tracer's selector get closed mid-poll which is often the case when the pod is shutdown. Since this exception is expected, avoid logging a full stack trace and unnecessarily alarming users.

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

@sarahchen6 sarahchen6 requested a review from a team as a code owner May 8, 2026 17:28
@sarahchen6 sarahchen6 added the type: enhancement Enhancements and improvements label May 8, 2026
@sarahchen6 sarahchen6 requested review from dougqh and removed request for a team May 8, 2026 17:28
@sarahchen6 sarahchen6 added the comp: remote config Configuration at Runtime label May 8, 2026

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

Copy link
Copy Markdown

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: cd76457b77

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

} catch (Exception e) {
// no error can be reported, as we don't have the data client.state.targets_version avail
ratelimitedLogger.warn("Error parsing remote config response", e);
ratelimitedLogger.warn("Error parsing remote config response: {}", e.toString());

@dougqh dougqh May 8, 2026

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.

e.getMessage() might be better.

I'm also not sure if we still want to pass the exception somehow for exception metric reporting purposes. I've always thought we should have a helper that handles this better.

Something like warnExpected / warnQuielty?. Although, I guess use of a rateLimitedLogger is itself an indication that an exception is expected here.

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.

Also worth thinking about whether, all Exceptions are expecting or only a subset.

@sarahchen6 sarahchen6 May 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. It looks like ClosedSelectorExceptions are what's expected when selectors are closed mid-poll, so I'll update those exceptions specifically to use e.getMessage().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 0e6bdee!

@sarahchen6 sarahchen6 force-pushed the sarahchen6/apms-19495 branch from b22d2bc to 0e6bdee Compare May 8, 2026 17:42
@sarahchen6 sarahchen6 requested a review from dougqh May 18, 2026 17:43

@PerfectSlayer PerfectSlayer 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.

Left a minor comment

@dd-octo-sts

dd-octo-sts Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.87 s 13.96 s [-1.7%; +0.4%] (no difference)
startup:insecure-bank:tracing:Agent 12.82 s 13.01 s [-2.5%; -0.4%] (maybe better)
startup:petclinic:appsec:Agent 16.61 s 16.68 s [-1.5%; +0.7%] (no difference)
startup:petclinic:iast:Agent 15.72 s 16.94 s [-17.7%; +3.4%] (unstable)
startup:petclinic:profiling:Agent 16.74 s 16.83 s [-2.3%; +1.3%] (no difference)
startup:petclinic:sca:Agent 16.80 s 16.59 s [-0.1%; +2.6%] (no difference)
startup:petclinic:tracing:Agent 15.98 s 16.15 s [-2.8%; +0.8%] (no difference)

Commit: 44678dba · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@sarahchen6

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jun 9, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-06-09 12:04:47 UTC ℹ️ Start processing command /merge


2026-06-09 12:04:52 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-06-09 13:05:35 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit e5f383b into master Jun 9, 2026
572 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the sarahchen6/apms-19495 branch June 9, 2026 13:05
@github-actions github-actions Bot added this to the 1.64.0 milestone Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: remote config Configuration at Runtime type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants