splunk_handler icon indicating copy to clipboard operation
splunk_handler copied to clipboard

fix multiple process queue not sharing

Open lovemyliwu opened this issue 6 years ago • 5 comments

when use handler in uwsgi --master the Queue and comsumer worker will be created by master process, but the producer is child process.

when use handler in celery worker, also have the problem above.

lovemyliwu avatar Feb 28 '18 10:02 lovemyliwu

Hey @lovemyliwu thanks for submitting this! Can you give me a little more information or background on the use-case for this change? Also is it possible to write a test to ensure we don't break multi-process queue functionality in the future?

zach-taylor avatar Mar 01 '18 18:03 zach-taylor

@zach-taylor If you use this splunk-handler inside a process that in turn spawns celery workers the celery workers will not be able to push logs to splunk (things like file handlers etc seem to work fine). This pr will allow all logs, both the root process & the celery workers, to be pushed to splunk.

bdirito avatar Aug 22 '18 18:08 bdirito

Is there any chance this can get merged in? I would really appreciate it.

rh0dium avatar Jan 26 '21 16:01 rh0dium

@zach-taylor a bit of background when you run this in production where you are running this behind uwsgi you won't see all of the messages. It's not clear why this is happening but we can correlate the N+1 threads are not capturing logs.

rh0dium avatar Jan 26 '21 16:01 rh0dium

@rh0dium or @lovemyliwu if this is still something that is desired, can one of you take on getting the PR updated with latest master and addressing any codeclimate issues? This does appear to be backwards compatible, and the PR conversations suggest general interest.

JeffreyLMelvin avatar Mar 05 '22 18:03 JeffreyLMelvin