[Error logs] Serialize meta.error if it is an instance of Error in JSON layout#244364
Merged
maryam-saeidi merged 2 commits intoelastic:mainfrom Nov 28, 2025
Merged
Conversation
rudolf
approved these changes
Nov 26, 2025
src/core/packages/logging/server-internal/src/layouts/json_layout.test.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
|
miguelmartin-elastic
approved these changes
Nov 26, 2025
Contributor
|
Starting backport for target branches: 8.19, 9.1, 9.2 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 28, 2025
…ON layout (elastic#244364) ## Summary In this PR, we serialize meta.error to only keep the relevant attributes (message, name, stack) if it is an instance of Error. ## Release note Fixes serialization of meta.error in JSON layouts: if the error is an Error instance, only message, name, and stack will be included — additional fields will no longer pollute the logs. --------- Co-authored-by: Rudolf Meijering <skaapgif@gmail.com> (cherry picked from commit 0a29908)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 28, 2025
…ON layout (elastic#244364) ## Summary In this PR, we serialize meta.error to only keep the relevant attributes (message, name, stack) if it is an instance of Error. ## Release note Fixes serialization of meta.error in JSON layouts: if the error is an Error instance, only message, name, and stack will be included — additional fields will no longer pollute the logs. --------- Co-authored-by: Rudolf Meijering <skaapgif@gmail.com> (cherry picked from commit 0a29908)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 28, 2025
…ON layout (elastic#244364) ## Summary In this PR, we serialize meta.error to only keep the relevant attributes (message, name, stack) if it is an instance of Error. ## Release note Fixes serialization of meta.error in JSON layouts: if the error is an Error instance, only message, name, and stack will be included — additional fields will no longer pollute the logs. --------- Co-authored-by: Rudolf Meijering <skaapgif@gmail.com> (cherry picked from commit 0a29908)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Nov 28, 2025
… in JSON layout (#244364) (#244660) # Backport This will backport the following commits from `main` to `9.1`: - [[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)](#244364) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2025-11-28T14:37:58Z","message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:all-open","v9.3.0"],"title":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout","number":244364,"url":"https://github.com/elastic/kibana/pull/244364","mergeCommit":{"message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244364","number":244364,"mergeCommit":{"message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232"}}]}] BACKPORT--> Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co> Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
kibanamachine
added a commit
that referenced
this pull request
Nov 28, 2025
… in JSON layout (#244364) (#244661) # Backport This will backport the following commits from `main` to `9.2`: - [[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)](#244364) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2025-11-28T14:37:58Z","message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:all-open","v9.3.0"],"title":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout","number":244364,"url":"https://github.com/elastic/kibana/pull/244364","mergeCommit":{"message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244364","number":244364,"mergeCommit":{"message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232"}}]}] BACKPORT--> Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co> Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
kibanamachine
added a commit
that referenced
this pull request
Nov 30, 2025
…r in JSON layout (#244364) (#244659) # Backport This will backport the following commits from `main` to `8.19`: - [[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)](#244364) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2025-11-28T14:37:58Z","message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:all-open","v9.3.0"],"title":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout","number":244364,"url":"https://github.com/elastic/kibana/pull/244364","mergeCommit":{"message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244364","number":244364,"mergeCommit":{"message":"[Error logs] Serialize meta.error if it is an instance of Error in JSON layout (#244364)\n\n## Summary\n\nIn this PR, we serialize meta.error to only keep the relevant attributes\n(message, name, stack) if it is an instance of Error.\n\n## Release note\n\nFixes serialization of meta.error in JSON layouts: if the error is an\nError instance, only message, name, and stack will be included —\nadditional fields will no longer pollute the logs.\n\n---------\n\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"0a29908b868014c88f269dc94adee7fdea5d1232"}}]}] BACKPORT--> Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co> Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
tkajtoch
pushed a commit
to tkajtoch/kibana
that referenced
this pull request
Dec 1, 2025
…ON layout (elastic#244364) ## Summary In this PR, we serialize meta.error to only keep the relevant attributes (message, name, stack) if it is an instance of Error. ## Release note Fixes serialization of meta.error in JSON layouts: if the error is an Error instance, only message, name, and stack will be included — additional fields will no longer pollute the logs. --------- Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
NicholasPeretti
pushed a commit
to NicholasPeretti/kibana
that referenced
this pull request
Dec 2, 2025
…ON layout (elastic#244364) ## Summary In this PR, we serialize meta.error to only keep the relevant attributes (message, name, stack) if it is an instance of Error. ## Release note Fixes serialization of meta.error in JSON layouts: if the error is an Error instance, only message, name, and stack will be included — additional fields will no longer pollute the logs. --------- Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
JordanSh
pushed a commit
to JordanSh/kibana
that referenced
this pull request
Dec 9, 2025
…ON layout (elastic#244364) ## Summary In this PR, we serialize meta.error to only keep the relevant attributes (message, name, stack) if it is an instance of Error. ## Release note Fixes serialization of meta.error in JSON layouts: if the error is an Error instance, only message, name, and stack will be included — additional fields will no longer pollute the logs. --------- Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In this PR, we serialize meta.error to only keep the relevant attributes (message, name, stack) if it is an instance of Error.
Release note
Fixes serialization of meta.error in JSON layouts: if the error is an Error instance, only message, name, and stack will be included — additional fields will no longer pollute the logs.