Skip to content

Commit 40bc9fe

Browse files
authored
Merge branch 'production' into w-changelogs
2 parents ac72f51 + e8d67ed commit 40bc9fe

File tree

19 files changed

+219
-394
lines changed

19 files changed

+219
-394
lines changed

package-lock.json

Lines changed: 61 additions & 349 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@astrojs/starlight-docsearch": "0.6.0",
3737
"@astrojs/starlight-tailwind": "3.0.1",
3838
"@astrojs/tailwind": "5.1.5",
39-
"@cloudflare/vitest-pool-workers": "0.8.12",
39+
"@cloudflare/vitest-pool-workers": "0.8.14",
4040
"@cloudflare/workers-types": "4.20250404.0",
4141
"@codingheads/sticky-header": "1.0.2",
4242
"@expressive-code/plugin-collapsible-sections": "0.40.2",
@@ -50,7 +50,7 @@
5050
"@types/node": "22.14.0",
5151
"@types/react": "19.0.7",
5252
"@types/react-dom": "19.0.4",
53-
"@typescript-eslint/parser": "8.29.0",
53+
"@typescript-eslint/parser": "8.29.1",
5454
"algoliasearch": "5.23.3",
5555
"astro": "5.6.1",
5656
"astro-breadcrumbs": "3.3.1",
@@ -75,7 +75,7 @@
7575
"he": "1.2.0",
7676
"jsonc-parser": "3.3.1",
7777
"lz-string": "1.5.0",
78-
"marked": "15.0.7",
78+
"marked": "15.0.8",
7979
"mdast-util-from-markdown": "2.0.2",
8080
"mdast-util-mdx": "3.0.0",
8181
"mdast-util-mdx-expression": "2.0.1",
1.01 MB
Loading
370 KB
Loading
138 KB
Loading
116 KB
Loading

src/content/changelog/rules/2025-04-09-snippets-ga.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ products:
66
date: 2025-04-09T14:00:00Z
77
---
88

9+
![Cloudflare Snippets are now GA](~/assets/images/changelog/rules/snippets-ga.png)
10+
911
[Cloudflare Snippets](/rules/snippets/) are now generally available at no extra cost across all paid plans — giving you a fast, flexible way to programmatically control HTTP traffic using lightweight JavaScript.
1012

1113
You can now use Snippets to modify HTTP requests and responses with confidence, reliability, and scale. Snippets are production-ready and deeply integrated with Cloudflare Rules, making them ideal for everything from quick dynamic header rewrites to advanced routing logic.
@@ -15,6 +17,8 @@ What's new:
1517
- **Snippets are now GA** – Available at no extra cost on all Pro, Business, and Enterprise plans.
1618
- **Ready for production** – Snippets deliver a production-grade experience built for scale.
1719
- **Part of the Cloudflare Rules platform** – Snippets inherit request modifications from other Cloudflare products and support sequential execution, allowing you to run multiple Snippets on the same request and apply custom modifications step by step.
18-
- **Trace integration (rolling out)** – Use [Cloudflare Trace](/fundamentals/trace-request/) to see which Snippets were triggered on a request — helping you understand traffic flow and debug more effectively.
20+
- **Trace integration** – Use [Cloudflare Trace](/fundamentals/trace-request/) to see which Snippets were triggered on a request — helping you understand traffic flow and debug more effectively.
21+
22+
![Snippets shown in Cloudflare Trace results](~/assets/images/changelog/rules/snippets-ga-trace.gif)
1923

2024
Learn more in the [launch blog post](https://blog.cloudflare.com/snippets/).
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Investigate your Workers with the Query Builder in the new Observability dashboard
3+
description: Workers Observability now offers a Query Builder to help developers construct structured queries to investigate their telemtry data.
4+
products:
5+
- workers
6+
date: 2025-04-09T00:00:00Z
7+
hidden: false
8+
---
9+
10+
import { WranglerConfig } from "~/components"
11+
12+
The [Workers Observability dashboard](https://dash.cloudflare.com/?to=/:account/workers-and-pages/observability/) offers a single place to investigate and explore your [Workers Logs](/workers/observability/logs/workers-logs).
13+
14+
The **Overview** tab shows logs from all your Workers in one place. The **Invocations** view groups logs together by invocation, which refers to the specific trigger that started the execution of the Worker (i.e. fetch). The **Events** view shows logs in the order they were produced, based on timestamp. Previously, you could only view logs for a single Worker.
15+
16+
![Workers Observability Overview Tab](src/assets/images/changelog/workers/observability/2025-04-09-workers-observability-overview.png)
17+
18+
The **Investigate** tab presents a Query Builder, which helps you write structured queries to investigate and visualize your logs. The Query Builder can help answer questions such as:
19+
- Which paths are experiencing the most 5XX errors?
20+
- What is the wall time distribution by status code for my Worker?
21+
- What are the slowest requests, and where are they coming from?
22+
- Who are my top N users?
23+
24+
![Workers Observability Overview Tab](src/assets/images/changelog/workers/observability/2025-04-09-query-builder.png)
25+
26+
The Query Builder can use any field that you store in your logs as a key to visualize, filter, and group by. Use the Query Builder to quickly access your data, build visualizations, save queries, and share them with your team.
27+
28+
### Workers Logs is now Generally Available
29+
30+
[Workers Logs](/workers/observability/logs/workers-logs) is now Generally Available. With a [small change](/workers/observability/logs/workers-logs/#enable-workers-logs) to your Wrangler configuration, Workers Logs ingests, indexes, and stores all logs emitted from your Workers for up to 7 days.
31+
32+
We've introduced a number of changes during our beta period, including:
33+
- Dashboard enhancements with customizable fields as columns in the Logs view and support for invocation-based grouping
34+
- Performance improvements to ensure no adverse impact
35+
- Public [API endpoints](https://developers.cloudflare.com/api/resources/workers/subresources/observability/) for broader consumption
36+
37+
The API documents three endpoints: list the keys in the telemetry dataset, run a query, and list the unique values for a key. For more, visit our [REST API documentation](https://developers.cloudflare.com/api/resources/workers/subresources/observability/).
38+
39+
Visit the [docs](/workers/observability/query-builder) to learn more about the capabilities and methods exposed by the Query Builder. Start using Workers Logs and the Query Builder today by enabling observability for your Workers:
40+
41+
<WranglerConfig>
42+
```toml
43+
[observability]
44+
enabled = true
45+
46+
[observability.logs]
47+
invocation_logs = true
48+
head_sampling_rate = 1 # optional. default = 1.
49+
```
50+
</WranglerConfig>

src/content/changelog/workers/2025-04-09-workers-timing.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: Workers Observability tooling now shows CPU time and Wall time for
44
products:
55
- workers
66
date: 2025-04-09T00:00:00Z
7+
78
---
89

910
You can now observe and investigate the CPU time and Wall time for every Workers Invocations.

src/content/docs/agents/api-reference/agents-api.mdx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -615,34 +615,34 @@ class AgentClient extends PartySocket {
615615
import { AgentClient } from "agents/client";
616616

617617
// Connect to an Agent instance
618-
const socket = new AgentClient({
618+
const client = new AgentClient({
619619
agent: "chat-agent", // Name of your Agent class in kebab-case
620620
name: "support-room-123", // Specific instance name
621+
host: window.location.host, // Using same host
622+
});
621623

622-
// Optional event handlers
623-
onOpen: () => {
624-
console.log("Connected to agent");
625-
// Send an initial message
626-
socket.send(JSON.stringify({ type: "join", user: "user123" }));
627-
},
624+
client.onopen = () => {
625+
console.log("Connected to agent");
626+
// Send an initial message
627+
client.send(JSON.stringify({ type: "join", user: "user123" }));
628+
};
628629

629-
onMessage: (event) => {
630-
// Handle incoming messages
631-
const data = JSON.parse(event.data);
632-
console.log("Received:", data);
630+
client.onmessage = (event) => {
631+
// Handle incoming messages
632+
const data = JSON.parse(event.data);
633+
console.log("Received:", data);
633634

634-
if (data.type === "state_update") {
635-
// Update local UI with new state
636-
updateUI(data.state);
637-
}
638-
},
635+
if (data.type === "state_update") {
636+
// Update local UI with new state
637+
updateUI(data.state);
638+
}
639+
};
639640

640-
onClose: () => console.log("Disconnected from agent")
641-
});
641+
client.onclose = () => console.log("Disconnected from agent");
642642

643643
// Send messages to the Agent
644644
function sendMessage(text) {
645-
socket.send(JSON.stringify({
645+
client.send(JSON.stringify({
646646
type: "message",
647647
text,
648648
timestamp: Date.now()

0 commit comments

Comments
 (0)