-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Pipelines: add typed bindings, error metrics, and setup improvements #28454
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
Open
Marcinthecloud
wants to merge
9
commits into
production
Choose a base branch
from
pipelines-error-types-wrangler-updates
base: production
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+368
−142
Open
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cf79cc6
[Pipelines] Add typed bindings docs, error metrics, and setup improve…
Marcinthecloud 0a8a59b
removed extra back ticks
Marcinthecloud 6745507
addressing Garvit's feedback
Marcinthecloud ebe558c
fix: GraphQL type casing, code formatting, and style guide compliance
ask-bonk[bot] 48efe7f
Answered Bonk's call
Marcinthecloud d7a7c60
slight type fix
Marcinthecloud 3d245bd
Made writing to streams more concise
Marcinthecloud 7e15e7d
Update 2026-02-24-typed-bindings-setup-improvements-error-metrics.mdx
Marcinthecloud 5799a57
Update writing-to-streams.mdx
Marcinthecloud File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions
72
...ngelog/pipelines/2026-02-19-typed-bindings-setup-improvements-error-metrics.mdx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| --- | ||
| title: Typed Pipeline bindings, improved setup, and dropped event metrics | ||
| description: Generate schema-aware TypeScript types for Pipeline bindings, set up pipelines faster with Simple mode, and monitor dropped events in the dashboard and via GraphQL. | ||
| products: | ||
| - pipelines | ||
| - workers | ||
| date: 2026-02-19 | ||
| --- | ||
|
|
||
| ## Typed pipeline bindings | ||
|
|
||
| Running `wrangler types` now generates schema-specific TypeScript types for pipeline bindings. When a stream has a defined schema, your pipeline binding uses a named record type instead of the generic `Pipeline<PipelineRecord>`, giving you full autocomplete and compile-time type checking. | ||
|
|
||
| ```ts | ||
| 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>; | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| TypeScript catches missing required fields and incorrect field types at compile time. You must be authenticated via `wrangler login` for schema fetching to work. If not authenticated or if the stream has no schema, `wrangler types` falls back to the generic type. | ||
|
|
||
| For more information, refer to [Typed pipeline bindings](/pipelines/streams/writing-to-streams/#typed-pipeline-bindings). | ||
|
|
||
| ## Improved Pipeline setup | ||
|
|
||
| The `wrangler pipelines setup` command now offers a **Simple** setup mode that applies recommended defaults for format (Parquet), compression (zstd), rolling policy (100 MB), and credential generation. The setup command also automatically creates the [R2 bucket](/r2/buckets/) and enables [R2 Data Catalog](/r2/data-catalog/) if they do not already exist. | ||
|
|
||
| Validation errors during setup now prompt you to retry inline rather than restarting the entire process. | ||
|
|
||
| For a full walkthrough, refer to the [Getting started guide](/pipelines/getting-started/). | ||
|
|
||
| ## Dropped event metrics | ||
|
|
||
| A new **Errors** tab in the Cloudflare dashboard shows dropped events with detailed error messages, grouped by error type. | ||
|
|
||
|  | ||
|
|
||
| You can also query dropped events programmatically via the new `pipelinesUserErrorsAdaptiveGroups` GraphQL dataset. When structured stream events fail schema validation, you can query the specific error type (`missing_field`, `type_mismatch`, `parse_failure`, or `null_value`) and see how many events were affected. | ||
|
|
||
| ```graphql | ||
| query GetPipelineUserErrors($accountTag: string!, $pipelineId: string!) { | ||
| viewer { | ||
| accounts(filter: { accountTag: $accountTag }) { | ||
| pipelinesUserErrorsAdaptiveGroups( | ||
| limit: 100 | ||
| filter: { | ||
| pipelineId: $pipelineId | ||
| datetime_geq: "2026-02-12T00:00:00Z" | ||
| datetime_leq: "2026-02-19T23:59:59Z" | ||
| } | ||
| orderBy: [count_DESC] | ||
| ) { | ||
| count | ||
| dimensions { | ||
| errorFamily | ||
| errorType | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| For the full list of dimensions, error types, and additional query examples, refer to [User error metrics](/pipelines/observability/metrics/#user-error-metrics). |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.