zendesk / racecar

Racecar: a simple framework for Kafka consumers in Ruby
Apache License 2.0
486 stars 93 forks source link

`process` method strict arity check causes incompatibility with NewRelic Elastic APM gem #362

Open airdrummingfool opened 8 months ago

airdrummingfool commented 8 months ago

A strict arity check was added to the process method in Racecar in 2.3.0. I believe this check conflicts with the way the NewRelic's Elastic APM gem sets up method spanning.

Due to this method signature check, my consumer crashes on start with Racecar 2.3.0 and newer:

=> Starting Racecar consumer DataConsumer...
=> Detected Rails, booting application...
=> Ctrl-C to shutdown consumer
=> Wrooooom!
=> Crashed: Racecar::Error: Invalid method signature for `process`. The method must take exactly 1 argument.

Using Racecar 2.2.0 or below works perfectly.

Would it be possible to loosen the arity check, make it optional, or add some kind of workaround so that newer versions of Racecar can be used with the Elastic APM gem?