[DOC] Add doc for TraceQL metrics math - #7190
Conversation
There was a problem hiding this comment.
Pull request overview
Documentation-only PR adding user-facing documentation for the TraceQL metrics arithmetic feature introduced in #6866. Updates the metrics functions reference with a new "Arithmetic expressions" section (syntax, operators, examples, group-by behavior, post-expression operations, NaN handling, and limitations), and adds a short intro paragraph in the metrics-queries index pointing at the new functionality.
Changes:
- Add a new "Arithmetic expressions" section to
functions.mddescribing supported operators, examples, group-by, post-expression operations, and limitations. - Add a row for arithmetic expressions in the post-pipeline functions table.
- Add a short blurb in
_index.mdintroducing the feature with an example.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/sources/tempo/metrics-from-traces/metrics-queries/functions.md | New "Arithmetic expressions" section and a row in the post-pipeline functions table. |
| docs/sources/tempo/metrics-from-traces/metrics-queries/_index.md | Adds a brief paragraph and example introducing arithmetic between metrics queries. |
| ### Limitations | ||
|
|
||
| - Each sub-query must be enclosed in parentheses. Bare expressions like `{} | rate() + {} | rate()` aren't valid. | ||
| - Scalar operands aren't supported. Expressions like `1000 * ({} | rate())` aren't valid. |
There was a problem hiding this comment.
Ah! Will TraceQL math be backported to 3.0 or are we going to save it for a 3.1 release?
If backported to 3.0, then I'll do a separate PR for the doc for 7199 then just in case these should be shipped or be available separately.
There was a problem hiding this comment.
Oh, I don't think it will be backported
What this PR does:
Updates the functions.md and metrics-queries/_index.md with information about TraceQL metrics artithematic (introduced in #6866 ).
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]