[cloudflare_logpush] Ingest pipeline improvements#18257
[cloudflare_logpush] Ingest pipeline improvements#18257brijesh-elastic wants to merge 18 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Vale Linting ResultsSummary: 100 warnings, 9 suggestions found
|
| File | Line | Rule | Message |
|---|---|---|---|
| packages/cloudflare_logpush/docs/README.md | 108 | Elastic.DontUse | Don't use 'please'. |
| packages/cloudflare_logpush/docs/README.md | 112 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 119 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'using' instead of 'via'. |
| packages/cloudflare_logpush/docs/README.md | 131 | Elastic.DontUse | Don't use 'just'. |
| packages/cloudflare_logpush/docs/README.md | 141 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'using' instead of 'via'. |
| packages/cloudflare_logpush/docs/README.md | 152 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'using' instead of 'via'. |
| packages/cloudflare_logpush/docs/README.md | 153 | Elastic.DontUse | Don't use 'Please'. |
| packages/cloudflare_logpush/docs/README.md | 154 | Elastic.DontUse | Don't use 'please'. |
| packages/cloudflare_logpush/docs/README.md | 194 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'using' instead of 'via'. |
| packages/cloudflare_logpush/docs/README.md | 350 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 352 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 353 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 354 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 503 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 505 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 506 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 507 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 676 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 678 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 679 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 680 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 856 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 858 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 859 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 860 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 961 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'that is' instead of 'i.e'. |
| packages/cloudflare_logpush/docs/README.md | 963 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 965 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 966 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 967 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 1091 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 1093 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 1094 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 1095 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 1246 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'using' instead of 'via'. |
| packages/cloudflare_logpush/docs/README.md | 1257 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 1259 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 1260 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 1261 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 1517 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 1519 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 1520 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 1521 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 1749 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 1751 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 1752 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 1753 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 2092 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 2094 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 2095 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 2096 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 2348 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'eg'. |
| packages/cloudflare_logpush/docs/README.md | 2377 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'using' instead of 'via'. |
| packages/cloudflare_logpush/docs/README.md | 2393 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 2395 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 2396 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 2397 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 2606 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'using' instead of 'via'. |
| packages/cloudflare_logpush/docs/README.md | 2617 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 2619 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 2620 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 2621 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3064 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 3066 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 3067 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3068 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3231 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 3233 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 3234 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3235 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3345 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 3347 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 3348 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3349 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3701 | Elastic.BritishSpellings | Use American English spelling 'acknowledgment' instead of British English 'Acknowledgement'. |
| packages/cloudflare_logpush/docs/README.md | 3720 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 3722 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 3723 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3724 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 3985 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'using' instead of 'via'. |
| packages/cloudflare_logpush/docs/README.md | 4004 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 4006 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 4007 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4008 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4127 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 4129 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 4130 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4131 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4339 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 4341 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 4342 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4343 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4544 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 4546 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 4547 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4548 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4697 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'and so on' instead of 'etc'. |
| packages/cloudflare_logpush/docs/README.md | 4699 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
| packages/cloudflare_logpush/docs/README.md | 4700 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
| packages/cloudflare_logpush/docs/README.md | 4701 | Elastic.Latinisms | Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'. |
💡 Suggestions (9)
| File | Line | Rule | Message |
|---|---|---|---|
| packages/cloudflare_logpush/docs/README.md | 5 | Elastic.Semicolons | Use semicolons judiciously. |
| packages/cloudflare_logpush/docs/README.md | 5 | Elastic.Semicolons | Use semicolons judiciously. |
| packages/cloudflare_logpush/docs/README.md | 5 | Elastic.Semicolons | Use semicolons judiciously. |
| packages/cloudflare_logpush/docs/README.md | 136 | Elastic.WordChoice | Consider using 'can, might' instead of 'may', unless the term is in the UI. |
| packages/cloudflare_logpush/docs/README.md | 184 | Elastic.WordChoice | Consider using 'refer to if it's a document, view if it's a UI element' instead of 'See', unless the term is in the UI. |
| packages/cloudflare_logpush/docs/README.md | 667 | Elastic.WordChoice | Consider using 'can, might' instead of 'may', unless the term is in the UI. |
| packages/cloudflare_logpush/docs/README.md | 1713 | Elastic.WordChoice | Consider using 'top-level' instead of 'first-class', unless the term is in the UI. |
| packages/cloudflare_logpush/docs/README.md | 2359 | Elastic.WordChoice | Consider using 'can, might' instead of 'may', unless the term is in the UI. |
| packages/cloudflare_logpush/docs/README.md | 3060 | Elastic.Wordiness | Consider using 'whether' instead of 'Whether or not'. |
The Vale linter checks documentation changes against the Elastic Docs style guide.
To use Vale locally or report issues, refer to Elastic style guide for Vale.
🚀 Benchmarks reportPackage
|
| Data stream | Previous EPS | New EPS | Diff (%) | Result |
|---|---|---|---|---|
gateway_http |
3649.64 | 2898.55 | -751.09 (-20.58%) | 💔 |
gateway_network |
6756.76 | 5681.82 | -1074.94 (-15.91%) | 💔 |
nel_report |
29411.76 | 19607.84 | -9803.92 (-33.33%) | 💔 |
network_session |
4366.81 | 2057.61 | -2309.2 (-52.88%) | 💔 |
sinkhole_http |
6896.55 | 5050.51 | -1846.04 (-26.77%) | 💔 |
casb |
4807.69 | 3378.38 | -1429.31 (-29.73%) | 💔 |
dns |
18518.52 | 7407.41 | -11111.11 (-60%) | 💔 |
email_security_alerts |
2493.77 | 1811.59 | -682.18 (-27.36%) | 💔 |
To see the full report comment with /test benchmark fullreport
efd6
left a comment
There was a problem hiding this comment.
I think there is too much going on here. It's good that the changes are broken out in to distinct commits, but those commits do not explain what they are doing beyond the subject line. If we need to come back to this change to understand why a particular change was made in order to handle a support case, it will be essentially impossible to understand why any given decision was made.
Update format_version to 3.3.2 and ECS dependency to git@v9.3.0 in manifest.yml and build.yml. Update ecs.version to 9.3.0 in all 21 data stream ingest pipelines.
field descriptions Update ECS field definitions by replacing agent.yml with beats.yml and modernizing base-fields.yml across all 21 data streams. Sort all fields.yml entries alphabetically for better maintainability. Fix swapped field descriptions for firewall_event (origin.ray.id/origin.response.status) and http_request (cache.status/cache.response.status). Add support for new fields across 9 data streams with their corresponding ingest pipeline processors: device_posture (RegistrationID), firewall_event (FraudUserID), gateway_dns (12 fields including InternalDNS*, QueryApplication*, RequestContext*), gateway_http (AppControlInfo, ApplicationStatuses, RedirectTargetURI, RegistrationID), gateway_network (RegistrationID), http_request (11 fields including Fraud*, WebAssets*, WorkerScriptName), network_analytics (DNSQueryName, DNSQueryType, PFPCustomTag), network_session (InitialOriginIP, RegistrationID, ResolvedFQDN, SNI), workers_trace (CPUTimeMs, WallTimeMs).
Correct the Painless script to reference ctx.json.Timestamp (PascalCase) instead of ctx.json.timestamp, matching the actual field name from the Cloudflare API and the guard condition.
Fix the grok guard condition that used an incorrect path (ctx.json?.cloudflare_logpush) instead of (ctx.cloudflare_logpush) and a tautological || operator instead of &&. Also correct the remove processor to reference action instead of event_action. Update test data to use a valid disconnect timestamp.
Correct the split processor condition to reference ctx.json.TCPSackBlocks consistently instead of mixing TCPSACKBlocks and TCPSackBlocks casing.
Correct the rename condition to use ctx.json?.Interface (PascalCase) matching the actual Cloudflare API field name instead of lowercase.
Replace rename processors with convert processors (type: string) for fields documented as integers or arrays of integers but mapped as keyword type in fields.yml. Affected fields: gateway_dns (CNAMECategoryIDs, EDEErrors, InitialCategoryIDs, MatchedIndicatorFeedIDs, ResolvedIPCategoryIDs), gateway_http (ApplicationIDs), gateway_network (ApplicationIDs, CategoryIDs).
Change singular header to plural headers for RequestHeaders and ResponseHeaders target fields to match the fields.yml definitions (request.headers and response.headers).
Add IANA keyword representation scripts for dns.response_code and dns.question.type in both dns and dns_firewall data streams. Numeric DNS response codes are now mapped to human-readable names (e.g., 0 -> NoError, 3 -> NXDomain) and query types are mapped to their IANA names (e.g., 1 -> A, 28 -> AAAA, 15 -> MX).
Remove ignore_failure: true from the first JSON processor in all data stream pipelines that had it. Parsing failures should surface as errors rather than silently producing partial documents.
Replace grok processors with dissect for simple delimiter-based pattern matching in firewall_event, http_request, and spectrum_event data streams. Dissect is more performant than grok for fixed patterns like protocol/version splitting.
Replace multiple timestamp normalization scripts (which handled both String and Number types with try/catch) with a single, efficient script that only handles Number type. The new script directly converts timestamps to Unix milliseconds by dividing nanosecond values or multiplying second values. Update test input log files to use numeric timestamps to match the simplified script expectations.
Replace rename processors with typed convert processors for fields declared as ip, long, boolean, or double in fields.yml to ensure correct type casting. Add in-place convert processors for timestamp fields to handle string-to-number conversion before the normalization script. Affected data streams: access_request, device_posture, dns, dns_firewall, gateway_dns, gateway_http, gateway_network, http_request, magic_ids, network_session, sinkhole_http, spectrum_event. Also adds timestamp converts for all 20 data streams with numeric timestamp handling.
Add a null/empty field removal script at the end of all 21 data stream
pipelines. The script recursively removes fields with null values, empty
strings, empty maps, and empty lists.
Standardize all on_failure error.message values to use the full format:
"Processor {type} with tag {tag} in pipeline {pipeline} failed with
message: {message}" for consistent debugging output.
Add a unique tag key to every processor in all 21 ingest pipelines for
easier debugging and tracing of pipeline failures. Tags follow the
pattern: {processor_type}_{field_description}_{hash}.
2dc01c1 to
15a1e7f
Compare
| copy_from: cloudflare_logpush.firewall_event.client.request.method | ||
| ignore_empty_value: true | ||
| - convert: | ||
| tag: convert_json_EdgeResponseStatus_to_cloudflare_logpush_firewall_event_edge_response_status_8ff95d40 |
There was a problem hiding this comment.
🟡 Medium ingest_pipeline/default.yml:135
The convert processors for json.EdgeResponseStatus, json.ClientASN, json.MatchIndex, and json.OriginResponseStatus attempt to convert empty strings to long, which fails and triggers pipeline_error in event.kind even though these are valid optional fields. Previously these had if: ctx.json?.field != '' guards that were removed. Consider restoring the empty string checks to prevent valid documents with empty optional fields from being marked as errors.
Also found in 1 other location(s)
packages/cloudflare_logpush/data_stream/nel_report/elasticsearch/ingest_pipeline/default.yml:103
The
convertprocessor forjson.ClientIPASN(lines 103-117) no longer has theif: ctx.json?.ClientIPASN != ''condition that was present before. IfClientIPASNis an empty string (which may occur when the client IP doesn't have a known ASN), the conversion tolongwill fail and trigger theon_failurehandler. This appends an error message toerror.message, which then causes theevent.kindto be incorrectly set topipeline_errorat line 186 (if: ctx.error?.message != null). This means valid NEL report events with empty ASN fields will be incorrectly categorized as pipeline errors. Note that theTimestampconvert processor at lines 48-53 correctly includes the empty string check (ctx.json.Timestamp != ''), suggesting this omission was unintentional.
🤖 Copy this AI Prompt to have your agent fix this:
In file packages/cloudflare_logpush/data_stream/firewall_event/elasticsearch/ingest_pipeline/default.yml around line 135:
The `convert` processors for `json.EdgeResponseStatus`, `json.ClientASN`, `json.MatchIndex`, and `json.OriginResponseStatus` attempt to convert empty strings to `long`, which fails and triggers `pipeline_error` in `event.kind` even though these are valid optional fields. Previously these had `if: ctx.json?.field != ''` guards that were removed. Consider restoring the empty string checks to prevent valid documents with empty optional fields from being marked as errors.
Also found in 1 other location(s):
- packages/cloudflare_logpush/data_stream/nel_report/elasticsearch/ingest_pipeline/default.yml:103 -- The `convert` processor for `json.ClientIPASN` (lines 103-117) no longer has the `if: ctx.json?.ClientIPASN != ''` condition that was present before. If `ClientIPASN` is an empty string (which may occur when the client IP doesn't have a known ASN), the conversion to `long` will fail and trigger the `on_failure` handler. This appends an error message to `error.message`, which then causes the `event.kind` to be incorrectly set to `pipeline_error` at line 186 (`if: ctx.error?.message != null`). This means valid NEL report events with empty ASN fields will be incorrectly categorized as pipeline errors. Note that the `Timestamp` convert processor at lines 48-53 correctly includes the empty string check (`ctx.json.Timestamp != ''`), suggesting this omission was unintentional.
💚 Build Succeeded
History
|
| field: error.message | ||
| value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.on_failure_pipeline}}} failed with message: {{{_ingest.on_failure_message}}}' |
There was a problem hiding this comment.
This doesn't look right. Also below.
There was a problem hiding this comment.
Right. Cursor did that. It also reverting those changes in a33558a.
Proposed commit message
Checklist
changelog.ymlfile.How to test this PR locally
Related issues