Skip to content

Trace metrics are always dropped by Relay with "No Data" reason in admin #2857

@Kobby-Bawuah

Description

@Kobby-Bawuah

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

  1. Initialize Sentry with defaults
  2. Send any metric:
    Sentry::Metrics.distribution("test_metric", 20.0, unit: "kilobyte", attributes: { foo: "bar" })
  3. Check the Metrics Explore page, nothing appears
  4. 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

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions