You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: INTEGRATIONS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
**High‑Level Flow**
6
6
7
7
- Add a typed log structure under `lib/log_struct/log/` (so the docs generator picks it up).
8
-
- Add a configuration toggle in `ConfigStruct::Integrations` and wire it into `Integrations.setup_integrations`.
8
+
- Add a configuration toggle in `ConfigStruct::Integrations` and wire it into `Integrations.setup_integrations` via the appropriate stage (`:non_middleware` for instrumentation hooks, `:middleware` when the integration inserts Rack middleware).
9
9
- Implement the integration under `lib/log_struct/integrations/…` to produce that log type.
10
10
- Add the dev dependency for the third‑party gem and generate RBIs with Tapioca.
11
11
- Add tests (unit + behavior) under `test/log_struct/integrations` and (if needed) `test/log_struct/log`.
@@ -74,7 +74,7 @@
74
74
-`prop :enable_<name>, T::Boolean, default: true`
75
75
- In `lib/log_struct/integrations.rb`:
76
76
-`require_relative "integrations/<name>"`
77
-
- Call `Integrations::<Name>.setup(config)` inside `setup_integrations` behind the toggle.
77
+
- Call `Integrations::<Name>.setup(config)` inside `setup_integrations`, selecting the stage that matches your integration (`:non_middleware` for subscribers/hooks, `:middleware` for Rack additions). Most integrations belong in the default `:non_middleware` stage; only code that mutates the middleware stack should go in `:middleware`.
0 commit comments