Open JyotikaGargg opened 1 year ago
These basic method definitions are good for a POC. It needs to be fleshed out, such as defining an interface for the internal telemetry implementation and using the dependency inversion infrastructure to pass the instance of the interface to the command implementations like we pass other services. We don't want to have all the commands calling a global singleton directly. Tests can provide a mock implementation of that interface to verify the commands log the expected telemetry when run.
Added a Telemetry package with App Insight resource (the infra would change and so the instrumentation key) We have added for following commands : Create Query Open Config
It also capture if sqlcmd run from : legacy /modern. Following is the snapshot of example commands triggered through sqlcmd and gettig logged in App Insight resource: