Define the global handle map, constructor and destructor functions and any user-defined functions for a new metric
This allows to define most common functionality and simple operations for a metric type. More complex operations should be written as plain functions directly.
$metric_type- metric type to use from glean_core, e.g.
$metric_map- name to use for the global name, should be all uppercase, e.g.
$new_fn(...)- (optional) name of the constructor function, followed by all additional (non-common) arguments.
$test_get_num_recorded_errors- (optional) name of the test_get_num_recorded_errors function
$destroy- name of the destructor function.
Additional simple functions can be define as a mapping
$op -> $op_fn:
$op- function on the metric type to call.
$op_fn- FFI function name for the operation, followed by its arguments. Arguments are converted into the target type using