Improve error message when exception happens

Open
#14 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
backend

Research direction

Start at the Ruby filter entry point and trace its exception handling for the date-parsing failure described in the report. Reproduce the error if possible and confirm that the resulting log message identifies the Ruby filter, while preserving the useful exception details.

Written by the indexing model from the issue text.

Description

logging-improvements

System info:

  • Ubuntu 14.04.3 64 bit
  • Logstash 2.1.0 from Elastic deb repo

Due to date parsing issue, I got the following in my logs:

{:timestamp=>"2015-11-25T13:50:28.229000-0700", :message=>"Ruby exception occurred: can't dup NilClass", :level=>:error}

After debugging, I figured that it came from the Ruby filter because parsing failed (and the field I was working on wasn't set.

It would be nice if the error indicated it came from the ruby filter, that would help debugging a lot.

Dominant language
Ruby
Stars
18
Forks
32
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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-filter-ruby

All issues in logstash-plugins/logstash-filter-ruby

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.