Commit 8cb759d
committed
fix(native-spans): let an explicit agent exporter win in a Lambda
The Lambda no-local-agent probe selected the stdout exporter whenever
neither the extension layer nor the mini agent was present, without
looking at what the user had configured. `getExporter` on master matched
the configured name in a switch and returned before it ever reached that
probe, so `exporter: 'agent'` in a Lambda kept using the agent.
Restoring that precedence fixes suites that set both
`DD_TRACE_EXPERIMENTAL_EXPORTER=agent` and `AWS_LAMBDA_FUNCTION_NAME`
and then wait for traces at the test agent: their spans were being
written to stdout instead, so every assertion timed out. The fetch
plugin's "in serverless" block went from four 25s timeouts to passing,
and the whole suite from 4m to 2s.1 parent 0d5b587 commit 8cb759d
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
0 commit comments