Skip to content

Add synchronous span helper - #1

Open
superlog-responder[bot] wants to merge 2 commits into
mainfrom
fix/add-synchronous-span-helper-7bfbac8a
Open

superlog-responder[bot] wants to merge 2 commits into
mainfrom
fix/add-synchronous-span-helper-7bfbac8a

Conversation

@superlog-responder

@superlog-responder superlog-responder Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Summary

  • add a synchronous withSyncSpan helper alongside withSpan
  • export it from the package entrypoint
  • cover synchronous callback execution, options, return values, and span completion

Verification

  • npm run typecheck
  • npx vitest run --pool=threads --poolOptions.threads.singleThread=true
  • npm run build

Summary by cubic

Adds a withSyncSpan helper that wraps synchronous callbacks in spans, matching the existing async withSpan behavior. The helper is exported from the package entrypoint, records errors on thrown callbacks, and throws a TypeError if the callback returns a Promise to steer callers toward withSpan. Covered by tests for callback execution, options, return values, error recording, and span completion.

Written for commit 440a992. Summary will update on new commits.

View guided diff Turn on auto-fix

@arseniycodes

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T13:41:58.114102Z 914a111 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 914a111df4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/span.ts
Comment thread src/span.ts Outdated
@arseniycodes

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 914a111df4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@arseniycodes arseniycodes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex's two comments on src/span.ts (comments 4207378835 and 4207378862) are still open. Please address them and reply on each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant