Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.10.0] - 2026-06-06

### Added

- Added `unique_skipped_as_duplicate` attributes to otel `insert_many` spans and `insert_count` metric. [PR #58](https://github.com/riverqueue/rivercontrib/pull/58).
- Add `kinds` span attribute to `otelriver` `insert_many` spans listing the distinct job kinds in each batch. [PR #62](https://github.com/riverqueue/rivercontrib/pull/62).

## [0.9.0] - 2026-06-02

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Forgot to add 0.9.0 here properly on the last release. Moved things around a little to put them in the right place.


### Added

- Added `unique_skipped_as_duplicate` attributes to otel `insert_many` spans and `insert_count` metric. [PR #58](https://github.com/riverqueue/rivercontrib/pull/58).

### Changed

- Record snoozed jobs with status `ok` instead of `error` in `otelriver` middleware. Add new `snooze.duration` span attribute. [PR #59](https://github.com/riverqueue/rivercontrib/pull/59).
Expand Down
2 changes: 1 addition & 1 deletion datadogriver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.29.0
github.com/riverqueue/river/rivershared v0.29.0
github.com/riverqueue/river/rivertype v0.29.0
github.com/riverqueue/rivercontrib/otelriver v0.9.0
github.com/riverqueue/rivercontrib/otelriver v0.10.0
go.opentelemetry.io/otel v1.43.0
)

Expand Down
2 changes: 1 addition & 1 deletion otelriver/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ func (m *Middleware) InsertMany(ctx context.Context, manyParams []*rivertype.Job

span.SetAttributes(attrs...) // set after finalizing status
span.SetAttributes(
attribute.Int64("unique_skipped_as_duplicate_count", skipped),
attribute.StringSlice("kinds", kinds),
attribute.Int64("unique_skipped_as_duplicate_count", skipped),
)

// This allocates a new slice, so make sure to do it as few times as possible.
Expand Down
6 changes: 3 additions & 3 deletions otelriver/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ func TestMiddleware(t *testing.T) {
require.Equal(t, "ok", getAttribute(t, span.Attributes, "status").AsString())
require.Equal(t, "river.insert_many", span.Name)
require.Equal(t, codes.Ok, span.Status.Code)
require.EqualValues(t, 0, getAttribute(t, span.Attributes, "unique_skipped_as_duplicate_count").AsInt64())
require.Equal(t, []string{"no_op"}, getAttribute(t, span.Attributes, "kinds").AsStringSlice())
require.EqualValues(t, 0, getAttribute(t, span.Attributes, "unique_skipped_as_duplicate_count").AsInt64())

var (
expectedAttrs = []attribute.KeyValue{
Expand Down Expand Up @@ -130,8 +130,8 @@ func TestMiddleware(t *testing.T) {
require.Equal(t, "river.insert_many", span.Name)
require.Equal(t, codes.Error, span.Status.Code)
require.Equal(t, "error from doInner", span.Status.Description)
require.EqualValues(t, 0, getAttribute(t, span.Attributes, "unique_skipped_as_duplicate_count").AsInt64())
require.Equal(t, []string{"no_op"}, getAttribute(t, span.Attributes, "kinds").AsStringSlice())
require.EqualValues(t, 0, getAttribute(t, span.Attributes, "unique_skipped_as_duplicate_count").AsInt64())

var (
expectedAttrs = []attribute.KeyValue{
Expand Down Expand Up @@ -173,8 +173,8 @@ func TestMiddleware(t *testing.T) {
require.Equal(t, "river.insert_many", span.Name)
require.Equal(t, codes.Error, span.Status.Code)
require.Equal(t, "panic", span.Status.Description)
require.EqualValues(t, 0, getAttribute(t, span.Attributes, "unique_skipped_as_duplicate_count").AsInt64())
require.Equal(t, []string{"no_op"}, getAttribute(t, span.Attributes, "kinds").AsStringSlice())
require.EqualValues(t, 0, getAttribute(t, span.Attributes, "unique_skipped_as_duplicate_count").AsInt64())

var (
expectedAttrs = []attribute.KeyValue{
Expand Down