-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option for generating custom cron monitor slugs #803
Add option for generating custom cron monitor slugs #803
Conversation
Thanks for the PR. This sounds like a good addition to me. I approved the test run but unfortunately the tests didn't pass, any chance you could take a look and make them pass? 😄 |
Edit: I started typing this response out but then had an
Here's a seed on my branch that my tests pass, but there's another test that fails: ✘ mz@mz-deca ~/s/sentry-elixir task/allow-custom-cron-monitor-name-generation ⁝ ✱
[orbstack|default] ❯ mix test --seed 441419 [10:00:16]
Wrote 37 files in 265.39 kb to: _build/test/lib/sentry/priv/sentry.map
...............................
1) test with Plug sends two errors when a Plug process crashes if cowboy domain is not excluded (Sentry.LoggerHandlerTest)
test/sentry/logger_handler_test.exs:99
Assertion with == failed
code: assert second_event.original_exception == %RuntimeError{message: "Error"}
left: nil
right: %RuntimeError{message: "Error"}
stacktrace:
test/sentry/logger_handler_test.exs:109: (test)
...............................................................................................................................................................................................................................................................
Finished in 2.1 seconds (0.6s async, 1.4s sync)
13 doctests, 274 tests, 1 failure
Randomized with seed 441419
On
But the following test passes:
I just cleaned up the warnings about the unused variable. And I also believe I found the cause for my tests to fail, and fixed them. But there still appears to be the same flaky test from above ( |
I wont have time to review this this week as I’m on vacay, will review on Monday. |
I can't reproduce this. I also left running tests for like over an hour in a loop and they didn't fail :/ |
This appears it may be related to the elixir/otp version? It errors for me on 1.16.2 / 26.2.5 but if I upgrade to 1.17.2 / 27.0.1 it doesn't fail. Edit: I did a little more testing... 1.16.2 / 26.2.5.3 ❌ So, it looks like it's fixed with elixir 1.16.3. Maybe this isn't an issue that needs to be addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Left some comments but this is looking like a great start 🙃
Thank you, @whatyouhide, for all of the suggestions! 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@savhappy review and merge when you get the time plz :)
We've recently adopted the Oban integration with Sentry but have noticed that some of our jobs do not play nice with the assumptions in the library. We have a pattern of reuse of cron workers where there's an argument that is the key differentiator. As one example, this might be a
client_id
.We would like to be able to monitor these cron jobs separately.
I would be happy to add/improve more testing and/or documentation. I really just wanted to get this opened as a starting point for discussion.
🙏 Thank you for this consideration.