Validate Observation.Scope closing when using TestObservationRegistry (original) (raw)

Please describe the feature request.
TestObservationRegistry uses ObservationValidator to catch issues related to the order of calling APIs on Observation. It would be nice to check the closing of Scopes as well. This could include things like the order of closing nested scopes and the Thread on which Scopes are opened and closed.

Rationale
See #6313.

Additional context
Similar feature to ObservationValidator.