Lets you watch the metrics of a specific function.
osls metrics--functionor-fThe function you want to fetch the metrics for.--stageor-sThe stage you want to view the function metrics for. If not provided, the plugin will use the default stage listed inserverless.yml. If that doesn't exist either it'll just fetch the metrics from thedevstage.--regionor-rThe region you want to view the function metrics for. If not provided, the plugin will use the default region listed inserverless.yml. If that doesn't exist either it'll just fetch the metrics from theus-east-1region.--startTimeA specific unit in time to start fetching metrics from (ie:2010-10-20,1469705761,30m(30 minutes ago),2h(2 hours ago) or3d(3 days ago)). Accepts the same formats asosls logs --startTime: relative time, ISO 8601 dates and datetimes (interpreted as UTC unless an explicit offset is given), or Unix epoch time in seconds or milliseconds. Defaults to 24h ago.--endTimeA specific unit in time to end fetching metrics from (ie:2010-10-21or1469705761). Accepts the same formats as--startTime. Defaults to now.
Note: There's a small lag between invoking the function and actually having access to the metrics. It takes a few seconds for the metrics to show up right after invoking the function.
osls metricsDisplays service wide metrics for the last 24h.
osls metrics --startTime 2016-01-01 --endTime 2016-01-02Displays service wide metrics for the time between January 1, 2016 and January 2, 2016.
osls metrics --function helloDisplays all hello function metrics for the last 24h.
osls metrics --function hello \
--startTime 2016-01-01 \
--endTime 2016-01-02Displays all hello function metrics for the time between January 1, 2016 and January 2, 2016.