AppStatus Documentation Hub for Production Operations

Docs > Platform Observability > Getting Started with Serverless

Getting Started with Serverless

Overview

This guide introduces AppStatus Serverless and covers:

  • Invocation count, duration and outcome per function
  • Cold starts tracked separately from warm invocations
  • Trace context so functions appear in distributed traces
  • Duration alerting measured against your configured timeout
  • Error correlation with the rest of your stack

What is Serverless in AppStatus?

Serverless tracks each function invocation — how long it ran, whether it cold-started, whether it errored, and how that changed after your last deploy.

Cold and warm invocations are reported separately, because combining them makes both numbers wrong: a healthy function with occasional cold starts looks slow, and a genuinely slow warm path hides behind the cold-start average.

Key capabilities:

  • Per-function invocation count, duration and error rate
  • Cold start share tracked as its own series
  • Trace context propagated into and out of functions
  • Timeout-aware duration alerting
  • Errors grouped alongside the rest of your services

What you will see

What the function list looks like

app.appstatus.ioSample data
FunctionInvocationsDuration (warm)Cold startsErrors
thumbnail-generate184k212 ms0.4%12
webhook-receive96k38 ms2.1%0
report-export4108.9 s41%18
auth-verify1.2M14 ms0.1%3

Scroll the table sideways to see every column.

A rising cold-start share usually means traffic dropped, not that the function got slower.

Troubleshooting

Invocations do not appear

Confirm the ingest key is serverless-scoped and the SDK wraps the handler itself rather than code called inside it. A wrapper placed too deep misses the invocation boundary.

Duration sits exactly at the timeout

The function is being killed, not finishing. Open the trace and look at the last downstream call — a hung dependency is the usual cause, and raising the timeout only delays it.

Cold start percentage looks alarming

Read it against traffic. Low-traffic functions cold-start proportionally more because instances are recycled between calls; that is expected, not a regression.

Operational Guidance

  • Read cold and warm durations separately; combined, both look wrong.
  • A rising cold-start share usually means traffic dropped, not that the function got slower.
  • Functions that time out show as duration at the ceiling — check the downstream call in the trace.

Step-by-Step Setup

Serverless setup is one key and one wrapper around your handler. The thing worth getting right is where the wrapper sits — too deep and it misses the invocation boundary entirely.

Before you start

  • A deployed function you can update
  1. 1

    Create an ingest key scoped to serverless

    Open Ingest Keys and create a key scoped to serverless for the environment you are setting up. The key value is shown once — copy it into your secret manager now, not into source control.

    WhereIngest Keys → Create key
    Tip

    One scope per key. A key reused across signals turns a single leak into full ingest access.

  2. 2

    Wrap the handler

    Add the SDK and wrap the exported handler itself, not a function called inside it. The wrapper is what marks the start and end of an invocation, including cold starts.

    WhereServerless → Add function
    Tip

    A wrapper placed one level too deep reports duration but misses cold starts entirely.

  3. 3

    Set function name and environment

    Use the deployed function name so it matches what you see in your cloud console, and set the environment so staging invocations do not distort production numbers.

    WhereSDK configuration
  4. 4

    Invoke and confirm

    Trigger the function once and confirm the invocation appears with duration, cold-start status and outcome.

    WhereServerless → Functions
  5. 5

    Alert below the timeout

    Add a duration alert set well under the configured timeout. Alerting at the timeout tells you about failures you already had; alerting below it tells you before they start.

    WhereAlerts → Alert rules

Configuration Options

Every option you can set, what each choice means, and what to pick. Use this as a reference while you fill in the form.

Function settings

FieldOptionsWhat it doesRecommended
Function nameDeployed nameGroups invocations.Match your cloud console so the two line up.
TimeoutSecondsCeiling used for duration alerting.Alert well below it, never at it.
Cold start trackingOn / offSeparates cold from warm invocations.Keep on — combined, both numbers are wrong.

Feature Reference

Every feature, where to find it in the app, and what it does. Use this when you know what you want to do but not where it lives.

FeatureWhere in appDescription
Function listServerless → FunctionsInvocations, duration, cold-start share and errors.
Cold start seriesFunction detailCold and warm durations reported separately.
Trace contextAPM → traceFunctions appear inside the wider distributed trace.
Error correlationError TrackingFunction exceptions grouped with the rest of your services.

Next Steps

Continue building your monitoring stack: