This repository was archived by the owner on Jul 28, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 513
Split trace agreggation #743
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
90defb9
Aggregate with groupbytrace processor
mapno 638f5d4
Wait 1s in the tail sampler
mapno f91a4e7
Use prom exporter
mapno 5be8da3
Rework
mapno c693828
Update documentation
mapno 0e2279a
Fix when using group by trace with tail sampling
mapno d0cf282
Add warning log
mapno b9c75bd
Fix bug
mapno 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -175,7 +175,7 @@ spanmetrics: | |
| # | ||
| # In order to make a correct sampling decision it's important that the agent has | ||
| # a complete trace. This is achieved by waiting a given time for all the spans | ||
| # before evaluating the trace. | ||
| # before evaluating the trace. In order to get complete traces, configure group_by_trace. | ||
| # | ||
| # Tail sampling also supports multiple agent deployments, allowing to group all | ||
| # spans of a trace in the same agent by load balancing the spans by trace ID | ||
|
|
@@ -186,11 +186,6 @@ tail_sampling: | |
| policies: | ||
| - [<tailsamplingprocessor.policies>] | ||
|
|
||
| # Time that to wait before making a decision for a trace. | ||
| # Longer wait times reduce the probability of sampling an incomplete trace at | ||
| # the cost of higher memory usage. | ||
| decision_wait: [ <duration> | default="5s" ] | ||
|
|
||
| # load_balancing configures load balancing of spans across multiple agents. | ||
| # It ensures that all spans of a trace are sampled in the same instance. | ||
| # Only necessary if more than one agent process is receiving traces. | ||
|
|
@@ -226,6 +221,24 @@ tail_sampling: | |
| [ username: <string> ] | ||
| [ password: <secret> ] | ||
| [ password_file: <string> ] | ||
|
|
||
| # Configures aggregation of spans by trace. | ||
| # This is of particular interest for processor that benefit from having complete | ||
| # traces, such as tail-based sampling | ||
| # | ||
| # A trace will be considered complete after the defined `wait` duration has | ||
| # passed since its first span arrived to the processors. | ||
| # If the trace is not complete by then, it'll be split into more than one trace. | ||
| # | ||
| # Longer waiting times will increase the number of traces that are correctly | ||
| # grouped. However, it will also increase the memory overhead of the processor. | ||
| group_by_trace: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't the "load balancing" settings be moved out as well? maybe renamed something to suggest it's routing by trace id. |
||
|
|
||
| # Defines the time to wait for a complete trace before considering it complete | ||
| [ wait: <duration> | default="5s" ] | ||
|
|
||
| # Configures the max amount of traces to keep in memory waiting for the duration | ||
| [ num_traces: <int> | default="1_000_000" ] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. max_traces? |
||
| ``` | ||
|
|
||
| > **Note:** More information on the following types can be found on the | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -59,4 +59,6 @@ tempo: | |
| dimensions: | ||
| - name: http.url | ||
| handler_endpoint: 0.0.0.0:8889 | ||
| group_by_trace: | ||
| wait: 4s | ||
|
|
||
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need better docs surrounding this. Perhaps we add some docs to the Tempo site and link them here? Things that need to be mentioned: