I’m new to Sentry (our apps team has recently adopted it), and I’ve been working on instrumenting a large, complicated series of bash scripts.
sentry-cli bash-hook to be very helpful for getting basic logging info uploaded. However, the amount of data that it captures is a little limited, just environment + trace + log.
I haven’t found a way to attach additional metadata, like the release version, platform, tags, a custom message, or any extra arbitrary tags.
Is there a way to support this? I could imagine doing something like
sentry-cli bash-hook --set-release 1.2.3 or
export SENTRY_CLI_EXTRA=job_id:20128 step:preprocess_input to build up the event ahead of time, which only would be sent if an error occurs.
If there’s not, my first idea for a workaround is to write a bash wrapper for
bash-hook that would add support for the additional metadata (calling
sentry-cli send-event manually). If there’s a nicer workaround, I’d be interested in hearing about that too.
Thank you for your time!