Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Observability Workers Logs

How to enable, configure, and utilize Workers Logs by setting observability in wrangler configuration files, managing environment-specific sampling rates, and implementing structured JSON logging for better data index...

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Observability Workers Logs

How to enable, configure, and utilize Workers Logs by setting observability in wrangler configuration files, managing environment-specific sampling rates, and implementing structured JSON logging for better data index...

When To Use

Use when you need to enable log collection for Cloudflare Workers, configure sampling rates for different environments, or implement structured JSON logging for advanced data filtering.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-observability-logs-workflow-guide.mdA guide explaining how to enable, manage, and view logging data emitted from Cloudflare Workers.Questions about a guide explaining how to enable, manage, and view logging data emitted from Cloudflare Workers.
examples/workers-observability-logs-cloudflare-workers-observability-logs-configu.textA configuration object demonstrating how to enable and configure head sampling rates for Cloudflare Workers observability logs.Exact payloads, commands, or snippets shown in A configuration object demonstrating how to enable and configure head sampling rates for Cloudflare Workers observabi...
examples/workers-observability-logs-cloudflare-workers-logs-observability-configu.textA configuration snippet showing how to enable observability and set the head sampling rate for Cloudflare Workers logs.Exact payloads, commands, or snippets shown in A configuration snippet showing how to enable observability and set the head sampling rate for Cloudflare Workers logs.
examples/workers-observability-logs-cloudflare-workers-logs-observability-config.textA configuration object demonstrating how to enable and configure head sampling rates for Cloudflare Workers observability logs.Exact payloads, commands, or snippets shown in A configuration object demonstrating how to enable and configure head sampling rates for Cloudflare Workers observabi...
examples/workers-observability-logs-cloudflare-workers-observability-logs-configu-2.textA configuration snippet demonstrating how to enable observability and set head sampling rates for Cloudflare Workers logs.Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to enable observability and set head sampling rates for Cloudflare Workers...
examples/workers-observability-logs-cloudflare-workers-observability-logs-configu-3.textA configuration object demonstrating how to enable and manage invocation logs within the observability settings for Cloudflare Workers.Exact payloads, commands, or snippets shown in A configuration object demonstrating how to enable and manage invocation logs within the observability settings for C...
examples/workers-observability-logs-cloudflare-workers-observability-logs-configu-4.textA text configuration snippet demonstrating how to enable or disable invocation logs using the observability.logs setting.Exact payloads, commands, or snippets shown in A text configuration snippet demonstrating how to enable or disable invocation logs using the observability.logs sett...
examples/workers-observability-logs-cloudflare-workers-logs-console-log.textA JavaScript code snippet demonstrating how to use console.log within a Cloudflare Worker to emit log data for observability.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to use console.log within a Cloudflare Worker to emit log data for observ...
examples/workers-observability-logs-cloudflare-workers-logs-javascript-fetch-even.textA JavaScript code example demonstrating how to use console.log within a Cloudflare Worker fetch event listener to generate logs for observability.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use console.log within a Cloudflare Worker fetch event listener to gen...
examples/workers-observability-logs-cloudflare-workers-observability-logs-configu-5.textA configuration object demonstrating how to enable observability and set the head sampling rate for Cloudflare Workers logs.Exact payloads, commands, or snippets shown in A configuration object demonstrating how to enable observability and set the head sampling rate for Cloudflare Worker...
examples/workers-observability-logs-cloudflare-workers-logs-observability-configu-2.textA text configuration snippet showing how to enable observability and set the head sampling rate for Cloudflare Workers logs.Exact payloads, commands, or snippets shown in A text configuration snippet showing how to enable observability and set the head sampling rate for Cloudflare Worker...

What This Skill Covers

  • Workers Logs lets you automatically collect, store, filter, and analyze logging data emitted from Cloudflare Workers. Data is written to your Cloudflare Acco...
  • Main sections: Enable Workers Logs, Enabling with environments, View logs from the dashboard, Best Practices, Logging structured JSON objects.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/observability/logs/workers-logs