This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": { | |
| "type": "grafana", | |
| "uid": "-- Grafana --" | |
| }, | |
| "enable": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # DOC: [Provision Grafana] https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards | |
| # DOC: [Github Sample] https://github.com/grafana/grafana/blob/main/conf/provisioning/dashboards/sample.yaml | |
| # プロビジョニング設定のバージョン (現時点では 1 のみ) | |
| apiVersion: 1 | |
| providers: | |
| # Grafana 起動時に JSON ファイルから自動的にダッシュボードを読み込む設定 | |
| - name: "default" | |
| orgId: 1 # 組織 ID (デフォルトは 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### OpenTelemetryを使用したローカルインフラストラクチャのサンプルリクエスト集 | |
| ### 変数定義 | |
| @baseUrl = http://localhost:8080 | |
| ### 記事取得 (トレースとメトリクスが記録される) | |
| GET {{baseUrl}}/articles/article-001 | |
| ### 別の記事取得 | |
| GET {{baseUrl}}/articles/test-001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reference: | |
| # DOC: [Configure Loki] https://grafana.com/docs/loki/latest/configure/ | |
| # DOC: [Getting Started Example] https://github.com/grafana/loki/tree/v3.6.0/examples/getting-started | |
| # マルチテナント認証を無効化 (有効の場合、全リクエストに X-Scope-OrgID ヘッダーが必要になるため) | |
| auth_enabled: false | |
| # HTTP サーバー設定 | |
| server: | |
| # Loki の HTTP API ポート (Alloy からのログ書き込みと Grafana からのクエリを受け付ける) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reference: | |
| # DOC: [Configuration] https://prometheus.io/docs/prometheus/latest/configuration/configuration/ | |
| global: | |
| # ターゲットからメトリクスを取得する間隔 (デフォルト 15s) | |
| scrape_interval: 20s | |
| # アラートルールの評価間隔 (この構成では未使用だが global の必須フィールド) | |
| evaluation_interval: 20s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reference: | |
| # DOC: [Github] https://github.com/grafana/intro-to-mltp/blob/main/tempo/tempo.yaml | |
| # Grafana がトレースクエリ結果をストリーミング形式で受け取れるようにする | |
| # スパン数が多いトレース (数百~数千スパン) を表じする際、全データの取得完了を待つと Grafana 側での表示遅延が発生する可能性があるため | |
| stream_over_http_enabled: true | |
| server: | |
| # Tempo の HTTP API ポート (Grafana は 3200 番ポートで接続し、トレースクエリを実行する) | |
| http_listen_port: 3200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ========================================================== | |
| // Reference | |
| // ========================================================== | |
| // DOC: [Grafana Alloy Reference] https://grafana.com/docs/alloy/latest/reference/ | |
| // DOC: [Components] https://grafana.com/docs/alloy/latest/get-started/components/ | |
| // ========================================================== | |
| // OTLP 受信 (トレース・メトリクス) | |
| // ========================================================== | |
| // アプリから送られる OTLP テレメトリデータの受け口 (gRPC / HTTP の 2 プロトコルで待ち受け、受信データをバッチ処理へ渡す) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| # アプリケーションサーバー (Go): OTLP でテレメトリを送信 | |
| article-server: | |
| container_name: article-server | |
| build: | |
| context: . | |
| dockerfile: article_server/Dockerfile | |
| ports: | |
| - "8080:8080" | |
| environment: |