Skip to content

[TraceQL Metrics] Fix quantiles/histograms of generic duration attributes (i.e. traceDuration) - #3879

Merged
mdisibio merged 2 commits into
grafana:mainfrom
mdisibio:fix-quantile-traceduration
Jul 18, 2024
Merged

[TraceQL Metrics] Fix quantiles/histograms of generic duration attributes (i.e. traceDuration)#3879
mdisibio merged 2 commits into
grafana:mainfrom
mdisibio:fix-quantile-traceduration

Conversation

@mdisibio

@mdisibio mdisibio commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

What this PR does:
This fixes support for computing quantiles and histograms on traceDuration. This is done by fixing support for any Duration type attribute (so far it's only this one I think), and also includes cleanup. Example queries:

{ } | quantile_over_time(traceDuration, 0.9)
{ } | histogram_over_time(traceDuration)

Which issue(s) this PR fixes:
Fixes n/a

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
@mdisibio
mdisibio merged commit 8a5cf47 into grafana:main Jul 18, 2024
@joe-elliott joe-elliott added type/bug Something isn't working backport r157 labels Jul 19, 2024
@github-actions

Copy link
Copy Markdown
Contributor

The backport to r157 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-3879-to-r157 origin/r157
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 8a5cf47fe33530927020956b8876a0cc07f82655

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-3879-to-r157
# Create the PR body template
PR_BODY=$(gh pr view 3879 --json body --template 'Backport 8a5cf47fe33530927020956b8876a0cc07f82655 from #3879{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title '[r157] [TraceQL Metrics] Fix quantiles/histograms of generic duration attributes (i.e. traceDuration)' --body-file - --label 'type/bug' --label 'backport' --base r157 --milestone r157 --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-3879-to-r157

# Create a pull request where the `base` branch is `r157` and the `compare`/`head` branch is `backport-3879-to-r157`.

# Remove the local backport branch
git switch main
git branch -D backport-3879-to-r157
@github-actions

Copy link
Copy Markdown
Contributor

The backport to r157 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-3879-to-r157 origin/r157
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 8a5cf47fe33530927020956b8876a0cc07f82655

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-3879-to-r157
# Create the PR body template
PR_BODY=$(gh pr view 3879 --json body --template 'Backport 8a5cf47fe33530927020956b8876a0cc07f82655 from #3879{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title '[r157] [TraceQL Metrics] Fix quantiles/histograms of generic duration attributes (i.e. traceDuration)' --body-file - --label 'type/bug' --label 'backport' --base r157 --milestone r157 --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-3879-to-r157

# Create a pull request where the `base` branch is `r157` and the `compare`/`head` branch is `backport-3879-to-r157`.

# Remove the local backport branch
git switch main
git branch -D backport-3879-to-r157
@github-actions

Copy link
Copy Markdown
Contributor

The backport to r157 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-3879-to-r157 origin/r157
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 8a5cf47fe33530927020956b8876a0cc07f82655

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-3879-to-r157
# Create the PR body template
PR_BODY=$(gh pr view 3879 --json body --template 'Backport 8a5cf47fe33530927020956b8876a0cc07f82655 from #3879{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title '[r157] [TraceQL Metrics] Fix quantiles/histograms of generic duration attributes (i.e. traceDuration)' --body-file - --label 'type/bug' --label 'backport' --base r157 --milestone r157 --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-3879-to-r157

# Create a pull request where the `base` branch is `r157` and the `compare`/`head` branch is `backport-3879-to-r157`.

# Remove the local backport branch
git switch main
git branch -D backport-3879-to-r157
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
…utes (i.e. traceDuration) (grafana#3879)

* Fix quantiles/histograms of generic duration attributes (i.e. traceDuration), cleanup

* changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants