Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added internal option to fully redact exceptions #3528

Merged
merged 8 commits into from Feb 15, 2024

Conversation

JonasKunz
Copy link
Contributor

@JonasKunz JonasKunz commented Feb 14, 2024

What does this PR do?

Adds a new, internal config option redact_exceptions. If enabled, application exceptions will be replaced with instances of RedactedExceptions with a stacktrace where the original exception would have been recorded.

The config option has been added with the name safe_exceptions with two flags:

  • 1 enables redacted exceptions
  • 2 changes the propagation to not use the servlet-attributes

This config option can be used to try to workaround JVM bugs related to touching exceptions.

I've tried to identify all places where the redaction needs to be applied by searching for reference of both Exception and Throwable: I've looked for method having those types as parameters and fields using those types.

Checklist

  • This is an enhancement of existing features, or a new feature in existing plugins
    • I have updated CHANGELOG.asciidoc
    • I have added tests that prove my fix is effective or that my feature works
    • Added an API method or config option? Document in which version this will be introduced
    • I have made corresponding changes to the documentation

@JonasKunz JonasKunz added the ci:agent-integration Enables agent integration tests in build pipeline label Feb 14, 2024
@github-actions github-actions bot added agent-java community Issues and PRs created by the community triage labels Feb 14, 2024
Copy link

👋 @JonasKunz Thanks a lot for your contribution!

It may take some time before we review a PR, so even if you don’t see activity for some time, it does not mean that we have forgotten about it.

Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming milestone. The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it.

@JonasKunz JonasKunz marked this pull request as ready for review February 14, 2024 12:04
@JonasKunz JonasKunz requested a review from a team February 14, 2024 13:57
@JonasKunz JonasKunz merged commit 770334b into elastic:main Feb 15, 2024
14 checks passed
@JonasKunz JonasKunz deleted the redact-exceptions branch February 15, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-java ci:agent-integration Enables agent integration tests in build pipeline community Issues and PRs created by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants