Skip to content

feat: Optionally enable kafka histograms for read/write latency - #17089

Merged
aarogoss merged 5 commits into
mainfrom
agoss/enable-kafka-histograms
Apr 10, 2025
Merged

feat: Optionally enable kafka histograms for read/write latency#17089
aarogoss merged 5 commits into
mainfrom
agoss/enable-kafka-histograms

Conversation

@aarogoss

@aarogoss aarogoss commented Apr 9, 2025

Copy link
Copy Markdown
Contributor

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

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
aarogoss added 2 commits April 9, 2025 09:17
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.
@aarogoss aarogoss self-assigned this Apr 9, 2025
aarogoss added 2 commits April 9, 2025 09:23
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'
@github-actions github-actions Bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Apr 9, 2025
@github-actions

github-actions Bot commented Apr 9, 2025

Copy link
Copy Markdown
Contributor

💻 Deploy preview deleted.

@aarogoss
aarogoss marked this pull request as ready for review April 9, 2025 18:18
@aarogoss
aarogoss requested a review from a team as a code owner April 9, 2025 18:18
Ensures the kafka config value is used by partition-ingester services to
enable/disable kafka histograms
@aarogoss
aarogoss merged commit e962398 into main Apr 10, 2025
@aarogoss
aarogoss deleted the agoss/enable-kafka-histograms branch April 10, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories

2 participants