You are instrumenting an e-commerce site with Application Insights. You must: 1) record when a user clicks AddToCart with the productId and userTier, 2) track the numeric basketValue at checkout for custom alerting, and 3) measure calls to an external payment gateway including latency and success/failure. Which telemetry calls should you add?
Choose an answer
Tap an option to check your answer.
Correct answer: TrackEvent("AddToCart", properties: { productId, userTier }), TrackMetric("BasketValue", basketValue), TrackDependency("PaymentGateway","POST /charge", startTime, duration, success).
Why this is the answer
TrackEvent is correct for recording user actions like "AddToCart" because it allows you to capture custom properties (productId, userTier) that describe the event. TrackMetric is correct for tracking a single numeric value like "basketValue" that can be aggregated and used for custom alerting. TrackDependency is correct for monitoring calls to external services such as a payment gateway, as it automatically captures critical information like target, name, start time, duration, and success/failure, which is essential for performance and reliability analysis. TrackTrace is incorrect because it's for logging diagnostic messages, not for structured tracking of user actions, metrics, or external dependencies.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed