Repository navigation
[YAML] Add SplunkIO write SchemaTransform and WriteToSplunk - #40481
Open
schizophrenicmaniac wants to merge 2 commits into
Open
schizophrenicmaniac wants to merge 2 commits into
schizophrenicmaniac wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #40481 +/- ##
============================================
+ Coverage 56.16% 58.75% +2.58%
- Complexity 2288 13917 +11629
============================================
Files 1124 2586 +1462
Lines 178336 271824 +93488
Branches 1489 11243 +9754
============================================
+ Hits 100170 159708 +59538
- Misses 75645 106110 +30465
- Partials 2521 6006 +3485
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
Assigning reviewers: R: @jrmccluskey for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
github-actions
Bot
requested review from
derrickaw,
jrmccluskey and
kennknowles
October 9, 2026 10:43
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.
Adds a SchemaTransform for SplunkIO writes and exposes it in Beam YAML as
WriteToSplunk. It follows the same approach as the Datadog one (#38362). SplunkIO in Java only supports writes, so there is noReadFromSplunkhere.Each input row becomes a
SplunkEvent.event(string) is required.time(int64),host,source,sourcetype,indexandfieldsare optional.fieldscan be a nested row or a JSON object string, and other columns are ignored. The config covers everythingSplunkIO.Writesupports (url, token, batch_count, parallelism, disable_certificate_validation, root_ca_certificate_path, enable_batch_logs, enable_gzip_http_compression) plus error_handling. The error output has the same shape as Datadog's: rows that can't be converted come back withfailed_rowand a 400, and HEC write failures come back with the HTTP status and the payload. Without error_handling, a failed write fails the pipeline.While testing this I found that
SplunkWriteErrorloses all of its values once it goes through a coder. It has@DefaultSchema(AutoValueSchema.class), but its accessors aren'tget-prefixed, so the inferred schema has no fields and every error decodes as null/null/null.SplunkEventWriterTestdoesn't catch this becausecontainsInAnyOrderdecodes both sides with the same coder. I added aSplunkWriteErrorCoder(same idea asDatadogWriteErrorCoder) and set it on the output ofSplunkIO.Write. This changes the output coder ofSplunkIO.Write, so I listed it under bugfixes in CHANGES.md.Changes:
SplunkWriteSchemaTransformProvider/SplunkWriteSchemaTransformConfiguration, registered in the IO expansion serviceWriteToSplunkin standard_io.yaml and the matching entry in standard_external_transforms.yamlSplunkWriteErrorCoder, used bySplunkIO.WriteFixes #40470