Skip to content

Support custom units for custom measurements #1053

@marandaneto

Description

@marandaneto

Description

Due to the limitations of enums on Dart, there was no easy way to extend the enum and accept a plain String.
We can leverage this feature if needed, when we upgrade to Dart 2.17, or just set the unit as a plain string and document all the possible values.

Related to #1011

Example on Java:

transaction.setMeasurement("metric1", 2, MeasurementUnit.Duration.DAY)
transaction.setMeasurement("metric1", 2, MeasurementUnit.Custom("myOwnUnit"))

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions