-
Notifications
You must be signed in to change notification settings - Fork 118
Add destination spec #435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add destination spec #435
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b88cfcb
Add destination spec
felixbarny 8b81c58
Apply @eyalkoren's review suggestions
felixbarny 6d8c2e7
Add overview and links
felixbarny 60df385
Specify destination fields for HTTP spans
felixbarny f6af9a7
Fix link to SIEM integration announcement blog
felixbarny f5e5a20
Remove parts that don't describe the status quo
felixbarny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
## Span destination | ||
|
||
Spans representing an external call MUST have `context.destination` information. | ||
If the span represents a call to an in-memory database, the information SHOULD still be set. | ||
|
||
Agents SHOULD have a generic component used in all tests that validates that the destination information is present for exit spans. | ||
Rather than opting into the validation, the testing should provide an opt-out if, | ||
for whatever reason, the destination information can't or shouldn't be collected for a particular exit span. | ||
|
||
### Destination service fields | ||
|
||
#### `context.destination.service.name` | ||
|
||
ES field: `span.destination.service.name` | ||
|
||
The identifier for the destination service. | ||
|
||
For HTTP, use scheme, host, and non-default port (e.g. `http://elastic.co`, `http://apm.example.com:8200`). | ||
For anything else, use `span.subtype` (e.g. `postgresql`, `elasticsearch`). | ||
|
||
**Usage** | ||
|
||
Currently, this field is not anywhere within the product. | ||
felixbarny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### `context.destination.service.resource` | ||
|
||
ES field: `span.destination.service.resource` | ||
|
||
Identifies unique destinations for each service. | ||
|
||
**Usage** | ||
|
||
Each unique resource will result in node on the service map. | ||
felixbarny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Also, APM Server will roll up metrics based on the resource. | ||
These metrics are currently used for the [dependencies table](https://www.elastic.co/guide/en/kibana/current/service-overview.html#service-span-duration) | ||
on the service overview page. | ||
There are plans to use the service desination metrics in the service map, too. | ||
felixbarny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The metrics are calculated based on the (head-based) sampled span documents that are sent to APM Server. | ||
That's why agents have to send the [`sample_rate`](tracing-sampling.md#effect-on-metrics) | ||
attribute for transactions and spans: | ||
It is used by APM Server to extrapolate the service destination metrics based on the (head-based) sampled spans. | ||
|
||
**Cardinality** | ||
|
||
To avoid a huge impact on storage requirements for metrics, | ||
and to not "spam" the service map with lots of fine-grained nodes, | ||
the cardinality has to be kept low. | ||
However, the cardinality should, not be too low, either, | ||
so that different clusters, instances, or queues can be displayed separately in the service map. | ||
|
||
Generally, the value would look something like `${span.type}/${cluster}`. | ||
The specs for the specific technologies will have more information on how to construct the value for `context.destination.service.resource`. | ||
|
||
#### `context.destination.service.type` | ||
|
||
ES field: `span.destination.service.type` | ||
|
||
Type of the destination service, e.g. `db`, `elasticsearch`. | ||
Should typically be the same as `span.type`. | ||
Used to displaying different icons on the service map. (TODO confirm) | ||
felixbarny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Destination fields | ||
|
||
These fields are used within the APM/SIEM integration. | ||
They don't play a role for service maps. | ||
|
||
#### `context.destination.address` | ||
|
||
ES field: [`destination.address`](https://www.elastic.co/guide/en/ecs/current/ecs-destination.html#_destination_field_details) | ||
|
||
Address is the destination network address: hostname (e.g. `localhost`), FQDN (e.g. `elastic.co`), IPv4 (e.g. `127.0.0.1`) IPv6 (e.g. `::11`) | ||
felixbarny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### `context.destination.port` | ||
|
||
ES field: [`destination.port`](https://www.elastic.co/guide/en/ecs/current/ecs-destination.html#_destination_field_details) | ||
|
||
Port is the destination network port (e.g. 443) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.