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

Add log entry-specific retention dates #698

Open
jongpie opened this issue Jun 12, 2024 Discussed in #689 · 4 comments
Open

Add log entry-specific retention dates #698

jongpie opened this issue Jun 12, 2024 Discussed in #689 · 4 comments
Assignees
Labels
Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler Layer: Log Management Items related to the custom objects & Logger Console app Type: Enhancement New feature or request

Comments

@jongpie
Copy link
Owner

jongpie commented Jun 12, 2024

Discussed in #689

Originally posted by josegonzalezNorthius May 22, 2024
Hey,

We recently introduced NebulaLogger in our organization and have integrated it into many different areas. While monitoring an integration, I activated the logs at the info level, but I would like to delete the info level logs earlier than the error level logs. For this reason, I propose the following change. Let me know if this could be a good idea.

Custom Retention by Log Level: Users will be able to define specific retention periods for each log level (e.g., debug, info, warning, error). This ensures that critical logs can be preserved longer while less important logs can be discarded more quickly.

A solution could be to add separate retention fields for each log level instead of a single retention period for all logs.

@jongpie jongpie added Type: Enhancement New feature or request Layer: Log Management Items related to the custom objects & Logger Console app Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler labels Jun 12, 2024
@jongpie jongpie self-assigned this Jun 12, 2024
@jhawk-4
Copy link

jhawk-4 commented Jul 16, 2024

We are just in the beginning stages of implementing Nebula, but I could also see the benefit of being able to control retention by tags. In this way, we can tag items more specific to compliance that may require longer evidence. For those items we could apply a tag that has an associated retention policy with it. Then all of the log items across any logging level would get that policy applied to them. I also understand that this could be tricky logically trying to determine the right retention when multiple tags get applied.

@jongpie
Copy link
Owner Author

jongpie commented Jul 16, 2024

@jhawk-4 that's not a bad idea - I think if there were multiple tags with different retention dates, it would make the most sense to use the longest retention date. For example, if a log entry has 2 tags:

  1. Tag A: retention of 30 days
  2. Tag B: retention of 50 days

Then 50 days would be used. Let me know if that approach makes sense to you.

And if tags are going to have a retention date, then I'd probably go ahead and include a way to control it for logger scenarios (LoggerScenario__c) too. I'll have to think about all of this more, as the scope & complexity grows quickly - but I think the end result would provide a lot of controls for retention dates.

@jhawk-4
Copy link

jhawk-4 commented Jul 16, 2024

Agreed that the max date makes the most sense to win.

And given that I just dropped in and increased the scope, it would be polite of me to offer to help. So, if I can help out here, please let me know.

@jongpie
Copy link
Owner Author

jongpie commented Jul 16, 2024

@jhawk-4 that's incredibly kind of you to offer - I'm currently trying to wrap up a few other bugfixes & releases over the next few weeks, so I'm not sure when exactly I'll look into this enhancement more. But whenever I do, I'll definitely let you know if I need some help. (And your feedback has already been helpful, thanks for the input!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler Layer: Log Management Items related to the custom objects & Logger Console app Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants