Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[FAQ] Module 4 Homework Q3: How do I find the request metric, its log and its trace in Grafana?

クローズ 初心者向け
#419 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
75/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
prometheus

調査の方向性

リポジトリに既存のFAQ構成から始め、Module 4 Homework Q3のこの回答を対応するFAQ項目に配置します。Grafana Exploreの手順、Prometheusの命名例、およびGrafana、OpenTelemetry、Exploreへの参照を維持します。質問でメトリクス、ログ、トレースの見つけ方が説明され、チェックリストを満たした状態で回答が公開されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

faq-proposal
Course

ai-dev-tools-zoomcamp

Question

How do I find the request metric for a lookup in Grafana, and check that its log and trace also appear?

Answer

Use Grafana's Explore page (compass icon in the left menu). Choose a data source at the top: your metrics store (for example Prometheus), your logs store (for example Loki) or your traces store (for example Tempo). Set the time range to cover when you made the request.

1. Find the metric

Select the metrics data source and open the metrics browser. Search for part of the metric name, such as http_server, rather than the exact name from your app's console output. OpenTelemetry names are often translated when stored. In Prometheus, for example:

  • dots become underscores
  • the unit is added as a suffix (s becomes _seconds)
  • a histogram is split into _bucket, _count and _sum series

So http.server.request.duration is stored as http_server_request_duration_seconds_count. Attribute names change the same way, so http.response.status_code becomes http_response_status_code. Query the _count series and group it by route and status code to see your request.

2. Check the log

Select the logs data source, filter by your service name, and search for text from the request (for example part of its URL). Expand the log line. If your app adds trace context to its logs, you'll see a trace ID.

3. Check the trace

If the logs data source links to traces, click the link next to the trace ID. Otherwise, copy the trace ID into the traces data source's query, or search by service name. New traces can take a few seconds to become searchable, so re-run the search if it's empty at first.

If one of the three doesn't appear, check that your app exports that signal and that your telemetry pipeline routes it to the matching data source.

References:

Checklist
  • I have searched existing FAQs and this question is not already answered
  • The answer provides accurate, helpful information
  • I have included any relevant code examples or links
主要言語
Python
スター
7
フォーク
19
平均マージ
11日 21分
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DataTalksClub/faq のほかの issue

DataTalksClub/faq の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。