diff --git a/CHANGELOG.md b/CHANGELOG.md index be8ff9e1a..228dce77e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ - Fix breadcrumb serialization error message to be an object ([#2584](https://github.com/getsentry/sentry-ruby/pull/2584)) - Fixes [#2478](https://github.com/getsentry/sentry-ruby/issues/2478) +### Internal + +- Remove `user_segment` from DSC ([#2586](https://github.com/getsentry/sentry-ruby/pull/2586)) + ## 5.23.0 ### Features diff --git a/sentry-ruby/lib/sentry/propagation_context.rb b/sentry-ruby/lib/sentry/propagation_context.rb index db2f58b8f..4112689ff 100644 --- a/sentry-ruby/lib/sentry/propagation_context.rb +++ b/sentry-ruby/lib/sentry/propagation_context.rb @@ -124,8 +124,7 @@ def populate_head_baggage "trace_id" => trace_id, "environment" => configuration.environment, "release" => configuration.release, - "public_key" => configuration.dsn&.public_key, - "user_segment" => @scope.user && @scope.user["segment"] + "public_key" => configuration.dsn&.public_key } items.compact! diff --git a/sentry-ruby/lib/sentry/transaction.rb b/sentry-ruby/lib/sentry/transaction.rb index 6fc2524b0..4e6411a8f 100644 --- a/sentry-ruby/lib/sentry/transaction.rb +++ b/sentry-ruby/lib/sentry/transaction.rb @@ -342,9 +342,6 @@ def populate_head_baggage items["transaction"] = name unless source_low_quality? - user = @hub.current_scope&.user - items["user_segment"] = user["segment"] if user && user["segment"] - items.compact! @baggage = Baggage.new(items, mutable: false) end