Skip to content

Commit fb3079b

Browse files
adinauerclaude
andauthored
docs(metrics): Explain metric unit API design (#6087)
* docs(metrics): Explain metric unit API design Document why metrics accept string units rather than reusing MeasurementUnit. This preserves the supported-unit distinction and lets older SDK versions send newly introduced units. Co-Authored-By: Claude <noreply@anthropic.com> * docs(metrics): Clarify unit API distinction Distinguish units for the Metrics product from transaction and span measurement units used by mobile vitals. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e017726 commit fb3079b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎sentry/src/main/java/io/sentry/metrics/MetricsUnit.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
/**
44
* String constants for metric units.
55
*
6-
* <p>These constants represent the API names of measurement units that can be used with metrics.
6+
* <p>These constants are for the Metrics product and the {@link IMetricsApi} exposed through {@link
7+
* io.sentry.Sentry#metrics()} and {@link io.sentry.IScopes#metrics()}. {@link
8+
* io.sentry.MeasurementUnit} is instead used by transaction and span measurement APIs, including
9+
* mobile vitals.
10+
*
11+
* <p>Metrics APIs accept strings so older SDK versions can use units introduced after their
12+
* release.
713
*/
814
public final class MetricsUnit {
915

0 commit comments

Comments
 (0)