AWS Certified Developer Associate DVA-C02 Practice Question
Your development team is tasked with tracking the number of successful new user registrations in a serverless environment. In order to create more granular monitoring, the team has decided to publish a custom metric called 'UserSignUpSuccessCount' to a monitoring service whenever a registration is completed. Which approach allows for the efficient transmission of this custom metric adhering to a structured logging format provided by the platform's native monitoring service?
Output a specifically structured JSON log from the serverless function according to the service's embedded metric format standards.
Invoke the service's API to directly submit metric data from within the serverless function's execution code.
Modify the serverless function's permissions to include metrics publishing directly to the monitoring system.
Enable a distributed tracing tool within the serverless function and tag the tracing segments with the metric's data.