Open rombr opened 1 week ago
Sounds like a good idea! Will place this suggestion on our backlog, but I would expect this to be a relatively easy change, so we would happily accept PRs if you'd like to contribute.
Hi @rombr, I looked into this issue a bit more today and attempted to reproduce it; however, I was unable to reproduce the problem. I was getting the transaction name cron:transaction
for the code you provided.
While you are correct that we initially set the transaction name to "unknown arq task," the transaction name should be overwritten in the event processor before we send the transaction event to Sentry:
Could you please provide more information on your setup/how you are initializing Sentry? Perhaps, something in your configuration is preventing this event processor from running as expected.
How do you use Sentry?
Self-hosted/on-premise
Version
2.5.1
Steps to Reproduce
1) demo.py
2) Run a worker with
arq demo.WorkerSettings
Expected Result
Expected transaction name in Sentry is
task
Actual Result
But got
unknown arq task
because it hardcoded in the integration https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/arq.py#L103But the task name can be extracted fron
job_id