Skip to content

Add safe span attribute helper - #2

Open
superlog-responder[bot] wants to merge 2 commits into
mainfrom
fix/add-safe-span-attribute-helper-09ae0793
Open

superlog-responder[bot] wants to merge 2 commits into
mainfrom
fix/add-safe-span-attribute-helper-09ae0793

Conversation

@superlog-responder

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

Copy link
Copy Markdown

Summary

  • add setSpanAttributesSafe for filtering and setting valid OpenTelemetry span attributes
  • export the helper from the package entry point
  • add coverage for supported scalar/array values and dropped invalid values

Validation

  • git diff --check
  • Unable to run pnpm test, pnpm typecheck, or pnpm build because pnpm and installed dependencies are unavailable in the sandbox.

Summary by cubic

Adds setSpanAttributesSafe, a helper that only sets valid OpenTelemetry span attributes and returns the count of attributes set. Valid values are strings, numbers, booleans, and homogeneous arrays of those; empty keys and anything else are dropped. Exports the helper from the package entry point and adds tests covering valid and invalid values.

Written for commit 7a222b8. 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-07T16:08:22.799351Z 188ecb6 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: 188ecb691b

ℹ️ 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 Outdated
Comment thread src/span.ts
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