Skip to content

otelriver: Add kinds span attribute to insert_many spans#62

Merged
brandur merged 1 commit into
riverqueue:masterfrom
echatman:add-kinds-span-attribute
Jun 5, 2026
Merged

otelriver: Add kinds span attribute to insert_many spans#62
brandur merged 1 commit into
riverqueue:masterfrom
echatman:add-kinds-span-attribute

Conversation

@echatman

@echatman echatman commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Emit the distinct, sorted job kinds present in each batch as a kinds string-slice attribute on river.insert_many spans, so trace queries can answer "which kinds were in this batch?" without affecting metric cardinality.
  • Computes kinds from manyParams regardless of the outcome (success, error, or panic), so it's available on every insert_many span.
  • No metric changes — span attribute only.

Test plan

  • Added a kinds=["no_op"] assertion to the existing InsertManySuccess, InsertManyError, and InsertManyPanic subtests.
  • Added a new InsertManyMixedKinds subtest that submits a 3-job batch with 2 distinct kinds (and a duplicate) and verifies the attribute is deduplicated and sorted.
  • go test ./otelriver/... and go vet ./otelriver/... pass locally.

Made with Cursor

Made with Cursor

Emit the distinct, sorted job kinds present in each batch as a
`kinds` string-slice attribute on `river.insert_many` spans. This
surfaces which kinds were inserted in each batch for trace queries
without affecting metric cardinality.

Co-authored-by: Cursor <cursoragent@cursor.com>
@echatman echatman force-pushed the add-kinds-span-attribute branch from 20a6fb4 to 63d595e Compare June 5, 2026 22:15

@brandur brandur 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.

WFM.

@brandur brandur marked this pull request as ready for review June 5, 2026 23:45
@brandur brandur merged commit 3edd106 into riverqueue:master Jun 5, 2026
2 checks passed
@brandur brandur mentioned this pull request Jun 5, 2026
brandur added a commit that referenced this pull request Jun 6, 2026
Prepare release v0.10.0, including #62. I also put a few fixes into the
changelog and some cosmetic alphabetization stuff.

[skip ci]
@brandur

brandur commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Released in v0.10.0.

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.

2 participants