-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat(filter,cli): add remove future metrics in cli and discarding metrics written into the future #1012
Conversation
log.Info().Msg("Cleanup of outdated metrics finished") | ||
} | ||
|
||
if *cleanupFutureMetrics { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тоже спрошу, не хотим ли мы все это сразу в отчистку метрик добавить, чтобы не плодить ключики?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мне кажется, это не нужно, тк операция удаления метрик в будущее довольно тяжелая, тк требует прохода по всем метрикам, в идеале 1 раз удалить метрики, уже записанные, а все новые, пишущиеcя в будущее, и так будут откидываться
/build |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1012 +/- ##
==========================================
- Coverage 67.92% 67.82% -0.11%
==========================================
Files 212 212
Lines 12024 12098 +74
==========================================
+ Hits 8167 8205 +38
- Misses 3359 3388 +29
- Partials 498 505 +7 ☔ View full report in Codecov by Sentry. |
cmd/cli/main.go
Outdated
cleanupLastChecks = flag.Bool("cleanup-last-checks", false, "Delete abandoned triggers last checks.") | ||
cleanupTags = flag.Bool("cleanup-tags", false, "Delete abandoned tags.") | ||
cleanupMetrics = flag.Bool("cleanup-metrics", false, "Delete outdated metrics.") | ||
cleanupFutureMetrics = flag.Bool("cleanup-future-metrics", false, "Delete metrics from the database written to the future.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мне кажется, сейчас неконсистентно с хелпами по другим ключам
cleanupFutureMetrics = flag.Bool("cleanup-future-metrics", false, "Delete metrics from the database written to the future.") | |
cleanupFutureMetrics = flag.Bool("cleanup-future-metrics", false, "Delete metrics with future timestamps.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Поправил
/build |
Build and push Docker images with tag: 2024-05-07.ce13490 |
2 similar comments
Build and push Docker images with tag: 2024-05-07.ce13490 |
Build and push Docker images with tag: 2024-05-07.ce13490 |
Add remove future metrics in cli and discarding metrics written into the future
Added ability to delete metrics via
--cleanup-future-metrics
command in cli with specifyingcleanup_future_metrics_duration
parameter in config, starting from which metrics written to the future will be deletedAlso added discarding metrics whose timestamp is greater than
now() + dropMetricsTTL
to avoid writing garbage to the databaseAnd accelerated tests by 8 seconds by replacing
time.Sleep
withmetricsCache.Flush
.