Issue Description
Metrics sent via Sentry::Metrics.distribution (or any metric method) never show up in the Sentry UI. In admin, they all appear as Dropped (Server) / No Data.
The timestamp in the metric payload is being sent as a string like "2026-02-18 21:54:48 UTC" instead of a numeric value like 1771453701.042. Relay can't parse that format, so it rejects the metric entirely.
LogEvent already handles this correctly by converting the timestamp with .to_f.
Reproduction Steps
- Initialize Sentry with defaults
- Send any metric:
Sentry::Metrics.distribution("test_metric", 20.0, unit: "kilobyte", attributes: { foo: "bar" })
- Check the Metrics Explore page, nothing appears
- Admin stats show all metrics as Dropped (Server) / No Data
Expected Behavior
Metrics are accepted and visible in the Sentry UI.
Actual Behavior
All metrics are dropped. The timestamp goes over the wire in a format Relay can't parse. The Python and JavaScript SDKs send timestamps as numbers and work fine.
Ruby Version
3.4.0
SDK Version
6.3.1
Integration and Its Version
No response
Sentry Config
Sentry.init do |config|
config.dsn = 'https://...'
config.sample_rate = 1
config.traces_sampler = -> (c) do ... end
end
Issue Description
Metrics sent via
Sentry::Metrics.distribution(or any metric method) never show up in the Sentry UI. In admin, they all appear as Dropped (Server) / No Data.The timestamp in the metric payload is being sent as a string like
"2026-02-18 21:54:48 UTC"instead of a numeric value like1771453701.042. Relay can't parse that format, so it rejects the metric entirely.LogEventalready handles this correctly by converting the timestamp with.to_f.Reproduction Steps
Sentry::Metrics.distribution("test_metric", 20.0, unit: "kilobyte", attributes: { foo: "bar" })Expected Behavior
Metrics are accepted and visible in the Sentry UI.
Actual Behavior
All metrics are dropped. The timestamp goes over the wire in a format Relay can't parse. The Python and JavaScript SDKs send timestamps as numbers and work fine.
Ruby Version
3.4.0
SDK Version
6.3.1
Integration and Its Version
No response
Sentry Config
Sentry.init do |config|
config.dsn = 'https://...'
config.sample_rate = 1
config.traces_sampler = -> (c) do ... end
end