Validate Metrics in the Console

Validate EMF Output in CloudWatch Logs

  1. Go to your CloudWatch Console.

  2. Under Logs, click Log Groups.

  3. Check the Exact match box, and type the prefix of your Stack, monitoring-app in our case.

  4. You should see all available Log Groups for our Lambda functions.

  5. Click in the one that contains GetAllItemsFunction on its name.

    metrics-1

  6. Click in the latest Log Stream.

    metrics-2

    You should be able to see something like the print screen below containing at least three log entries: Two for the context and event objects, a tentative error log in case of any failures, and a final one regarding the result of the function execution.

  7. Expand and navigate through the payload generated for each entry. Notice that the additional metadata that we added in our helper lib are present for each entry.

emf-1

Validate Metrics in CloudWatch Metrics

  1. Go to your CloudWatch Console.

  2. Click Metrics.

  3. On Custom Namespaces, click the MonitoringApp namespace.

  4. You should see a new metrics dimensions: LogGroup, ServiceName, ServiceType, function_name.

  5. Click it and select all metrics available.

    metrics-1

  6. Go back to the MonitoringApp namespace.

  7. You should see another new metrics dimensions: LogGroup, ServiceName, ServiceType, operation.

  8. Click it and select all metrics available.

    metrics-2

  9. Click the Graphed Metrics tab and select all metrics available.

  10. Validate the metrics you just selected.

metrics-3