Skip to content

Commit 8715c6a

Browse files
authored
Add new feature to Oban docs (Elixir) (#12631)
1 parent 8bf4d39 commit 8715c6a

File tree

1 file changed

+24
-0
lines changed
  • docs/platforms/elixir/integrations/oban

1 file changed

+24
-0
lines changed

docs/platforms/elixir/integrations/oban/index.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,27 @@ You can use this for more complex filtering logic based on number of attempts an
5656

5757
See <Link to="/platforms/elixir/configuration/filtering">the documentation for event callbacks</Link>.
5858
</Alert>
59+
60+
### Customizing Job Check-In Information
61+
62+
If you want to customize the information that is sent to Sentry when a job checks in, you can do so by providing a function that takes the job and returns a map of metadata.
63+
64+
```elixir {filename:lib/my_app/my_worker.ex}
65+
defmodule MyApp.MyWorker do
66+
use Oban.Worker
67+
68+
@behaviour Sentry.Integrations.Oban.Cron
69+
70+
@impl Oban.Worker
71+
def perform(args) do
72+
# ...
73+
end
74+
75+
@impl Sentry.Integrations.Oban.Cron
76+
def sentry_check_in_configuration(job) do
77+
[monitor_slug: "custom-slug-#{job.id}"]
78+
end
79+
end
80+
```
81+
82+
This is available since v10.9.0 of the SDK.

0 commit comments

Comments
 (0)