diff --git a/CHANGELOG.md b/CHANGELOG.md index 5319301..7d8ef8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 + +### 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). diff --git a/datadogriver/go.mod b/datadogriver/go.mod index 2586acb..f101117 100644 --- a/datadogriver/go.mod +++ b/datadogriver/go.mod @@ -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 ) diff --git a/otelriver/middleware.go b/otelriver/middleware.go index 374a70d..63173f3 100644 --- a/otelriver/middleware.go +++ b/otelriver/middleware.go @@ -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. diff --git a/otelriver/middleware_test.go b/otelriver/middleware_test.go index f75eb00..9b35758 100644 --- a/otelriver/middleware_test.go +++ b/otelriver/middleware_test.go @@ -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{ @@ -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{ @@ -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{