Skip to content

feat(otelcol): Add otelcol.processor.cardinality_guardian component - #6855

Open
bhargav2427 wants to merge 3 commits into
grafana:mainfrom
bhargav2427:feat/add-otel-cardinality-guardian
Open

feat(otelcol): Add otelcol.processor.cardinality_guardian component#6855
bhargav2427 wants to merge 3 commits into
grafana:mainfrom
bhargav2427:feat/add-otel-cardinality-guardian

Conversation

@bhargav2427

Copy link
Copy Markdown

Brief description of Pull Request

Adds otelcol.processor.cardinality_guardian, a wrapper over the upstream OpenTelemetry Collector Contrib cardinalityguardian processor, at Experimental stability. The processor detects metric labels with abnormal cardinality growth (delta-based, using HyperLogLog++ sketches) and can tag, replace, or strip and reaggregate the offending attributes.

Since the upstream processor was first released in opentelemetry-collector-contrib v0.154.0, this PR also updates all OpenTelemetry Collector and Collector Contrib dependencies from v0.153.0 to v0.155.0 (stable modules to v1.61.0, matching the versions already partially pinned in go.mod), and regenerates the Alloy OTel Collector distribution.

The dependency update required one component change: contrib v0.155.0 added max_broker_write_bytes to the Kafka producer configuration with a 100 MiB franz-go minimum, so otelcol.exporter.kafka now exposes a max_broker_write_bytes attribute (default 104857600) in its producer block, with its converter, tests, and documentation updated accordingly.

Also included for the new component: registration in internal/component/all, an otelcolconvert converter with test fixtures, reference documentation, and an entry in the OTel components list.

Pull Request Details

Issue(s) fixed by this Pull Request

Notes to the Reviewer

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated
  • This pull request was substantially generated with AI assistance (see the [GenAI policy (https://github.com/grafana/alloy/blob/main/docs/developer/genai.md))

One heads-up for your human-written sections: this PR bundles a dependency bump + a kafka exporter change + a new component, which may violate the "one logical change per PR" rule in AGENTS.md — reviewers may ask you to split the OTel v0.155.0 bump (with the kafka fix) from the new component.

@bhargav2427
bhargav2427 requested review from a team and clayton-cornell as code owners August 10, 2026 15:44
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Signed commits report

1 of 3 commits between main and feat/add-otel-cardinality-guardian could not be fully verified:

Commit Author Reason Message
845d9801 bhargav2427 unsigned add otel cardinality guardian

This repository requires all commits to be signed. See GitHub docs on commit signature verification.

@cla-assistant

cla-assistant Bot commented Aug 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bhargav2427 bhargav2427 changed the title add otel cardinality guardian feat(otelcol): Add otelcol.processor.cardinality_guardian component Aug 10, 2026
@bhargav2427

Copy link
Copy Markdown
Author

Hi @clayton-cornell, could you please help move this PR forward when you get a chance?

@kgeckhart

kgeckhart commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Hi @bhargav2427 thanks for the PR. A few things,

  1. Could you please open a proposal for this component? We ask that all components start as proposal before going to the step of making a PR, https://github.com/grafana/alloy/blob/main/docs/developer/adding-community-components.md
  2. Open Telemetry version bumps are handled by maintainers as a part of our release sheparding responsibility. There's an open PR that would get us to the version necessary for this component
  3. I would encourage you to read our AI policy, https://github.com/grafana/alloy/blob/main/docs/developer/genai.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants