feat(config): support OPENCODE_SPAN_ATTRIBUTES#67
Conversation
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/index.ts`:
- Around line 110-113: The user-provided span attributes from
parseAttributePairs(config.spanAttributes) are spread after the project.id
property, allowing them to override it. Reorder the properties in the
commonAttrs object so that "project.id": project.id is placed after the spread
operator of parseAttributePairs(config.spanAttributes), ensuring the canonical
project id always takes precedence and cannot be overridden by user-provided
configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 91a0e6c5-4817-4de6-ae2a-6ccbd78abb61
📒 Files selected for processing (11)
AGENTS.mdREADME.mdsrc/config.tssrc/index.tssrc/otel.tssrc/types.tstests/config.test.tstests/handlers/message.test.tstests/handlers/spans.test.tstests/helpers.tstests/otel.test.ts
|
Addressed the
The CodeRabbit thread is resolved. |
109a42f to
f3effd6
Compare
f3effd6 to
0d02eac
Compare
|
Warning Review limit reached
More reviews will be available in 23 minutes and 40 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
OPENCODE_SPAN_ATTRIBUTESto plugin config and parse custom attribute pairs oncecommonAttrspath so they flow to every span, log event, and metric data pointTesting
bun run typecheckbun testCloses #63
Summary by CodeRabbit
New Features
OPENCODE_SPAN_ATTRIBUTESenvironment variable to attach custom comma-separatedkey=valuepairs to all emitted spans, logs, and metrics for enhanced filtering and grouping.Documentation