Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Codec doesn't work in Logstash 5.0, each line calls `decode` separately

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
ruby
Domain
backend

Research direction

Start by comparing this codec's decode handling with the solution referenced in issue #2 and the Logstash 5.0 invocation shown here. Reproduce the behavior with a CloudFront gzip file and verify whether per-line calls can produce an event; done means the codec parses the file without requiring the workaround from #2.

Written by the indexing model from the issue text.

Description

Even after applying #3 this codec plugin does not work. I put some debugging into it and found the decode method is being called for each individual line, so no event is raised:

[2016-11-17T10:16:34,395][INFO ][logstash.codecs.cloudfront] Cloudfront: Parsing event #Version: 1.0
[2016-11-17T10:16:34,396][INFO ][logstash.codecs.cloudfront] Cloudfront: Parsing event #Fields: date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer) cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x-host-header cs-protocol cs-bytes time-taken x-forwarded-for ssl-protocol ssl-cipher x-edge-response-result-type cs-protocol-version
[2016-11-17T10:16:34,396][INFO ][logstash.codecs.cloudfront] Cloudfront: Parsing event 2016-11-17   	04:42:51       	MEL50  	882    	x.x.x.x 	GET    	arandomstring.cloudfront.net	/      	403    	-      	curl/7.43.0    	-      	-      	Error  anencryptedhash    	example.com	https  	79 	0.000   	-      	TLSv1.2	ECDHE-RSA-AES128-GCM-SHA256    	Error  	HTTP/1.1

The solution provided in #2 is the only way to parse events.

Dominant language
Ruby
Stars
5
Forks
4
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from logstash-plugins/logstash-codec-cloudfront

All issues in logstash-plugins/logstash-codec-cloudfront

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.