一般的なユースケースで説得力のあるデータストーリーを作成する方法を示す、実用的なノートブックの例からインスピレーションを得ましょう。各例では、クエリ、視覚化、説明テキストを組み合わせて効果的な分析ドキュメントを作成する方法を示します。
インシデント調査ノートブック
何が起こったのか、そして今後どのようにそれを防ぐことができるのかをチームが理解するのに役立つ、包括的なインシデント調査ドキュメントを作成します。
構造
Markdownブロック:インシデントの概要
# Production API Outage - October 15, 2024
**Incident Start**: 2024-10-15 14:32 UTC**Incident End**: 2024-10-15 15:18 UTC**Duration**: 46 minutes**Impact**: 15% of API requests failed
## SummaryOur main API experienced elevated error rates starting at 14:32 UTC...クエリブロック:エラー率のタイムライン
SELECT count(*) as 'Total Requests', filter(count(*), WHERE httpResponseCode >= 400) as 'Errors'FROM TransactionWHERE appName = 'api-production'TIMESERIES 1 minuteSINCE '2024-10-15 14:00:00' UNTIL '2024-10-15 16:00:00'クエリブロック:エンドポイント別のエラー内訳
SELECT count(*) as 'Error Count', average(duration) as 'Avg Duration (ms)'FROM TransactionWHERE appName = 'api-production' AND httpResponseCode >= 400FACET request.uriSINCE '2024-10-15 14:00:00' UNTIL '2024-10-15 16:00:00'ORDER BY count(*) DESCMarkdownブロック:根本原因分析
## Root Cause Analysis
### Timeline of Events- **14:32**: Error rates began climbing for `/api/users` endpoint- **14:35**: Database connection pool exhaustion detected- **14:45**: Database scaling initiated- **15:18**: Service fully recovered
### Contributing Factors1. Unusual traffic spike during product launch2. Database connection pool too small for peak load3. Missing rate limiting on user registration endpointクエリブロック:インシデント発生時のデータベースパフォーマンス
SELECT average(duration) as 'Query Duration (ms)', count(*) as 'Query Count'FROM DatabaseSampleWHERE host = 'prod-db-01'TIMESERIES 5 minutesSINCE '2024-10-15 14:00:00' UNTIL '2024-10-15 16:00:00'パフォーマンス分析ノートブック
アプリケーションのパフォーマンス傾向を長期的に追跡および分析して、最適化の機会を特定します。
構造
Markdownブロック:分析の概要
# Weekly Performance Review - Week of October 14, 2024
## Objectives- Review application response times across all services- Identify performance regressions- Track progress on optimization initiatives
## Key Metrics- P95 response time target: < 500ms- Error rate target: < 0.1%- Apdex score target: > 0.85クエリブロック:レスポンスタイムの傾向
SELECT percentile(duration, 50) as 'P50', percentile(duration, 95) as 'P95', percentile(duration, 99) as 'P99'FROM TransactionWHERE appName IN ('web-frontend', 'api-backend', 'auth-service')FACET appNameTIMESERIES 1 daySINCE 7 days agoクエリブロック:エラー率の比較
SELECT percentage(count(*), WHERE error IS true) as 'Error Rate %'FROM TransactionWHERE appName IN ('web-frontend', 'api-backend', 'auth-service')FACET appNameTIMESERIES 1 daySINCE 7 days agoCOMPARE WITH 1 week agoMarkdownブロック:分析とレコメンデーション
## Key Findings
### Performance Improvements ✅- API backend P95 improved from 650ms to 420ms- Authentication service error rate down 50%
### Areas for Attention ⚠️- Web frontend P95 increased 15% week-over-week- Database query timeouts up 25%
### Action Items1. Investigate frontend asset loading delays2. Optimize top 5 slowest database queries3. Implement caching for user profile data機能利用状況の追跡
ユーザーが新しい機能をどのように操作するかを監視し、導入の成功度を測定します。
構造
Markdownブロック:機能の概要
# New Dashboard Feature Adoption - 30 Days Post-Launch
**Launch Date**: September 15, 2024**Analysis Period**: September 15 - October 15, 2024
## Feature DescriptionNew interactive dashboard builder with drag-and-drop widgets...
## Success Metrics- **Primary**: 25% of active users create at least one custom dashboard- **Secondary**: Average 3 widgets per custom dashboard- **Tertiary**: < 5% bounce rate on dashboard creation pageクエリブロック:ダッシュボードを作成する毎日のアクティブユーザー
SELECT uniqueCount(userId) as 'Users Creating Dashboards'FROM PageViewWHERE pageUrl LIKE '%/dashboard/create%'TIMESERIES 1 daySINCE 30 days agoクエリブロック:ダッシュボード作成ファネル
SELECT funnel(userId, WHERE pageUrl LIKE '%/dashboard/create%' as 'Started Creation', WHERE pageUrl LIKE '%/dashboard/create%' AND eventType = 'widget_added' as 'Added Widget', WHERE eventType = 'dashboard_saved' as 'Saved Dashboard')FROM PageView, UserActionSINCE 30 days agoセキュリティ監視ノートブック
潜在的な脅威とシステムの脆弱性を追跡するために、継続的なセキュリティ分析を作成します。
構造
Markdownブロック:セキュリティの概要
# Weekly Security Review - October 21, 2024
## Monitoring Scope- Failed authentication attempts- Unusual API access patterns- Database query anomalies- File system access violations
## Alert Thresholds- Failed logins: > 100/hour from single IP- API rate limiting: > 1000 requests/minute- Suspicious queries: containing SQL injection patternsクエリブロック:失敗した認証パターン
SELECT count(*) as 'Failed Attempts', latest(remoteAddr) as 'Source IP'FROM LogWHERE message LIKE '%authentication failed%'FACET remoteAddrSINCE 7 days agoHAVING count(*) > 50ORDER BY count(*) DESCクエリブロック:APIアクセス異常
SELECT count(*) as 'Request Count', uniqueCount(userAgent) as 'Unique User Agents'FROM TransactionWHERE appName = 'api-gateway'FACET request.headers.x-forwarded-forSINCE 24 hours agoHAVING count(*) > 10000ORDER BY count(*) DESCビジネスメトリクスダッシュボード
主要なビジネスKPIと技術的なメトリクスと併せて追跡して、全体像を理解します。
構造
Markdownブロック:ビジネスコンテキスト
# Monthly Business & Technical Review - October 2024
## Business Objectives- Increase user engagement by 15%- Reduce customer support tickets by 20%- Improve conversion rate to 3.5%
## Technical Performance Targets- 99.9% uptime- < 2 second page load times- Zero security incidentsクエリブロック:ユーザーエンゲージメントメトリクス
SELECT count(*) as 'Page Views', uniqueCount(userId) as 'Active Users', average(duration) as 'Avg Session Duration'FROM PageViewTIMESERIES 1 daySINCE 30 days agoクエリブロック:コンバージョンファネル
SELECT funnel(userId, WHERE pageUrl = '/signup' as 'Signup Page', WHERE pageUrl = '/signup/verify' as 'Email Verified', WHERE pageUrl = '/onboarding/complete' as 'Onboarding Complete', WHERE eventType = 'subscription_created' as 'Converted')FROM PageView, UserActionSINCE 30 days agoテンプレート:調査開始
このテンプレートは、あらゆるデータ調査の開始点として使用します。
構造
Markdownブロック:調査テンプレート
# Investigation: [ISSUE DESCRIPTION]
**Date**: [TODAY'S DATE]**Investigator**: [YOUR NAME]**Priority**: [HIGH/MEDIUM/LOW]
## Problem Statement[Describe what you're investigating and why]
## Hypothesis[What do you think might be causing the issue?]
## Investigation Plan1. [First thing to check]2. [Second thing to check]3. [Third thing to check]
## Findings_[Update this section as you discover information]_
## Next Steps_[What actions should be taken based on your findings?]_クエリブロック:初期データ探索
-- Replace with your initial querySELECT count(*)FROM [YourEventType]WHERE [YourConditions]SINCE 1 hour agoヒント
各調査は、範囲を把握するために広範なクエリから開始し、調査結果に基づいて特定の領域に絞り込みます。
ノートブックの例に関するベストプラクティス
ストーリーを構造化する
- コンテキストから始める:常にMarkdownブロックで目的を説明する
- 論理的な流れに従う:クエリを、ユーザーが自然に調査を進める順序で並べる
- 結論を提供する:Markdownブロックで調査結果と次のステップをまとめる
クエリを再利用可能にする
- 日付、アプリケーション名、閾値には変数を使用する
- 複雑なロジックにはNRQLコメントを追加して説明する
- 分析タイプに適した時間範囲を選択する
視覚デザインのヒント
- 関連するクエリ全体で一貫したチャートタイプを使用する
- 物語をサポートする色を選択する
- すべての視覚化に明確なタイトルとラベルを追加する
- 詳細なデータには表を使用し、傾向やパターンにはチャートを使用する
次のステップ
- ノートブックにクエリを追加する方法を学ぶ
- ノートブックの共有オプションを確認する
- クエリのアイデアをさらに得るためにNRQLの例をご覧ください