Skip to content

Commit db7c9f9

Browse files
committed
Some janus and GST problems may be related to Pi model and OS version. make sure we log them on exceptions
1 parent 29a6afd commit db7c9f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

octoprint_thespaghettidetective/webcam_stream.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def run_janus():
147147
elif not self.shutting_down:
148148
self.janus_proc.wait()
149149
msg = 'Janus quit! This should not happen. Exit code: {}'.format(self.janus_proc.returncode)
150-
self.sentry.captureMessage(msg)
150+
self.sentry.captureMessage(msg, tags=get_tags())
151151
janus_backoff.more(msg)
152152
self.janus_proc = subprocess.Popen(janus_cmd.split(), env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
153153

@@ -203,7 +203,7 @@ def monitor_ffmpeg_process(): # It's pointless to restart ffmpeg without callin
203203
returncode = self.ffmpeg_proc.wait()
204204
msg = 'STDERR:\n{}\n'.format('\n'.join(ring_buffer))
205205
_logger.error(msg)
206-
self.sentry.captureMessage('ffmpeg quit! This should not happen. Exit code: {}'.format(returncode))
206+
self.sentry.captureMessage('ffmpeg quit! This should not happen. Exit code: {}'.format(returncode), tags=get_tags())
207207
return
208208
else:
209209
ring_buffer.append(err)
@@ -239,7 +239,7 @@ def ensure_gst_process():
239239
returncode = self.gst_proc.wait()
240240
msg = 'STDERR:\n{}\n'.format('\n'.join(ring_buffer))
241241
_logger.debug(msg)
242-
self.sentry.captureMessage('GST exited un-expectedly. Exit code: {}'.format(returncode))
242+
self.sentry.captureMessage('GST exited un-expectedly. Exit code: {}'.format(returncode), tags=get_tags())
243243
gst_backoff.more('GST exited un-expectedly. Exit code: {}'.format(returncode))
244244

245245
ring_buffer = deque(maxlen=50)

0 commit comments

Comments
 (0)