ClaudeCloudflare Developer PlatformFeb 24, 2026, 12:00 AM

Pipelines, Workers - Dropped event metrics, typed Pipelines bindings, and improved setup

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

claudeenmodel: claude-sonnet-4-20250514

Cloudflare Pipelines: Enhanced Monitoring, Type Safety, and Streamlined Setup

Key Points

  • GraphQL dataset for tracking dropped streaming events
  • TypeScript type generation for Pipeline schema validation
  • Automated setup with recommended defaults

Summary

Cloudflare Pipelines introduces three major improvements to enhance data streaming reliability and developer experience. These updates focus on better observability for dropped events, compile-time type safety for Worker integrations, and simplified pipeline setup processes.

Key Points

  • Dropped Event Metrics: New dashboard and GraphQL dataset (pipelinesUserErrorsAdaptiveGroups) provide detailed error tracking for schema mismatches with categorized error types (missing_field, type_mismatch, parse_failure, null_value)
  • Typed Pipeline Bindings: wrangler types now generates schema-specific TypeScript types, enabling compile-time validation instead of runtime-only error detection
  • Simplified Setup: wrangler pipelines setup command with Simple setup mode automatically creates R2 buckets, enables R2 Data Catalog, and applies recommended defaults with inline error retry capability

Full Translation

Translations

A translation section that keeps the flow of the original article.

claudejamodel: claude-sonnet-4-20250514

Pipelines、Workers - ドロップされたイベントメトリクス、型付きPipelinesバインディング、およびセットアップの改善

ドロップされたイベントメトリクス、型付きPipelinesバインディング、およびセットアップの改善

公開日: 2026年2月24日
カテゴリ: Pipelines、Workers

Cloudflare Pipelinesは、WorkersまたはHTTPエンドポイント経由でストリーミングデータを取り込み、SQLで変換し、Apache IcebergテーブルとしてR2に書き込みます。本日、ストリーミングイベントがドロップされる理由の理解、データ品質問題の早期発見、およびPipelinesのより迅速なセットアップを支援する3つの改善をリリースします。

ドロップされたイベントメトリクス

ストリームイベントが期待されるスキーマと一致しない場合、Pipelinesは取り込み時にそれらを受け入れますが、シンクへの配信を試行する際にドロップします。これらの問題の根本原因を特定するため、詳細なエラーメッセージと共にドロップされたイベントを表示する新しいダッシュボードとメトリクスを導入しています。

ドロップされたイベントは、新しいpipelinesUserErrorsAdaptiveGroups GraphQLデータセットを介してプログラム的にクエリすることも可能です。このデータセットは、特定のエラータイプ(missing_fieldtype_mismatchparse_failure、またはnull_value)別に障害を分類し、問題をソースまで遡って追跡できます。

query GetPipelineUserErrors(
  $accountTag: String!
  $pipelineId: String!
  $datetimeStart: Time!
  $datetimeEnd: Time!
) {
  viewer {
    accounts(filter: { accountTag: $accountTag }) {
      pipelinesUserErrorsAdaptiveGroups(
        limit: 100
        filter: {
          pipelineId: $pipelineId
          datetime_geq: $datetimeStart
          datetime_leq: $datetimeEnd
        }
        orderBy: [count_DESC]
      ) {
        count
        dimensions {
          errorFamily
          errorType
        }
      }
    }
  }
}

ディメンション、エラータイプ、および追加のクエリ例の完全なリストについては、User error metricsを参照してください。

型付きPipelinesバインディング

WorkerからPipelineにデータを送信する際、以前は汎用的なPipeline<PipelineRecord>タイプを使用していたため、スキーマの不一致(間違ったフィールド名、不正な型)は実行時にドロップされたイベントとしてのみ検出されていました。

wrangler typesを実行すると、Pipelineバインディング用のスキーマ固有のTypeScript型が生成されるようになりました。TypeScriptは、コードがデプロイされる前のコンパイル時に、必須フィールドの欠落や不正なフィールド型をキャッチします。

declare namespace Cloudflare {
  type EcommerceStreamRecord = {
    user_id: string;
    event_type: string;
    product_id?: string;
    amount?: number;
  };
  
  interface Env {
    STREAM: import("cloudflare:pipelines").Pipeline<Cloudflare.EcommerceStreamRecord>;
  }
}

詳細については、Typed Pipeline bindingsを参照してください。

Pipelinesセットアップの改善

新しいPipelineのセットアップには、以前は複数の手動ステップが必要でした:R2バケットの作成、R2 Data Catalogの有効化、APIトークンの生成、およびフォーマット、圧縮、ローリングポリシーの個別設定。

wrangler pipelines setupコマンドに、推奨デフォルトを適用し、R2バケットが存在しない場合は自動的に作成してR2 Data Catalogを有効化するSimple setupモードが追加されました。セットアップ中の検証エラーは、プロセス全体を再開するのではなく、インラインで再試行するよう促します。

完全なウォークスルーについては、Getting started guideを参照してください。