Closed
Description
Description
A meter factory sets the scope of the meter it creates to itself:
However, a scope can be provided on MeterOptions.Scope
, which passed to Create
.
Create
should probably throw an error if a scope is specified. Otherwise there could be confusion about why the specified scope value wasn't used.
Reproduction Steps
object myCoolScope = new object();
IMeterFactory f = CreateFactory();
Meter meter = f.Create(new MeterOptions("Name") { Scope = myCoolScope });
Debug.Assert(meter.Scope == myCoolScope); // Fails?!?!
Expected behavior
Throw an error.
Actual behavior
The scope provided by the user is ignored, and the meter scope is set to the factory.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response