Skip to content

Audit Logs Levels - Obs Ux Logs Team#218413

Merged
awahab07 merged 8 commits intoelastic:mainfrom
awahab07:observability-de-4373-Audit-Log-Levels_Obs-Ux-Logs-Team
May 7, 2025
Merged

Audit Logs Levels - Obs Ux Logs Team#218413
awahab07 merged 8 commits intoelastic:mainfrom
awahab07:observability-de-4373-Audit-Log-Levels_Obs-Ux-Logs-Team

Conversation

@awahab07
Copy link
Contributor

@awahab07 awahab07 commented Apr 16, 2025

The PR audits and fixes the log levels for the followings plugins based on the guidelines.

  • logs-explorer (deleted)
  • x-pack/solutions/observability/plugins/observability_logs_explorer
    • It's juat a wrapper so no uses of .error, .warn or .info
  • x-pack/solutions/observability/plugins/observability_onboarding
    • Only one instance of .error which looks correct
    • There are instances of fixable .error and .info but those are under e2e directory.
  • x-pack/platform/plugins/shared/data_quality
    • It's juat a wrapper so no uses of .error, .warn or .info
  • x-pack/platform/plugins/shared/data_quality
    • Fixed in this PR
  • x-pack/platform/plugins/shared/fields_metadata
    • No occurrences of .error, .warn or .info
  • x-pack/platform/plugins/shared/logs_data_access
    • No occurrences of .error, .warn or .info
  • x-pack/platform/plugins/shared/logs_shared
    • Only .debug instances

@awahab07 awahab07 requested a review from a team as a code owner April 16, 2025 11:19
@awahab07 awahab07 requested a review from a team April 16, 2025 11:19
@awahab07 awahab07 added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor labels Apr 16, 2025
@awahab07 awahab07 self-assigned this Apr 16, 2025
if (errorStatusCode >= 500) {
logger.error(errorMessage);
} else if (errorStatusCode < 500 && errorStatusCode >= 400) {
logger.warn(errorMessage);
Copy link
Member

Choose a reason for hiding this comment

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

Hey @awahab07, based on the discussion in the meeting, shall we not log 4xx errors for now since it is not actionable for us?

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be beneficial to have this logic more centralised in a shared plugin or it's better to define it within the plugins?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

shall we not log 4xx errors for now

Sounds good, I'll adjust logging accordingly.

Would it be beneficial to have this logic more centralised in a shared plugin or it's better to define it within the plugins?

Absolutely, having it central would be ideal. In fact there's an issue #198681 which covers that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maryam-saeidi any suggestions how 4xx should be logged then, logged as debug or not logged at all?

Copy link
Member

@maryam-saeidi maryam-saeidi Apr 30, 2025

Choose a reason for hiding this comment

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

For now, having it as debug sounds good to me until we work on #198681 or https://github.com/elastic/observability-dev/issues/4374.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

cc @awahab07

Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed left a comment

Choose a reason for hiding this comment

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

LGTM!

@awahab07 awahab07 merged commit cf2091d into elastic:main May 7, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.18, 8.19, 9.0

https://github.com/elastic/kibana/actions/runs/14886395864

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 7, 2025
The PR audits and fixes the log levels for Dataset Quality plugin based on [guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).

(cherry picked from commit cf2091d)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 7, 2025
The PR audits and fixes the log levels for Dataset Quality plugin based on [guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).

(cherry picked from commit cf2091d)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 7, 2025
The PR audits and fixes the log levels for Dataset Quality plugin based on [guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).

(cherry picked from commit cf2091d)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 7, 2025
The PR audits and fixes the log levels for Dataset Quality plugin based on [guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).

(cherry picked from commit cf2091d)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.17
8.18
8.19
9.0

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 May 7, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [Audit Logs Levels - Obs Ux Logs Team
(#218413)](#218413)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Abdul Wahab
Zahid","email":"awahab07@yahoo.com"},"sourceCommit":{"committedDate":"2025-05-07T14:48:54Z","message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"Audit
Logs Levels - Obs Ux Logs
Team","number":218413,"url":"https://github.com/elastic/kibana/pull/218413","mergeCommit":{"message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218413","number":218413,"mergeCommit":{"message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b"}}]}]
BACKPORT-->

Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
kibanamachine added a commit that referenced this pull request May 7, 2025
# Backport

This will backport the following commits from `main` to `9.0`:
- [Audit Logs Levels - Obs Ux Logs Team
(#218413)](#218413)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Abdul Wahab
Zahid","email":"awahab07@yahoo.com"},"sourceCommit":{"committedDate":"2025-05-07T14:48:54Z","message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"Audit
Logs Levels - Obs Ux Logs
Team","number":218413,"url":"https://github.com/elastic/kibana/pull/218413","mergeCommit":{"message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218413","number":218413,"mergeCommit":{"message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b"}}]}]
BACKPORT-->

Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
kibanamachine added a commit that referenced this pull request May 7, 2025
# Backport

This will backport the following commits from `main` to `8.17`:
- [Audit Logs Levels - Obs Ux Logs Team
(#218413)](#218413)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Abdul Wahab
Zahid","email":"awahab07@yahoo.com"},"sourceCommit":{"committedDate":"2025-05-07T14:48:54Z","message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"Audit
Logs Levels - Obs Ux Logs
Team","number":218413,"url":"https://github.com/elastic/kibana/pull/218413","mergeCommit":{"message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218413","number":218413,"mergeCommit":{"message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b"}}]}]
BACKPORT-->

Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
kibanamachine added a commit that referenced this pull request May 7, 2025
# Backport

This will backport the following commits from `main` to `8.18`:
- [Audit Logs Levels - Obs Ux Logs Team
(#218413)](#218413)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Abdul Wahab
Zahid","email":"awahab07@yahoo.com"},"sourceCommit":{"committedDate":"2025-05-07T14:48:54Z","message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"Audit
Logs Levels - Obs Ux Logs
Team","number":218413,"url":"https://github.com/elastic/kibana/pull/218413","mergeCommit":{"message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218413","number":218413,"mergeCommit":{"message":"Audit
Logs Levels - Obs Ux Logs Team (#218413)\n\nThe PR audits and fixes the
log levels for Dataset Quality plugin based on
[guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).","sha":"cf2091d5dca8aea47bec12ee14678382b36f9d1b"}}]}]
BACKPORT-->

Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
The PR audits and fixes the log levels for Dataset Quality plugin based on [guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).
qn895 pushed a commit to qn895/kibana that referenced this pull request Jun 3, 2025
The PR audits and fixes the log levels for Dataset Quality plugin based on [guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes v8.17.7 v8.18.2 v8.19.0 v9.0.2 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants