feat: Optionally enable kafka histograms for read/write latency - #17089
Merged
Conversation
Introduces a new config option for kafka clients to enable (or disable) read/write wait and timing histograms. These are not enabled by default, so this change introduces a new CLI flag and YAML opt which configures the collected metrics to include/exclude historgams. This PR includes updating the dataobj, blockbuilder (deprecated), and ingest limits so they can take advantage of these collected metrics for monitoring.
docker run --rm --tty --interactive -v /home/agoss/go/pkg:/go/pkg:delegated -v /home/agoss/git/loki/add-ingestion-kafka-metrics/.cache:/go/cache:delegated -v /home/agoss/git/loki/add-ingestion-kafka-metrics:/src/loki:delegated grafana/loki-build-image:0.34.6 -f Makefile doc; git pushmake: Entering directory '/src/loki' fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics fatal: not a git repository: /home/agoss/git/loki/main/.git/worktrees/add-ingestion-kafka-metrics go run ./tools/doc-generator docs/templates/configuration.template > docs/sources/shared/configuration.md make: Leaving directory '/src/loki'
Contributor
|
💻 Deploy preview deleted. |
owen-d
approved these changes
Apr 9, 2025
aarogoss
marked this pull request as ready for review
April 9, 2025 18:18
Ensures the kafka config value is used by partition-ingester services to enable/disable kafka histograms
This was referenced Jun 24, 2025
This was referenced Jul 7, 2025
This file contains hidden or 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
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.
What this PR does / why we need it:
Introduces a new config option for kafka clients to enable (or disable) read/write wait and timing histograms. These are not enabled by default, so this change introduces a new CLI flag and YAML opt which configures the collected metrics to include/exclude historgams.
This PR includes updating the dataobj, blockbuilder (deprecated), and ingest limits so they can take advantage of these collected metrics and monitor latency when reading from and writing to kafka.
Checklist
CONTRIBUTING.mdguide (required)featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR