-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix durable-object and observability sections of wrangler.toml docs #17800
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
Merged
irvinebroque
merged 3 commits into
cloudflare:production
from
taylorlee:tlee/fix-do-and-observability-conf
Oct 28, 2024
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
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 |
|---|---|---|
|
|
@@ -63,6 +63,10 @@ Top-level keys apply to the Worker as a whole (and therefore all environments). | |
|
|
||
| - Whether Wrangler should keep variables configured in the dashboard on deploy. Refer to [source of truth](#source-of-truth). | ||
|
|
||
| - `migrations` <Type text="object[]" /> <MetaInfo text="optional" /> | ||
|
|
||
| - When making changes to your Durable Object classes, you must perform a migration. Refer to [Durable Object migrations](/durable-objects/reference/durable-objects-migrations/). | ||
|
|
||
| - `send_metrics` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
|
|
||
| - Whether Wrangler should send usage metrics to Cloudflare for this project. | ||
|
|
@@ -161,13 +165,13 @@ At a minimum, the `name`, `main` and `compatibility_date` keys are required to d | |
|
|
||
| - `logpush` <Type text="boolean" /> <MetaInfo text="optional" /> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @rohinlohe @tanushree-sharma (don't have permission to add you as reviewer...) |
||
|
|
||
| - Enables Workers Trace Events Logpush for a Worker. Any scripts with this property will automatically get picked up by the Workers Logpush job configured for your account. Defaults to `false`. | ||
| - Enables Workers Trace Events Logpush for a Worker. Any scripts with this property will automatically get picked up by the Workers Logpush job configured for your account. Defaults to `false`. Refer to [Workers Logpush](/workers/observability/logs/logpush/). | ||
|
|
||
| - `limits` <Type text="Limits" /> <MetaInfo text="optional" /> | ||
|
|
||
| - Configures limits to be imposed on execution at runtime. Refer to [Limits](#limits). | ||
|
|
||
| * `observability` object optional | ||
| * `observability` <Type text="object" /> <MetaInfo text="optional" /> | ||
|
|
||
| - Configures automatic observability settings for telemetry data emitted from your Worker. Refer to [Observability](#observability). | ||
|
|
||
|
|
@@ -510,7 +514,7 @@ When making changes to your Durable Object classes, you must perform a migration | |
|
|
||
| - The new Durable Objects being defined. | ||
|
|
||
| - `renamed_classes` <Type text="from: string, to: string}[]" /> <MetaInfo text="optional" /> | ||
| - `renamed_classes` <Type text="{from: string, to: string}[]" /> <MetaInfo text="optional" /> | ||
|
|
||
| - The Durable Objects being renamed. | ||
|
|
||
|
|
@@ -633,19 +637,16 @@ id = "<NAMESPACE_ID2>" | |
|
|
||
| The [Observability](/workers/observability/logs/workers-logs) setting allows you to automatically ingest, store, filter, and analyze logging data emitted from Cloudflare Workers directly from your Cloudflare Worker's dashboard. | ||
|
|
||
| - `enabled` boolean required | ||
| - `enabled` <Type text="boolean" /> <MetaInfo text="required" /> | ||
|
|
||
| - When set to `true` on a Worker, logs for the Worker are persisted. Defaults to `true` for all new Workers. | ||
|
|
||
| - `head_sampling_rate` number optional | ||
| - `head_sampling_rate` <Type text="number" /> <MetaInfo text="optional" /> | ||
| - A number between 0 and 1, where 0 indicates zero out of one hundred requests are logged, and 1 indicates every request is logged. If `head_sampling_rate` is unspecified, it is configured to a default value of 1 (100%). Read more about [head-based sampling](/workers/observability/logs/workers-logs/#head-based-sampling). | ||
|
|
||
| Example: | ||
|
|
||
| ```toml title="wrangler.toml" | ||
| [observability] | ||
| enabled = true | ||
|
|
||
| [observability] | ||
| enabled = true | ||
| head_sampling_rate = 0.1 # 10% of requests are logged | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @vy-ton (don't have permission to add you as reviewer...)