> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackshift.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Report your app’s own numbers

> Send numbers only your app knows, such as photos waiting or emails queued, and see them next to the service on the Metrics page.

> [!TIP]
>
> **Live.** This area is documented as current, user-reliable behavior.

## Goal

Show a number from your own code beside a service, live and over time.

## Prerequisites

* A deployed project. Every deploy already has STACKSHIFT\_METRICS\_URL and STACKSHIFT\_METRICS\_TOKEN, so there is nothing to set up.

## Workflow

**Step 1**

Call the SDK, or post to STACKSHIFT\_METRICS\_URL, whenever the number changes.

**Step 2**

Deploy. The number shows in the live strip next to that service, for example worker · 3 photos waiting, with a chart below.

## From your code

* Outside StackShift the SDK calls do nothing and never throw, so the same code runs on your laptop.

```typescript JavaScript and TypeScript theme={null}
import { metric } from '@stackshift-cloud/sdk'

await metric('photos waiting', 3)
```

```python Python theme={null}
stackshift.metric("photos waiting", 3)
```

```go Go theme={null}
stackshift.Metric(ctx, "photos waiting", 3)
```

```php PHP theme={null}
\StackShift\Metrics::send('photos waiting', 3);
```

```ruby Ruby theme={null}
StackShift.metric("photos waiting", 3)
```

## Over plain HTTP

* unit is optional, up to 16 characters.
* A batch holds up to 50 points.

```bash One number theme={null}
curl -X POST "$STACKSHIFT_METRICS_URL" \
  -H "Authorization: Bearer $STACKSHIFT_METRICS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name":"photos waiting","value":3}'
```

```json Several at once theme={null}
{"metrics":[{"name":"photos waiting","value":3},{"name":"emails queued","value":12,"unit":"emails"}]}
```

## Limits

* Up to 120 requests a minute for each service.
* Names are 1 to 64 characters. Values must be numbers.
* History is kept for your plan’s log days, and at least 7 days.

## Expected result

> [!TIP]
>
> Project, Metrics shows the latest value beside the service and a chart of its history.

## Related guides

> [card] [The performance page](https://docs.stackshift.cloud/performance/overview.md)
>
> Project, Metrics shows how your project is doing right now and over the last 7 days: memory, speed, page load, processor, disk, network and database, with what to change.

> [card] [API](https://docs.stackshift.cloud/performance/api.md)
>
> The endpoints behind the performance page, for your own tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.