Commit ca4a561
authored
fix: log plugin name in case the handler throws (#6947)
In case a plugin handler fails, it will deactivate the plugin.
While doing so, the plugin that failed is logged. The id is placed
on the constructor though, not on the instance. Due to that, it
would log undefined so far.
Fixing it by using the constructor is also not ideal though, due
to having more than a single plugin with the same id. That id
represents the instrumentation, not the plugin itself.
An instrumentation can actually have multiple plugins and the
failure will only deactivate a specific plugin. Therefore, the
information about what plugin will be deactivated should log the
name of the plugin instead of the id.1 parent 26e7402 commit ca4a561
File tree
2 files changed
+27
-19
lines changed- packages/dd-trace
- src/plugins
- test/plugins
2 files changed
+27
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 121 | + | |
127 | 122 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
133 | 128 | | |
134 | 129 | | |
135 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
| |||
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
37 | | - | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
| |||
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
49 | | - | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
53 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
54 | 67 | | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
60 | | - | |
| 73 | + | |
61 | 74 | | |
62 | 75 | | |
63 | 76 | | |
64 | | - | |
| 77 | + | |
65 | 78 | | |
66 | 79 | | |
67 | 80 | | |
| |||
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
82 | | - | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
0 commit comments