Skip to content

[kafka_deserializers] New plugin pack: msgpack format + payload compression codecs#3001

Open
piochelepiotr wants to merge 3 commits intoDataDog:masterfrom
piochelepiotr:piotr.wolski/kafka_deserializers
Open

[kafka_deserializers] New plugin pack: msgpack format + payload compression codecs#3001
piochelepiotr wants to merge 3 commits intoDataDog:masterfrom
piochelepiotr:piotr.wolski/kafka_deserializers

Conversation

@piochelepiotr
Copy link
Copy Markdown

What does this PR do?

Adds a new package kafka_deserializers to integrations-extras. It does not register a runtime check; it is a plugin wheel that contributes additional capabilities to the kafka_actions check via the entry-point groups introduced in integrations-core PR DataDog/integrations-core#23650 (datadog-kafka-actions>=2.7.0).

Once the wheel is installed into the agent's embedded Python, kafka_actions discovers the new capabilities automatically.

Kind Names registered
Format msgpack
Compression gzip, zlib, snappy, lz4, lz4_dd_hdr, zstd

The lz4_dd_hdr codec covers the DataDog/golz4 framing (4-byte little-endian uncompressed-size header followed by raw LZ4 block bytes) used by cloud-integrations/aws/xray-converter. It is not interchangeable with the standard LZ4 frame format — use lz4 for that.

Motivation

Producers across dd-go and dd-source ship Kafka payloads in formats and codecs that the core kafka_actions check does not currently support — most prominently MessagePack values, gzip-compressed JSON, zstd-compressed payloads, and the xray-converter LZ4 framing. Each of these depends on a third-party Python wheel (msgpack, python-snappy, lz4, zstandard) that has no business living inside the core check.

Putting these in a separate plugin wheel keeps core dependency-light and lets us iterate on format/codec coverage on its own release cadence.

Configuration

The new config keys live on kafka_actions (introduced in PR #23650). Once datadog-kafka-deserializers is installed:

value_format: msgpack
value_compression: gzip   # decompression runs before format dispatch

Depends on

Review checklist

  • Manifest, README, CHANGELOG, metadata.csv present
  • Unit tests for handlers and codecs
  • No runtime check class registered (intentional — pure plugin wheel)

🤖 Generated with Claude Code

Plugin pack for the kafka_actions check. Does not register a runtime
check: contributes additional capabilities to kafka_actions via the
'datadog_kafka_actions.formats' and 'datadog_kafka_actions.compressions'
entry-point groups introduced in datadog-kafka-actions 2.7.0.

Adds:
- 'msgpack' format handler
- 'gzip', 'zlib', 'snappy', 'lz4', 'lz4_dd_hdr', 'zstd' compression codecs

The 'lz4_dd_hdr' codec covers the DataDog/golz4 framing (4-byte LE
uncompressed-size header + raw LZ4 block) used by xray-converter; it is
not interchangeable with the standard LZ4 frame format ('lz4').

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@piochelepiotr piochelepiotr requested a review from a team as a code owner May 9, 2026 00:04
piochelepiotr and others added 2 commits May 8, 2026 18:21
- Use 2026-present in license headers to match repo standard
- Drop hard pyproject dep on datadog-kafka-actions (unresolvable on
  PyPI until the core plugin API ships; both wheels coexist in the
  agent's embedded Python at runtime)
- Add _compat module with stub fallback for FormatHandler /
  CompressionCodec so unit tests run in environments where
  kafka_actions is not installed; the real classes are imported when
  available

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add CODEOWNERS entry
- Shorten manifest/pyproject descriptions and simplify README to
  avoid ddev validate readmes shell-quote tripping
- Use importlib (not 'from datadog_checks.kafka_actions import ...')
  to load the host plugin base classes at runtime, satisfying
  ddev validate imports' constraint that integrations-extras packages
  not statically reference other integrations' namespaces

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@piochelepiotr piochelepiotr requested a review from a team as a code owner May 9, 2026 00:29
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.

1 participant