* Migrate changes from Tempo PR Signed-off-by: Jack Baldry <[email protected]> * Updates to resolve conflicts * Move getting started files * Fix aliases * Merge remote-tracking branch 'origin/master' into jdb/2025-07-tempo-set-up-restructure Signed-off-by: Jack Baldry <[email protected]> * Discard changes to content/docs/tempo/next/sync.json * Add aliases Signed-off-by: Jack Baldry <[email protected]> * Fix some aliases Signed-off-by: Jack Baldry <[email protected]> * Updates from rebase * Apply suggestions from code review Co-authored-by: Jack Baldry <[email protected]> * Apply suggestions from code review Co-authored-by: Jack Baldry <[email protected]> * Update content/docs/tempo/next/set-up-for-tracing/instrument-send/set-up-collector/tail-sampling/policies-strategies.md Co-authored-by: Jack Baldry <[email protected]> * Fix links on tile page and test page * Fix links and update missing content * Fix links * Fix links * Fix links and collector text * Updates from Alex's feedback * Link fixes * Fix links in deploy * Fix links * More link fixes * Fix yet more links * Fix more links * Apply suggestions from code review Co-authored-by: Jack Baldry <[email protected]> * Update content/docs/tempo/next/set-up-for-tracing/setup-tempo/test/set-up-test-app.md * Update content/docs/tempo/next/set-up-for-tracing/setup-tempo/test/set-up-test-app.md * Apply suggestions from code review * Add deploy preview workflow Signed-off-by: Jack Baldry <[email protected]> * Updates for Tiffany's suggested edits * Update manifest according to PR instructions --------- Signed-off-by: Jack Baldry <[email protected]> Co-authored-by: Kim Nylander <[email protected]>
2.5 KiB
title, menuTitle, description, weight, aliases
| title | menuTitle | description | weight | aliases | |
|---|---|---|---|---|---|
| Estimate cardinality from traces | Estimate cardinality | Estimate cardinality from traces to understand the impact of service graphs. | 400 |
|
Estimate cardinality from traces
Cardinality can pose a problem when you have lots of services. There isn't a direct formula or solution to this issue. The following guide should help estimate the cardinality that a feature generates.
For more information on cardinality, refer to the Cardinality documentation.
How to estimate the cardinality
The amount of edges depends on the number of nodes in the system and the direction of the requests between them. Let’s call this amount hops. Every hop is a unique combination of client + server labels.
For example:
- A system with 3 nodes
(A, B, C)of whichAonly callsBandBonly callsCwill have 2 hops(A → B, B → C) - A system with 3 nodes
(A, B, C)that call each other (that is, all bidirectional links) will have 6 hops(A → B, B → A, B → C, C → B, A → C, C → A)
You can’t calculate the amount of hops automatically based upon the nodes,
but it should be a value between #services - 1 and #services!.
If you know the amount of hops in a system, you can calculate the cardinality of the generated
service graphs (assuming #hb is the number of histogram buckets):
traces_service_graph_request_total: #hops
traces_service_graph_request_failed_total: #hops
traces_service_graph_request_server_seconds: #hb * #hops
traces_service_graph_request_client_seconds: #hb * #hops
traces_service_graph_unpaired_spans_total: #services (absolute worst case)
traces_service_graph_dropped_spans_total: #services (absolute worst case)
Finally, you get the following cardinality estimation:
Sum: [([2 * #hb] + 2) * #hops] + [2 * #services]
{{< admonition type="note" >}}
If enable_messaging_system_latency_histogram configuration is set to true, another histogram is produced:
traces_service_graph_request_messaging_system_seconds: #hb * #hops
In that case, the estimation formula would be:
Sum: [([3 * #hb] + 2) * #hops] + [2 * #services]
{{< /admonition >}}
{{< admonition type="note" >}} To estimate the number of metrics, refer to the Dry run metrics generator documentation. {{< /admonition >}}