elastic / elastic/apm-agent-nodejs
Refactor filterSensitiveHeaders in lib/filters/http-headers.js
Open
agent-nodejs
performance
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
Re:
```
function filterSensitiveHeaders (headers) {
for (const key in headers) {
```
> Unrelated to this change: Wouldn't it typically be faster to iterate through the set of sensitive headers, rather than iterating through the set of given headers? I say "typically" because my guess is request and response headers generally number greater than 3. Anyway, if you agree, I can open a ticket to consider changing this. Low prio, this is possible premature optimization.
Contributor guide
Assessment
This issue has not been assessed yet.