Skip to content

fix(yabeda): Normalize plural Yabeda units to Sentry's singular form #2952

Description

@sentry-junior

Problem

Yabeda defines metric units as plural Ruby symbols (e.g. :seconds, :milliseconds, :bytes), but Sentry expects singular unit strings (e.g. "second", "millisecond", "byte") per the Sentry units spec.

Currently unit_for calls .to_s on the unit symbol without normalization, so metrics arrive in Sentry with unrecognized plural units.

Expected Behavior

Yabeda units should be normalized to Sentry's canonical singular form before being sent (e.g. :milliseconds"millisecond").

Solution

Strip the trailing "s" from the stringified unit in Sentry::Yabeda::Adapter#unit_for using .chomp("s"). This handles standard plural→singular conversion for the unit strings Yabeda uses.

Metadata

Metadata

Assignees

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions