Skip to content

Commit 28cce05

Browse files
committed
doc: Document process of adding new integration
1 parent ab9c4e5 commit 28cce05

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

CONTRIBUTING.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,33 @@ must have `twine` installed globally.
2020

2121
The usual release process goes like this:
2222

23-
1. Go through git log and write new entry into `CHANGELOG.md`, commit to master
23+
1. Go through git log and write new entry into `CHANGES.md`, commit to master
2424
2. `craft p a.b.c`
2525
3. `craft pp a.b.c`
26+
27+
## Adding a new integration (checklist)
28+
29+
1. Write the integration.
30+
31+
* Instrument all application instances by default. Prefer global signals/patches instead of configuring a specific instance. Don't make the user pass anything to your integration for anything to work. Aim for zero configuration.
32+
33+
* Everybody monkeypatches. That means:
34+
35+
* Make sure to think about conflicts with other monkeypatches when monkeypatching.
36+
37+
* You don't need to feel bad about it.
38+
39+
* Avoid modifying the hub, registering a new client or the like. The user drives the client, and the client owns integrations.
40+
41+
* Allow the user to disable the integration by changing the client. Check `Hub.current.get_integration(MyIntegration)` from within your signal handlers to see if your integration is still active before you do anything impactful (such as sending an event).
42+
43+
2. Write the [docs](https://github.com/getsentry/sentry-docs). Answer the following questions:
44+
45+
* What does your integration do? Split in two sections: Executive summary at top and exact behavior further down.
46+
* Which version of the SDK supports which versions of the modules it hooks into?
47+
* One code example with basic setup.
48+
49+
Tip: Put most relevant parts wrapped in `<!--WIZARD-->..<!--ENDWIZARD-->` tags for usage from within the Sentry UI.
50+
51+
3. Merge docs after new version has been released (auto-deploys on merge).
52+
4. (optional) Update data in [`sdk_updates.py`](https://github.com/getsentry/sentry/blob/master/src/sentry/sdk_updates.py) to give users in-app suggestions to use your integration. May not be applicable or doable for all kinds of integrations.

0 commit comments

Comments
 (0)