[MetricsAdvisor] Consider avoid using extra Get in some Create operations #18480
Labels
blocking-release
Blocks release
Client
This issue points to a problem in the data-plane of the library.
Cognitive - Metrics Advisor
Milestone
We usually perform an extra Get call at the end of our Create methods to populate our returned models. In
CreateDataFeed
this is necessary to populate properties that can't be determined at the client side after creation, in special the metric IDs.Other Create methods, such as
CreateHook
, don't really obtain any extra information from these extra Get calls, and they're used exclusively to build the returned models. Consider setting the ID using an internal setter and removing the extra call.Methods to consider:
Concern: consider whether it may be a good idea or not to set the ID of the model used as input by the user. It may be worth cloning the whole model to have separate references.
The text was updated successfully, but these errors were encountered: