elastic / elastic/apm-agent-nodejs

excise unicode-byte-truncate usage, in favour of char-count-based truncation

Open
#2,344 0 comments 0 reactions 0 assignees View on GitHub
agent-nodejs performance
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

In https://github.com/elastic/apm-nodejs-http-client/pull/162 we moved the http client away from unicode-byte-truncate for (a) conformance with other agents and (b) perf. For perf we should look at the current uses of unicode-byte-truncate in the agent code and see if there are perf wins there. For example, the following in parsers.js might be really slow in some cases.

```js
if (body.length > _MAX_HTTP_BODY_CHARS) {
body = truncate(body, _MAX_HTTP_BODY_CHARS)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.