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

[DOC] Update metrics query docs with examples, more details #4248

Conversation

knylander-grafana
Copy link
Contributor

@knylander-grafana knylander-grafana commented Oct 29, 2024

What this PR does:

Second try. Original PR with review comments: #4128

This doc has a first draft of a use case for using TraceQL metrics queries to investigate an issue. The example provides equivalent PromQL and TraceQL queries.

Updates the TraceQL metrics documentation to add:

  • Create a separate functions page with the functions moved off of the main metrics page
  • Maintain a list of the functions on the main TraceQL metrics page
  • Add a section that describes how RED metrics can be generated in TraceQL metrics vs span metrics from the metrics generator
  • Add examples for PromQL vs TraceQL equivalent queries - how do you contruct a TraceQL query that is equivalent of a PromQL query

Which issue(s) this PR fixes:
Fixes https://github.com/grafana/tempo-squad/issues/413

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@knylander-grafana knylander-grafana added the type/docs Improvements or additions to documentation label Oct 29, 2024
@knylander-grafana knylander-grafana self-assigned this Oct 29, 2024
@knylander-grafana knylander-grafana changed the title Rebase ts 413 metrics query doc update [DOC] Update metrics query docs with examples, more details Oct 29, 2024
Comment on lines +84 to +87
{{< admonition type="note" >}}
TraceQL metric queries with exemplars aren't fully supported in Grafana Explore.
They will be supported in a future Grafana release.
{{< /admonition >}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This admonition is new and needs to be reviewed.

Copy link
Contributor

This PR must be merged before a backport PR will be created.

@knylander-grafana knylander-grafana merged commit 532f83f into grafana:main Oct 30, 2024
20 of 21 checks passed
Copy link
Contributor

The backport to release-v2.6 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-4248-to-release-v2.6 origin/release-v2.6
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 532f83f9338542c4f63052b104e6c1205e8b6f36

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-4248-to-release-v2.6
# Create the PR body template
PR_BODY=$(gh pr view 4248 --json body --template 'Backport 532f83f9338542c4f63052b104e6c1205e8b6f36 from #4248{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title '[release-v2.6] [DOC] Update metrics query docs with examples, more details' --body-file - --label 'type/docs' --label 'backport' --base release-v2.6 --milestone release-v2.6 --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-4248-to-release-v2.6

# Create a pull request where the `base` branch is `release-v2.6` and the `compare`/`head` branch is `backport-4248-to-release-v2.6`.

# Remove the local backport branch
git switch main
git branch -D backport-4248-to-release-v2.6

knylander-grafana added a commit that referenced this pull request Oct 30, 2024
* Update metrics query doc with more examples

* Update content from doc session

* Apply suggestions from code review

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
Co-authored-by: Joe Elliott <joe.elliott@grafana.com>

* Restructure and update metrics queries

* Updates to meet review comments

* fix paragraph

* Updates for conflict

---------

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
Co-authored-by: Joe Elliott <joe.elliott@grafana.com>
(cherry picked from commit 532f83f)
knylander-grafana added a commit that referenced this pull request Oct 30, 2024
…tails (#4250)

* [DOC] Update metrics query docs with examples, more details (#4248)

* Update metrics query doc with more examples

* Update content from doc session

* Apply suggestions from code review

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
Co-authored-by: Joe Elliott <joe.elliott@grafana.com>

* Restructure and update metrics queries

* Updates to meet review comments

* fix paragraph

* Updates for conflict

---------

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
Co-authored-by: Joe Elliott <joe.elliott@grafana.com>
(cherry picked from commit 532f83f)

* Apply suggestions from code review

* Update docs/sources/tempo/traceql/metrics-queries/_index.md
@zalegrala zalegrala deleted the rebase-ts-413-metrics-query-doc-update branch November 20, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-v2.6 backport-failed type/docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants