Commit 6e307db
Automatic LoaderOptimization.SingleDomain (#4187)
* All non-default app domains use LoaderOptimization.SingleDomain
Solves "Loading this assembly would produce a different grant set from other instances" for IIS .Net Framework applications.
__DDVoidMethodType__ injected to mscorlib.
__DDVoidMethodType__.__DDPatchAppDomainSetup__ use reflection-created delegate that calls
OpenTelemetry.AutoInstrumentation.Loader.AppConfigUpdater.ModifyConfig to modify AppDomainSetup by setting LoaderOptimization.SingleDomain.
That method called from AppDomain.CreateDomain and AppDomainManager.CreateDomainHelper.
OpenTelemetry.AutoInstrumentation.Loader.AppConfigUpdater loader assembly loaded from __DDVoidMethodType__ static ctor.
Added helpers: SignatureBuilder and MemberResolver.
* Added installer parameter to skip GAC registration
Added Asp.Net tests without registration assemblies in GAC.
Removed LoaderOptimization=SingleDomain through registry change for ASP.Net tests.
* Removed LoaderOptimization workaround from test dockerfiles
* Code format applied
* Updated test build to produce no-GAC docker images
* Extended SignatureBuilder by providing semi-safe wrappers
Moved it to be header-only.
Added unit tests for SignatureBuilder.
* Updated change log and documentation
* Removed Troubleshooting link from IIS instrumentation docs
* Fixed accident docker file changes
* Added comment about callers of AppConfigUpdater.ModifyConfig
* Update CHANGELOG.md typo based on review
Co-authored-by: Chris Ventura <[email protected]>
* Smaller cleanups
* Minor names/comments changes based on @zacharycmontoya review
* Fixed formatting
* Make AppConfigUpdater internal
---------
Co-authored-by: Chris Ventura <[email protected]>1 parent 35976ea commit 6e307db
File tree
18 files changed
+2200
-576
lines changed- build
- docs
- script-templates
- src
- OpenTelemetry.AutoInstrumentation.Loader
- OpenTelemetry.AutoInstrumentation.Native
- test
- IntegrationTests
- OpenTelemetry.AutoInstrumentation.Native.Tests
- test-applications/integrations
- TestApplication.AspNet.NetFramework
- TestApplication.Owin.IIS.NetFramework
- TestApplication.Wcf.Server.IIS.NetFramework
18 files changed
+2200
-576
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
Lines changed: 40 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
298 | 328 | | |
299 | 329 | | |
300 | 330 | | |
| |||
308 | 338 | | |
309 | 339 | | |
310 | 340 | | |
311 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
312 | 344 | | |
313 | 345 | | |
314 | 346 | | |
| |||
332 | 364 | | |
333 | 365 | | |
334 | 366 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
| 367 | + | |
| 368 | + | |
350 | 369 | | |
351 | | - | |
352 | 370 | | |
353 | 371 | | |
354 | 372 | | |
| |||
406 | 424 | | |
407 | 425 | | |
408 | 426 | | |
409 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
410 | 430 | | |
411 | 431 | | |
412 | 432 | | |
| |||
436 | 456 | | |
437 | 457 | | |
438 | 458 | | |
439 | | - | |
| 459 | + | |
440 | 460 | | |
441 | 461 | | |
442 | 462 | | |
| |||
660 | 680 | | |
661 | 681 | | |
662 | 682 | | |
| 683 | + | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| 215 | + | |
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
| |||
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| 235 | + | |
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
| |||
0 commit comments