Skip to content
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

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

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

mdisibio
Copy link
Contributor

@mdisibio mdisibio commented Jul 18, 2024

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
14 checks passed
@joe-elliott joe-elliott added type/bug Something isn't working backport r157 labels Jul 19, 2024
Copy link
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

Copy link
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

Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants