New features
Added
newrelic.startSegment(), which replacesnewrelic.createTracer().This new API method allows you to create custom segments using either callbacks or promises.
Bug fixes
Fixed bug in
preroute config option in Hapi instrumentation.Only applies to Hapi v16 and below. The pre handler wrapping was not properly returning in cases when the element was a string referring to a registered server method, and as a result these elements would be replaced with
undefined.
New features
Added @newrelic/koa as a dependency.
This introduces instrumentation for Koa v2.0.0 or higher. It will be treated as first-party instrumentation within the agent, but publishing it as a separate module allows it to be installed independently according to users' needs.
Improvements
Refactored instrumentation hooks to work with modules.
With this change it is now possible to link against external instrumentation modules.
Improvements
Promise based web framework middleware instrumentation now supports callback based sequencing.
Previously, a promise based middleware was assumed to continue to the next middleware once the promise it returned resolved. This assumption has been relaxed to allow for a callback to be supplied to the middleware to invoke the next middleware.
Improvements
Removed the
sslconfiguration option.TLS is now always used in communication with New Relic Servers. The
sslconfiguration value andNEW_RELIC_USE_SSLenvironment value are no longer used. Setting either value to anything other thantruewill result in a warning.Security bulletin NR18-05:
Fixes issue introduced in 2.8.0 where the agent may have captured all transaction attributes, even with High-security mode enabled on the account. This may have included sensitive data attached to transactions.
All request parameters now prefixed with
request.parameters..Previously request parameters such as route and query parameters were added as attributes without any name changes. For example
/foo?bar=valuewould add the attributebarto the transaction. Now this attribute would be namedrequest.parameters.bar.Any Insights dashboards, alerts, or other NRQL queries using these attributes must be updated to use the new attribute names.
Adds support for EU Datacenter
Bug fixes
Security bulletin NR18-06:
Fixes issue introduced in 2.8.0 where the agent may have captured all transaction attributes, even with High-security mode enabled on the account. This may have included sensitive data attached to transactions.
Removed support for agent attributes include/exclude rules.
These will be coming back in Node Agent v3.0.0. The fix for the above security bulletin required a backwards incompatible change to our attributes.
Fixed bug in Bluebird instrumentation.
Some methods were not instrumented correctly. This would cause a problem if a function was passed to these methods.
Special thanks to Andreas Lind (@papandreou) for helping us find this bug.
Note
This release is deprecated due to an issue where the agent may capture transaction attributes regardless of agent settings. If you are using this release, upgrade your agent to agent version 2.9.1 or higher. For more information, see Security Bulletin NR18-06.
Improvements
Added the
WebFrameworkShim#savePossibleTransactionNamemethod.This method may be used to mark the current running middleware as a potential responder.
savePossibleTransactionNameshould be used if a middleware can't be determined to be a terminal middleware while it executes, but may be responsible for responding after execution has finished.Fixed
dns.resolveresults assertion.Expanded
async_hookstests around maintain transaction context.Added Koa to metric naming objects.
Added
callbackprop tomiddlewareWithPromiseRecorderreturn spec.While we aren't actually wrapping any callback, this is a workaround that gives us access to the active segment. This ensures that all segments inside Koa transaction traces are named correctly, particularly in cases when transaction context may be lost.
Updated
afterprop inmiddlewareWithPromiseRecorderreturn spec to settxInfo.errorHandled = truein cases when there is no error.Because Koa has no concept of errorware in the same sense as Express or Connect (
(err, req, res, next)), the agent now assumes if a middleware resolves, any error that may have occurred can be marked as handled.
Fixes
- Added check for
parentSegmentinasync_hooksinstrumentation, to help ensure that transaction context is maintained.
Note
This release is deprecated due to an issue where the agent may capture transaction attributes regardless of agent settings. If you are using this release, upgrade your agent to agent version 2.9.1 or higher. For more information, see Security Bulletin NR18-06.
New features
Added instrumentation support for MongoDB version 3.
Version 3 of mongodb is now supported. Previously datastore host information (instance metrics) was incorrectly captured by the agent with
mongodbv3. This has been fixed and all features should be functional now.
Improvements
Updated documentation for
apdex_tsetting and removed environment variable.This was never configurable on client side and the documentation was misleading.
Documented environment variables for
slow_sqlconfigurations.Thanks to Olivier Tassinari (@oliviertassinari) for the update!
Updated
hapi/hapi-pre-17/package.jsonto runerrors.tap.jsin more versions.Added internal cache to unwrapped core modules for agent use.
Improved logging around environment facts gathering.
Bug fixes
Enable certain agent attributes when high-security mode is enabled.
During the switch from the old
capture_params/ignored_paramsto the new attribute include/exclude rules, high-security mode was over-zealous in what attributes it disallowed. This has been trimmed back to be in line with other agents.
Notes
Changed
attributes.enabledtotrueby default.In the previous version we defaulted this to
falseto maintain parity withcapture_paramswhich defaulted tofalse. However, this is a invalid parity becauseattribute.enabledcontrols more attributes thancapture_params.
Improvements
Removed unnecessary checks around
Timer.unref()calls.unrefhas been supported since Node v0.9, meaning it will always be present in timers set by the agent (with 0.10 being the earliest supported version).Added a split in the node versions for the
mysql2andcassandraversioned tests.As of
mysql2v1.3.1 andcassandrav3.4.0 the minimum supported version of Node is 4.Replaced as many instances of
{}as possible withObject.create(null).Removed extraneous logger arg in
addCustomAttributecall.
Bug fixes
The agent will no longer generate browser data for ignored transactions.
Expanded Hapi instrumentation to support route
prehandlers.This is a Hapi route config option that was previously uninstrumented, causing transaction names to become invalid. This expanded instrumentation ensures that all additional handlers are wrapped and associated with the main route.
새로운 기능
포함 및 제외 규칙을 통한 에이전트 속성 필터링을 추가했습니다.
에이전트 속성은 이제 세분화된 포함 및 제외 규칙을 사용하여 제어할 수 있습니다. 아래에 설명된 이 규칙은
capture_params및ignored_params을(를) 대체합니다.attributes.exclude이(가) 명시적으로 설정되지 않는 한,ignored_params에 나열된 모든 속성은 내부적으로attributes.exclude(으)로 마이그레이션됩니다.루트 설정 및 각 대상(대상에 대해서는 나중에 자세히 설명)에 세 가지 새로운 설정 속성이 추가되었습니다. 이러한 새로운 설정은 다음과 같습니다:
attributes.enabled- 대상에 대한 속성 수집을 활성화합니다.attributes.include- 포함할 속성 또는 와일드카드 규칙의 목록입니다.attributes.exclude- 제외할 속성 또는 와일드카드 규칙의 목록입니다.
포함 및 제외 규칙은 정확한 규칙(예:
request.headers.contentLength)이거나 속성 키의 시작 부분만 일치하는 와일드카드 규칙(예:request.headers.*은(는) 모든 요청 헤더와 일치함)일 수 있습니다.이러한 규칙은 설정의 루트에서 전역으로 지정하거나 특정 대상에 대해 지정할 수 있습니다. 이러한 대상은 다음과 같습니다:
transaction_tracer- 트랜잭션 트레이스 속성을 제어합니다.transaction_events- 트랜잭션 이벤트 속성을 제어합니다.error_collector- 오류 이벤트 속성을 제어합니다.browser_monitoring- 브라우저/RUM 트랜잭션 속성을 제어합니다.
addCustomParameter을(를)addCustomAttribute(으)로 이름을 변경했습니다.addCustomParameter메서드는 이제 더 이상 사용되지 않으며 향후 에이전트 릴리스에서 제거됩니다.addCustomAttribute메서드는 이를 바로 대체할 수 있습니다.에이전트 속성 필터링에 캐시를 추가했습니다.
속성 규칙 적용의 오버헤드를 최소화하기 위해 에이전트는 특정 속성 키 및 대상의 필터링 결과를 캐시합니다. 캐시는 기본적으로 1,000개의 대상-키 쌍으로 제한되지만
attributes.filter_cache_limit(으)로 구성할 수 있습니다. 이 캐시는 캐시 히트에 대한 필터 규칙을 적용할 때 10배의 향상을 제공합니다.구성 옵션에
allow_all_headers을(를) 추가하고http계측을 업데이트했습니다.true(으)로 설정하면 에이전트가 모든 요청 헤더를 수집합니다. 이 수집은 에이전트 속성 포함 및 제외 규칙을 준수합니다. 기본 제외 규칙 세트는newrelic.js에 제공됩니다. 이 규칙은 모든 쿠키 및 인증 헤더를 제외합니다.이제 세그먼트가 불투명으로 플래그 지정될 수 있으며, 이로 인해 내부 세그먼트가 트랜잭션 트레이스에서 생략됩니다.
개량
모니터링 오버헤드를 낮게 유지하기 위해 에이전트 속성에 대한 제한을 추가했습니다.
속성 키와 값은 각각 255바이트로 제한됩니다. 255바이트보다 큰 키는 삭제되며, 경고 메시지가 로그에 기록됩니다. 255바이트보다 큰 값은 멀티바이트 UTF-8 인코딩을 준수하여 255바이트로 잘립니다. 커스텀 속성은 트랜잭션당 64개로 제한됩니다. 64번째를 초과하는 속성은 알림 없이 무시됩니다.
수집기 연결 실패 로그 메시지에 오류를 추가했습니다.
request_uri속성의 이름을request.uri(으)로 변경했습니다.이렇게 하면 속성 이름이 다른 모든 요청 속성과 일치하게 됩니다.
https-proxy-agent의존성을^0.3.5에서^0.3.6(으)로 업데이트했습니다.계측된 모듈의 대부분의 마이너 버전이 예상대로 작동하도록 해당하는 경우 버전이 지정된 테스트를 업데이트했습니다.
Mongo 드라이버의 v1 라인에 대한 지연되는 테스트를 수정했습니다.
Hapi 404 트랜잭션이 올바르게 명명된 메트릭을 생성하는지 확인하는 테스트를 추가했습니다.
Hapi 계측은 올바르게 작동했지만, 이 특정 사례에 대한 테스트가 없었습니다.
버그 수정
crypto.DEFAULT_ENCODING이(가) 변경될 때 에이전트가 더 이상 충돌하지 않습니다.이전에 에이전트는
hash.digest()의 결과가 Buffer의 인스턴스라고 가정했습니다.crypto.DEFAULT_ENCODING이(가) 변경되면hash.digest()이(가) 문자열을 반환하고 에이전트가 충돌합니다. 이제 에이전트는 계속 진행하기 전에 값이 Buffer 인스턴스인지 확인합니다.process.config.variables.node_prefix이(가) 누락된 경우의 오류를 수정했습니다.process.config.variables.node_prefix이(가) falsey인 경우(Electron을 사용할 때 발생할 수 있으며, 이 문제 https://support.newrelic.com/s/hubtopic/aAX8W0000008ZMO/new-relic-on-electron-nodejs로 이어짐)lib/environment.js의getGlobalPackages함수는 오류가 발생하지 않아야 할 때 오류를 발생시킵니다.수정해 주신 Jarred Filmer(@BrighTide) 님께 감사드립니다!