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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

If you were using the `SpanProcessor` before, we recommend migrating over to `config.otlp` since it's a much simpler setup.

### Bug Fixes

- Fix `MetricEvent` timestamp serialization to float ([#2862](https://github.com/getsentry/sentry-ruby/pull/2862))

## 6.3.1

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion sentry-ruby/lib/sentry/metric_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def to_h
type: @type,
value: @value,
unit: @unit,
timestamp: @timestamp,
timestamp: @timestamp.to_f,
trace_id: @trace_id,
span_id: @span_id,
attributes: serialize_attributes
Expand Down
2 changes: 1 addition & 1 deletion sentry-ruby/spec/sentry/metric_event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
expect(hash[:type]).to eq(:distribution)
expect(hash[:value]).to eq(5.0)
expect(hash[:unit]).to eq("seconds")
expect(hash[:timestamp]).to be_a(Time)
expect(hash[:timestamp]).to be_a(Float)
end

it "includes trace info if provided" do
Expand Down
Loading