Commit 09376b1
committed
Pass dd_debugger source as an explicit override
Previously, the Debugger SDK set `source: 'dd_debugger'` on its init
configuration so it would flow into the `ddsource` URL parameter, which
forced `validateAndBuildConfiguration` to convert it back to 'browser'
via a `toSdkSource` helper before storing on `Configuration.source`
(used as the SDK source on RUM events). The round-trip was confusing
because the same field was playing two roles: URL routing source and
RUM event SDK source.
Split them apart:
- `InitConfiguration.source` no longer accepts 'dd_debugger'.
- `computeTransportConfiguration` takes an optional `sourceOverride`
parameter (typed `TransportSource`, includes 'dd_debugger') used only
for URL building. The Debugger SDK passes 'dd_debugger' there.
- Function overloads narrow the return type when no override is given,
so `Configuration.source` is `SdkSource` without a runtime conversion.
- `toSdkSource` is removed.
Wire behavior is unchanged: URLs still go out with
`?ddsource=dd_debugger&...&dd-evp-origin=browser`, RUM events still
carry a valid `SdkSource`, and downstream `source:dd_debugger` queries
keep working.1 parent 3be9610 commit 09376b1
4 files changed
Lines changed: 64 additions & 26 deletions
File tree
- packages
- core/src/domain/configuration
- debugger/src/transport
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | 340 | | |
345 | 341 | | |
346 | 342 | | |
| |||
404 | 400 | | |
405 | 401 | | |
406 | 402 | | |
407 | | - | |
408 | | - | |
409 | 403 | | |
410 | 404 | | |
411 | 405 | | |
| |||
431 | 425 | | |
432 | 426 | | |
433 | 427 | | |
434 | | - | |
435 | | - | |
| 428 | + | |
436 | 429 | | |
437 | 430 | | |
438 | 431 | | |
| |||
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
19 | 35 | | |
20 | 36 | | |
21 | 37 | | |
22 | | - | |
| 38 | + | |
23 | 39 | | |
24 | 40 | | |
25 | 41 | | |
| |||
40 | 56 | | |
41 | 57 | | |
42 | 58 | | |
43 | | - | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
| |||
58 | 74 | | |
59 | 75 | | |
60 | 76 | | |
61 | | - | |
| 77 | + | |
62 | 78 | | |
63 | 79 | | |
64 | 80 | | |
| |||
84 | 100 | | |
85 | 101 | | |
86 | 102 | | |
87 | | - | |
| 103 | + | |
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
| |||
Lines changed: 41 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
27 | 53 | | |
28 | | - | |
| 54 | + | |
29 | 55 | | |
30 | | - | |
31 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
32 | 59 | | |
33 | 60 | | |
34 | 61 | | |
| |||
38 | 65 | | |
39 | 66 | | |
40 | 67 | | |
41 | | - | |
42 | | - | |
| 68 | + | |
| 69 | + | |
43 | 70 | | |
44 | 71 | | |
45 | 72 | | |
46 | 73 | | |
47 | 74 | | |
48 | | - | |
| 75 | + | |
49 | 76 | | |
50 | 77 | | |
51 | 78 | | |
| |||
57 | 84 | | |
58 | 85 | | |
59 | 86 | | |
60 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
61 | 90 | | |
62 | 91 | | |
63 | 92 | | |
64 | 93 | | |
65 | | - | |
| 94 | + | |
66 | 95 | | |
67 | 96 | | |
68 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments