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
logqueue: add queue level metrics #4392
Merged
MrAnno
merged 3 commits into
syslog-ng:master
from
alltilla:logqueue-add-queue-level-metrics
Mar 30, 2023
Merged
logqueue: add queue level metrics #4392
MrAnno
merged 3 commits into
syslog-ng:master
from
alltilla:logqueue-add-queue-level-metrics
Mar 30, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@kira-syslogng do stresstest |
Kira-stress-test: Build SUCCESS |
alltilla
added a commit
to alltilla/syslog-ng
that referenced
this pull request
Mar 24, 2023
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
alltilla
force-pushed
the
logqueue-add-queue-level-metrics
branch
from
March 24, 2023 11:38
38c5cb7
to
086b11b
Compare
alltilla
added a commit
to alltilla/syslog-ng
that referenced
this pull request
Mar 28, 2023
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
alltilla
force-pushed
the
logqueue-add-queue-level-metrics
branch
from
March 28, 2023 15:52
086b11b
to
b626986
Compare
alltilla
added a commit
to alltilla/syslog-ng
that referenced
this pull request
Mar 29, 2023
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
alltilla
force-pushed
the
logqueue-add-queue-level-metrics
branch
from
March 29, 2023 13:19
b626986
to
cc08cd2
Compare
alltilla
added a commit
to alltilla/syslog-ng
that referenced
this pull request
Mar 29, 2023
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
alltilla
force-pushed
the
logqueue-add-queue-level-metrics
branch
from
March 29, 2023 13:28
cc08cd2
to
b4cd638
Compare
MrAnno
reviewed
Mar 30, 2023
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
alltilla
added a commit
to alltilla/syslog-ng
that referenced
this pull request
Mar 30, 2023
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
alltilla
force-pushed
the
logqueue-add-queue-level-metrics
branch
from
March 30, 2023 14:19
b4cd638
to
89f556a
Compare
With this commit, the atomic counters turned into StatsCounterItems. Similarly to the driver level metrics, the queue level metrics' sc keys are initialized with the Builder class, but the data is built up on different layers: * LogWriter and LogThreadedDestDriver initializes the labels for the driver reference ("id" and "driver_instance"). * LogThreadedDestDriver adds a "worker" label. * LogQueueFifo and LogQueueDisk sets the name prefix to "memory_queue_" and "disk_queue_". * LogQueueDisk adds a "path" label, pointing to the disk-buffer file's location and a "reliable" label. * LogQueue registers the "memory_usage_bytes" and "events" counters. Queue level metrics are enabled from stats(level(1)). Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
alltilla
force-pushed
the
logqueue-add-queue-level-metrics
branch
from
March 30, 2023 14:23
89f556a
to
ef44b63
Compare
Rebased to master, fixed the comments and removed 2 accidentally left in |
@kira-syslogng do stresstest |
Kira-stress-test: Build SUCCESS |
MrAnno
approved these changes
Mar 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces queue level metrics:
disk-buffer
metrics are available with "syslogng_disk_queue_" prefix.disk-buffer
metrics have an additional "path" label, pointing to the location of the disk-buffer fileand a "reliable" label, which can be either "true" or "false".
http
,python
, etc have an additional "worker" label.Example metrics
The values of these counters are unit tested. Before this PR, they were only atomic gssizes, now they are real
StatsCounterItem
s, and the existing unit tests tests their values. I tried to add E2E tests, but it became really complex to do with Light, and I did not see the big added benefit.Depends on #4389.
Signed-off-by: Attila Szakacs attila.szakacs@axoflow.com