elastic / elastic/apm-agent-nodejs
don't attempt to trace the agent's own cloud-metadata collection requests
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
With `ELASTIC_APM_LOG_LEVEL=debug` logging and with `cloudProvider: 'auto'` the debug log output from the agent shows this:
```
[2021-10-14T17:53:33.699Z] DEBUG (elastic-apm-node): no active transaction found - cannot build new span
[2021-10-14T17:53:33.699Z] DEBUG (elastic-apm-node): intercepted call to http.request {"id":null}
[2021-10-14T17:53:33.700Z] DEBUG (elastic-apm-node): no active transaction found - cannot build new span
[2021-10-14T17:53:33.700Z] DEBUG (elastic-apm-node): intercepted call to http.request {"id":null}
[2021-10-14T17:53:33.700Z] DEBUG (elastic-apm-node): no active transaction found - cannot build new span
[2021-10-14T17:53:33.700Z] DEBUG (elastic-apm-node): intercepted call to http.request {"id":null}
```
These are (pretty sure) from the requests being made by cloud metadata collection using instrumented `http.request()`. It would be nice to do the same thing as in https://github.com/elastic/apm-nodejs-http-client/pull/161 use *uninstrumented* `http.request()` for these metadata collection requests.
Contributor guide
Assessment
This issue has not been assessed yet.