Skip to content

Error logging is insufficient to track down cause of error #233

@robbavey

Description

@robbavey

When using the geoip filter with a custom database, the current error handling is insufficient to be able to track down the cause of the issue, as it masks the original cause of the error, and does not print a stack trace to determine where the original exception was thrown from:

[2025-04-28T15:50:26,757][DEBUG][org.logstash.filters.geoip.GeoIPFilter][main] GeoIP2 Exception. exception=org.logstash.filters.geoip.GeoIPFilter$GeoIp2InvalidCustomFieldException: invalid custom field, field=[source][ip], event=2025-04-25T14:41:00.000Z {hostname=Robs-MacBook-Pro.local} %{message}

This error message is insufficient in a number of different ways:

  • The event is not logged correctly, only showing up as %{message}
  • Invalid custom field can originate from a number of different areas in the code.
  • The cause exception message is lost
  • The cause exception stack trace is lost.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions