```ruby
class Hash
  def to_logstash
    hash = { '@fields' => message }
    hash['@tags'] = message[:tags] || []
    hash
  end
end
```

```ruby
class ActiveModelLike
  def to_logstash
    attributes.to_logstash
  end
end
``