Commit ebc2e24
authored
feat: refactor instrumentation options (#77)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adds an `Options.Instrumentation` config with per-instrument
FeatureFlags and updates client factory to use it, with ExampleApp
enabling specific instruments.
>
> - **API (Options)**:
> - Add `FeatureFlag.isEnabled` helper.
> - Introduce `Options.Instrumentation` with flags for `urlSession`,
`userTaps`, `memory`, `memoryWarnings`, `cpu`, `launchTimes`.
> - Extend `Options` with new `instrumentation` property and initializer
parameter (default `.init()`).
> - **Client Factory**:
> - Replace `autoInstrumentation.contains(...)` checks with
`options.instrumentation.<instrument>.isEnabled` for `memoryWarnings`,
`urlSession`, `launchTimes`, `memory`, and `cpu`.
> - **ExampleApp**:
> - Configure `options.instrumentation` to enable `urlSession`,
`userTaps`, `memory`, `memoryWarnings`, `launchTimes` and disable `cpu`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
dfd4291. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent b442cbc commit ebc2e24
File tree
3 files changed
+49
-7
lines changed- ExampleApp/ExampleApp
- Sources/Observability
- Api
- Client
3 files changed
+49
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
| |||
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
147 | 178 | | |
148 | 179 | | |
149 | 180 | | |
| |||
161 | 192 | | |
162 | 193 | | |
163 | 194 | | |
| 195 | + | |
164 | 196 | | |
165 | 197 | | |
166 | 198 | | |
| |||
180 | 212 | | |
181 | 213 | | |
182 | 214 | | |
183 | | - | |
| 215 | + | |
| 216 | + | |
184 | 217 | | |
185 | 218 | | |
186 | 219 | | |
| |||
199 | 232 | | |
200 | 233 | | |
201 | 234 | | |
| 235 | + | |
202 | 236 | | |
203 | 237 | | |
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
0 commit comments