Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sl0thentr0py committed Aug 31, 2023
1 parent c8b8c4c commit 0cf4996
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions sentry-ruby/lib/sentry/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def initialize(configuration:, integration_meta: nil, message: nil)
@tags = {}

@fingerprint = []
@dynamic_sampling_context = nil

# configuration data that's directly used by events
@server_name = configuration.server_name
Expand Down
4 changes: 2 additions & 2 deletions sentry-ruby/lib/sentry/hub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ def get_traceparent
return nil unless current_scope

current_scope.get_span&.to_sentry_trace ||
current_scope.propagation_context&.get_traceparent
current_scope.propagation_context.get_traceparent
end

def get_baggage
return nil unless current_scope

current_scope.get_span&.to_baggage ||
current_scope.propagation_context&.get_baggage&.serialize
current_scope.propagation_context.get_baggage&.serialize
end

def get_trace_propagation_headers
Expand Down
6 changes: 2 additions & 4 deletions sentry-ruby/lib/sentry/propagation_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ def populate_head_baggage
"sample_rate" => configuration.traces_sample_rate&.to_s,
"environment" => configuration.environment,
"release" => configuration.release,
"public_key" => configuration.dsn&.public_key
"public_key" => configuration.dsn&.public_key,
"user_segment" => @scope.user && @scope.user["segment"]
}

user = @scope&.user
items["user_segment"] = user["segment"] if user && user["segment"]

items.compact!
@baggage = Baggage.new(items, mutable: false)
end
Expand Down

0 comments on commit 0cf4996

Please sign in to comment.