ClaudeCloudflare Developer Platform2026/06/16 0:00

Workers - Workers tracing now supports custom spans

要点だけを先に読めるように短く再構成したセクションです。

元記事

Quick Digest

要約

要点だけを先に読めるように短く再構成したセクションです。

claudeja

Workers - Workers tracing now supports custom spans の要約

Key Points

  • ポイント1: Changelog New updates and improvements at Cloudflare.
  • ポイント2: Subscribe to RSS View RSS feeds ← Back to all posts Workers tracing now supports custom spans Jun 16, 2026 Workers You can now create custom trace spans in your Workers code using
  • ポイント3: Custom spans appear alongside the automatic platform instrumentation (fetch calls, KV reads, D1 queries, and other platform operations) in your traces and OpenTelemetry exports, wi

Summary

この記事は 2026-06-16 に公開された「Workers - Workers tracing now supports custom spans」の内容を日本語で簡潔にまとめたものです。

Key Points

  • ポイント1: Changelog New updates and improvements at Cloudflare.
  • ポイント2: Subscribe to RSS View RSS feeds ← Back to all posts Workers tracing now supports custom spans Jun 16, 2026 Workers You can now create custom trace spans in your Workers code using
  • ポイント3: Custom spans appear alongside the automatic platform instrumentation (fetch calls, KV reads, D1 queries, and other platform operations) in your traces and OpenTelemetry exports, wi

Full Translation

翻訳

原文の流れを保ったまま読める翻訳セクションです。

claudeja

Workers - Workers tracing now supports custom spans(原文タイトル)

概要

公開日: 2026-06-16 翻訳生成に失敗したため、原文をそのまま保存しています。

原文

Changelog New updates and improvements at Cloudflare. Subscribe to RSS View RSS feeds ← Back to all posts Workers tracing now supports custom spans Jun 16, 2026 Workers You can now create custom trace spans in your Workers code using tracing.enterSpan() . Custom spans appear alongside the automatic platform instrumentation (fetch calls, KV reads, D1 queries, and other platform operations) in your traces and OpenTelemetry exports, with correct parent-child nesting. The API is available via import { tracing } from "cloudflare:workers" or through the handler context as ctx.tracing : TypeScript import { tracing } from "cloudflare:workers" ; export default { async fetch ( request , env , ctx ) { return tracing . enterSpan ( "handleRequest" , async ( span ) => { span . setAttribute ( "url.path" , new URL ( request . url ) . pathname ) ; const data = await env . MY_KV . get ( "key" ) ; return new Response ( data ) ; } ) ; }, }; { span.setAttribute("url.path", new URL(request.url).pathname); const data = await env.MY_KV.get("key"); return new Response(data); }); },};"> Spans nest automatically based on the JavaScript async context, and are auto-ended when the callback returns or its returned promise settles. The Span object provides setAttribute(key, value) for attaching metadata and an isTraced property to check whether the current request is being sampled. Tracing must be enabled in your Wrangler configuration for spans to be recorded. For full API details and examples, refer to Custom spans . Resources API New to Cloudflare? Directory Sponsorships Open Source Cloudflare Research Support Help Center System Status Compliance GDPR Company cloudflare.com Our team Careers Tools Cloudflare Radar Cloudflare Labs Speed Test Is BGP Safe Yet? Certificate Transparency Community Community forum X Discord YouTube GitHub © 2026 Cloudflare, Inc. Privacy Policy Terms of Use Report Security Issues Trademark Cookie Settings Was this helpful? Yes No