Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

maple trace --remote fails with invalid_time_range when every span shares one timestamp

クローズ 初心者向け
#1,798 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli, observability

調査の方向性

apps/cli/src/core/remote-ops.tsの242~249行目あたりから始めます。ここではinspectTraceがtraceの範囲内でログを検索しています。範囲の処理とv2のログ検索の動作を読んでください。spanが同じタイムスタンプを共有するtraceで再現し、maple trace --remoteで表示されることと、通常のtrace検索およびログ検索が引き続き機能することを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Written by an AI agent (Claude) on behalf of @jasonkuhrt.

Problem

maple trace <id> --remote can't print a trace whose spans all start and end at the same instant. Maple Cloud stores and queries the trace fine; only the CLI's trace view fails.

On Cloudflare Workers this is common. workerd advances the clock only across I/O, so a request that does no I/O exports spans with zero duration at one timestamp. A refused auth check is an example: the server span and its verify span both last 0 ms.

$ maple trace 671403778c461093dbe435b41b677d18 --remote
error: end_time must be later than start_time.

[cause]: {"error":{"_tag":"@maple/http/v2/TimeRangeInvalidError","code":"invalid_time_range","param":"end_time", ...}}

The same trace through maple query --remote:

TraceId                           spans  first                          last                           longest
671403778c461093dbe435b41b677d18      2  2026-10-24 22:04:19.898000000  2026-10-24 22:04:19.898000000  0
558dbae050d7fdb6af1ec0c4d053c27b      1  2026-10-24 22:04:20.258000000  2026-10-24 22:04:20.258000000  0
55b23623bc863f7f1a842d631953ca71     12  2026-10-24 22:04:21.006000000  2026-10-24 22:04:21.414000000  438000000

The first two fail in maple trace; the third prints. Versions: CLI v0.2.0, @maple-dev/effect-sdk 0.11.0 (cloudflare preset).

Cause

inspectTrace searches the trace's logs over the trace's own bounds, and the v2 logs search rejects a window whose end equals its start: apps/cli/src/core/remote-ops.ts#L242-L249.

Fix idea

Widen the log window when it is empty, for example end at end_time plus 1 ms. The other option is for the logs search to accept end_time == start_time as an instant.

主要言語
TypeScript
スター
1.8k
フォーク
120
平均マージ
8時間 19分
マージ済み PR(30日)
650

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MapleTechLabs/maple のほかの issue

MapleTechLabs/maple の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。