Since Measurements are returned directly by the user specified callbacks to async instruments, Measurement should be a concrete class in the API.
def my_observable_counter_callback() -> Iterable[Measurement]:
return [
# the instrumentation needs to instantiate and return this directly
Measurement(123, {"foo": "bar"}),
...
]
meter.create_observable_counter("my_observable_counter", callback=my_observable_counter_callback)
spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#measurement