feat: exit spans, infer destination.service.resource
This adds the explicit concept of "exit spans" -- spans the represent an
outgoing call to a downstream service. An exit span doesn't have child
spans. (Technically it can have spans of the same type+subtype, but this
agent doesn't have any cases of that.) An exit span is explicitly marked
at creation time by setting the exitSpan option to true.
https://github.com/elastic/apm/blob/master/specs/agents/tracing-spans.md#exit-spans
For exit spans the 'span.context.destination.service.resource' is
automatically inferred from other context. This can be overriden with
the new span.setDestinationService(resource).
https://github.com/elastic/apm/blob/master/specs/agents/tracing-spans-destination.md
Fixes: #2103
Checklist
- [ ] Implement code
- [ ] inferred http resource from URL (avoid re-parsing)
- [x] no-child-span handling
- [ ] perhaps include http context in ES and aws-sdk spans as part of this PR
- [ ] this likely depends on parent/child run-context fixes from #2430
- [ ] Add tests
- [x] Update TypeScript typings
- [x] Update documentation
- [ ] Add CHANGELOG.asciidoc entry
- [x] Commit message follows commit guidelines
:broken_heart: Build Failed
the below badges are clickable and redirect to their specific view in the CI or DOCS
![]()
![]()
![]()
![]()
![]()
Expand to view the summary
Build stats
-
Start Time: 2021-11-29T15:24:48.700+0000
-
Duration: 33 min 35 sec
-
Commit: 2dda24f3a6c209de5c0863c7f40d356c5ab9d94b
Test stats :test_tube:
| Test | Results |
|---|---|
| Failed | 0 |
| Passed | 22 |
| Skipped | 0 |
| Total | 22 |
Steps errors 
Expand to view the steps failures
Show only the first 10 steps failures
Run Tests
- Took 4 min 5 sec . View more details here
- Description:
.ci/scripts/test.sh -b "release" -t "" "12"
Run Tests
- Took 8 min 21 sec . View more details here
- Description:
.ci/scripts/test.sh -b "release" -t "" "12"
Run Tests
- Took 4 min 5 sec . View more details here
- Description:
.ci/scripts/test.sh -b "release" -t "" "12"
Run Tests
- Took 8 min 22 sec . View more details here
- Description:
.ci/scripts/test.sh -b "release" -t "" "12.0"
Run Tests
- Took 4 min 13 sec . View more details here
- Description:
.ci/scripts/test.sh -b "release" -t "" "12.0"
Run Tests
- Took 8 min 14 sec . View more details here
- Description:
.ci/scripts/test.sh -b "release" -t "" "12.0"
Run Tests
- Took 4 min 5 sec . View more details here
- Description:
.ci/scripts/test.sh -b "release" -t "" "12.0"
Sleep
- Took 1 min 47 sec . View more details here
- Description:
5
Windows Batch Script
- Took 1 min 29 sec . View more details here
- Description:
node test/test.js
Error signal
- Took 0 min 0 sec . View more details here
- Description:
hudson.AbortException: script returned exit code 1
:robot: GitHub comments
To re-run your PR in the CI, just comment with:
-
/test: Re-trigger the build. -
run module tests for <modules>: Run TAV tests for one or more modules, where<modules>can be either a comma separated list of modules (e.g. memcached,redis) or the string literal ALL to test all modules -
run benchmark tests: Run the benchmark test only. -
runelasticsearch-ci/docs: Re-trigger the docs validation. (use unformatted text in the comment!)
This was obsoleted by #2552 that added exit spans and #2882 that added service.target.* fields, and the inference of destination.service.resource from service.target.* and other span fields.