-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: update APM-related tests for zero-conf and run-context changes (…
…#110) Two changes in [email protected] impacted tests here: - "Zero configuration support" changed how the APM serviceName is handled for edge cases. - Run context handling changes made it so `span.end()` actually removes the span from the current context, so log records after span.end() no longer have that span.id.
- Loading branch information
Showing
5 changed files
with
12 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,12 +107,10 @@ function ecsTransform (info, opts) { | |
? ecsFields.service.name | ||
: undefined) | ||
if (!serviceName) { | ||
// https://github.com/elastic/apm-agent-nodejs/pull/1949 is adding | ||
// getServiceName() in v3.11.0. Fallback to private `apm._conf`. | ||
// istanbul ignore next | ||
serviceName = apm.getServiceName | ||
? apm.getServiceName() | ||
: apm._conf.serviceName | ||
? apm.getServiceName() // added in [email protected] | ||
: apm._conf.serviceName // fallback to private `_conf` | ||
// A mis-configured APM Agent can be "started" but not have a | ||
// "serviceName". | ||
if (serviceName) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters