Commit 4ecfe9e
committed
feat(crashtracker): add orchestrion auto-injection aspect
Add an orchestrion aspect that prepends crashtracker.Start() as the first
statement of every program's main() function at compile time, enabling
transparent crash report capture without any source changes.
The aspect uses prepend-statements (not inject-declarations/func init())
because SetCrashOutput must run inside main(), after all package init()s
have completed but before any user code executes. This matches the RFC's
requirement for the monitor process to be established before any goroutine
can crash.
Env-gating (DD_CRASHTRACKING_ENABLED, default true) is handled inside
Start() itself, so the injected statement is a single unconditional call.
Regenerates orchestrion/all/orchestrion.tool.go to include the crashtracker
package. Adds a harness integration test confirming the aspect wires correctly
under orchestrion's compile-time transformation.1 parent 323af46 commit 4ecfe9e
4 files changed
Lines changed: 74 additions & 0 deletions
File tree
- crashtracker
- internal/orchestrion/_integration/crashtracker
- orchestrion/all
| 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 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
Lines changed: 27 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 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments