feature/20-add_logs #21

Merged
alexvanin merged 6 commits from feature/20-add_logs into master 2024-09-25 08:37:57 +00:00
Member

close #20

close #20
dkirillov self-assigned this 2024-09-23 14:39:47 +00:00
dkirillov added 3 commits 2024-09-23 14:39:48 +00:00
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
[#20] Support logging with tags
Some checks failed
/ DCO (pull_request) Successful in 48s
/ Vulncheck (pull_request) Successful in 1m17s
/ Builds (pull_request) Failing after 1m5s
/ Lint (pull_request) Successful in 2m32s
/ Tests (pull_request) Successful in 1m7s
2f7a73ee36
Allow to log additionally "tagged" log entries.

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov requested review from storage-services-committers 2024-09-23 14:39:57 +00:00
dkirillov requested review from storage-services-developers 2024-09-23 14:39:59 +00:00
dkirillov added 1 commit 2024-09-23 15:53:40 +00:00
[#20] Fix go.sum
All checks were successful
/ DCO (pull_request) Successful in 42s
/ Vulncheck (pull_request) Successful in 1m18s
/ Builds (pull_request) Successful in 57s
/ Lint (pull_request) Successful in 2m27s
/ Tests (pull_request) Successful in 1m6s
52c2ec525c
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov reviewed 2024-09-24 06:55:21 +00:00
@ -77,0 +111,4 @@
msg := entry.Message[4:] // len("tag:")
for _, tag := range tags {
if msg == tag {
Author
Member

Probably we can use strings.HasPrefix(msg, tag) to support logs with same tag but different message

  • tag:delete remove object
  • tag:delete remove version
Probably we can use `strings.HasPrefix(msg, tag)` to support logs with same tag but different message * `tag:delete remove object` * `tag:delete remove version`
Owner

Can we check if strings.HasPrefix affect a burst of 10k-100k concurrent log messages?

Can we check if `strings.HasPrefix` affect a burst of 10k-100k concurrent log messages?
alexvanin approved these changes 2024-09-24 11:40:37 +00:00
Dismissed
alexvanin left a comment
Owner

Seems very good. Let's sync logger sampling options and maybe run some performance tests on string comparasion and prefix check.

Seems very good. Let's sync logger sampling options and maybe run some performance tests on string comparasion and prefix check.
@ -59,3 +51,1 @@
c := zap.NewProductionConfig()
c.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
c.Level = zap.NewAtomicLevelAt(lvl)
func openZapSinks(cfg zap.Config) (zapcore.WriteSyncer, zapcore.WriteSyncer, error) {
Owner

nitpick: I would place this function before or after both new*Logger() function.

nitpick: I would place this function before or after both `new*Logger()` function.
@ -41,0 +40,4 @@
cfgLoggerDestination = "logger.destination"
cfgLoggerSamplingEnabled = "logger.sampling.enabled"
cfgLoggerSamplingInitial = "logger.sampling.initial"
cfgLoggerSamplingThereafter = "logger.sampling.thereafter"
Owner

https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/pulls/495/files introduces interval as well, what you think about it?

https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/pulls/495/files introduces `interval` as well, what you think about it?
alexvanin marked this conversation as resolved
dkirillov added 2 commits 2024-09-24 12:56:28 +00:00
Now different log messages can use the same tag:
* `tag:delete remove object`
* `tag:delete remove version`

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
[#20] Add metric to see number of dropped logs
Some checks failed
/ DCO (pull_request) Successful in 39s
/ Builds (pull_request) Successful in 1m14s
/ Vulncheck (pull_request) Successful in 1m16s
/ Lint (pull_request) Failing after 1m4s
/ Tests (pull_request) Successful in 1m14s
1827d365c7
Add new metric frostfs_s3_lifecycler_statistic_dropped_logs
Also, configuration sampling interval is added

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov force-pushed feature/20-add_logs from 1827d365c7 to 8b6d93c94d 2024-09-24 14:47:14 +00:00 Compare
alexvanin approved these changes 2024-09-24 14:57:56 +00:00
alexvanin merged commit 8b6d93c94d into master 2024-09-25 08:37:57 +00:00
alexvanin deleted branch feature/20-add_logs 2024-09-25 08:37:59 +00:00
Sign in to join this conversation.
No description provided.