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

Option for dropping the log body if log was parsed #551

Closed
a-thaler opened this issue Jul 24, 2023 · 5 comments
Closed

Option for dropping the log body if log was parsed #551

a-thaler opened this issue Jul 24, 2023 · 5 comments
Assignees
Labels
area/logs LogPipeline kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@a-thaler
Copy link
Collaborator

a-thaler commented Jul 24, 2023

Description
A LogPipeline tries to parse a log payload if the payload is in a structured JSON format and then enriches the log record with the parsed entries using the same attribute keys as in the JSON, see also https://kyma-project.io/docs/kyma/latest/01-overview/telemetry/telemetry-02-logs#kubernetes-filter-json-parser

So if the payload is not in JSON you will have the log attribute with the payload.
If the payload is in JSON you will have the log attribute with the payload and additional all parsed JSON root attributes, including the actual log message.

With that approach, you will have the content of the payload actually duplicated for the advantage of having the same log attribute consistently available across all log records.

If that behaviour is not wanted in order to save storage/bandwith, there should be a new flag in the LogPipeline API to disable the duplication, for example like:

spec:
  output:
      http:
        keepBody: true

To stay compatible, the flag should be introduced first being enabled, so that all existing clusters will have it persisted. In a follow-up ticket the flag will get switched to be disabled by default.

Criterias

  • As a user I have an option per pipeline to disable keeping the log body
  • When setting the flag, the log body will not be part of the log data anymore in case it was successfully parsed as JSON document
  • The flag is documented
  • The flag is available in the dashboard UI

Reasons
Log payloads are being duplicated when they are in JSON. That causes unneeded bandwith/storage/performance increase and leads to polluted log records.

Attachments

@a-thaler a-thaler changed the title [Telemetry] [Telemetry] flag for dropping the log body if log was parsed Jul 24, 2023
@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 22, 2023
@a-thaler a-thaler removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 22, 2023
@a-thaler a-thaler transferred this issue from kyma-project/kyma Nov 20, 2023
@a-thaler a-thaler added kind/feature Categorizes issue or PR as related to a new feature. area/logs LogPipeline and removed area/logging labels Nov 20, 2023
@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 19, 2024
@a-thaler a-thaler removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 19, 2024
@a-thaler a-thaler changed the title [Telemetry] flag for dropping the log body if log was parsed Option for dropping the log body if log was parsed Feb 26, 2024
Copy link

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs.
Thank you for your contributions.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 27, 2024
@a-thaler a-thaler removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 29, 2024
Copy link

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs.
Thank you for your contributions.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 29, 2024
@a-thaler a-thaler removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 1, 2024
@hisarbalik hisarbalik self-assigned this Jul 11, 2024
@hisarbalik
Copy link
Contributor

Decisions:

The new LogPipeline attribute was named keepRawBody to clarify the purpose.

The new attribute moved from the Output section to the Input section to make it possible for the custom output type to change the configuration if necessary.

@skhalash skhalash self-assigned this Jul 17, 2024
@skhalash skhalash closed this as completed Aug 6, 2024
@a-thaler a-thaler modified the milestones: 1.22.0, 1.21.0 Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logs LogPipeline kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants