# Contract

> How LevelFour reads your Datadog contract off the bill, how you correct it line by line, and how it projects each line to the end of the month.

Source: https://docs.levelfour.ai/connectors/datadog/contract


Datadog has no endpoint that returns your contract, but your bill shows how each product's charge splits. A committed line covers usage inside the commitment, and an on-demand line covers usage past it. LevelFour builds your contract from those lines, and you correct it or add what the bill cannot show.

Each Datadog connection holds its own contract, because each parent organization signs its own agreement.

## How LevelFour reads it from the bill

After each sync, LevelFour takes each product's committed charge from the latest month that billed one. It prefers a closed month, because the current month's committed charge only holds what has accrued so far. Each of those products becomes a line that commits that many dollars a month, marked **Bill**.

LevelFour also keeps the past year month by month: the committed charge as the contract's floor, and the on-demand charge as what billed past it.

A quantity, such as a number of hosts or millions of log events, appears on no bill. You add it yourself.

## Edit the contract

Only admins can change the contract. Everyone else sees it read-only.

### Open the contract

Open **Connect Providers > Datadog**. The **Contract** section lists each line with its **Quantity** and **Monthly spend (USD)**. On the Datadog board, **Edit the contract** opens the same section.

### Correct a line or add one

* To correct what the bill says, change the line's **Monthly spend (USD)**. A line from the bill commits spend only, so its quantity reads **Spend only**.
* To commit a quantity, click **Add a quantity** and pick a usage line, such as `infra_hosts/host_count`. The list holds what Datadog has reported usage for on this connection, since LevelFour can only measure a quantity against usage it reads. Enter the quantity, and the monthly spend too if your contract states it.

Each value has to be above 0, and a line needs a quantity, a spend or both.

### Save

Click **Save contract**.

Your lines read **You**. Where you and the bill both have a line for the same thing, yours wins, and the next sync rewrites only the bill's lines. Remove your line and the bill's line reads again.

## Month-end projection

For each line, LevelFour projects where this month ends:

* A line with a quantity reads the usage Datadog meters for it. A line with spend alone reads that product's spend on the bill.
* Usage that adds up through the month, such as log events, bytes or spend, runs on at its daily pace to the last day of the month. $3,000 through the 10th is $300 a day, so a 31-day month ends at $9,300.
* A level Datadog counts every hour and bills on its high-water mark, such as hosts, containers, Fargate tasks and custom metrics, projects at its highest day so far. The month cannot bill less than that, and nothing measured says it will climb.

Datadog reports usage up to 72 hours late, so the pace runs from the last day Datadog reported, not from today. The **Contract** card on the Datadog board names that day.

The projected overage is how far the projection runs past the line's commitment, and never goes below zero.

Datadog's usage data can run up to 72 hours behind. For the days it has not reached, LevelFour reads Datadog's own estimated usage metrics, so the projection and the alert run on recent usage. The board marks those days as estimated, and billed usage replaces them when it lands.

## The crossing day

The crossing day is the first day a line's usage passes its commitment. For usage that adds up, it is the first day the month's running total passes the commitment, either a day already reported or, at the current pace, a day still to come. For a level billed on its high-water mark, it is the first reported day above the commitment. A line that stays inside its commitment until the end of the month has none.

The **Contract** card on the Datadog board shows each line's projection and the day it passes its commitment.

## Alert before the on-demand charge

A cost alert can warn you while a line is still on course to pass its commitment, before Datadog bills the first on-demand charge.

### Create a commitment alert

Open **Settings > Cost Alerts**, click **Create alert** and choose **Commitment**. Choose **Contracts** as the source.

### Choose the watch

Under **Warn when**, pick **Usage is on course to pass it**.

[Contract alerts](/cost-alerts#contract-alerts) covers when each contract watch fires and what its notification says. [Cost alerts](/cost-alerts) covers recipients, Slack channels and how often LevelFour checks.

## Prepare your renewal

The **Renewal** card on the Datadog board puts the year behind each product on one table, and **Download CSV** takes it into the negotiation. LevelFour reads 15 months of usage and bill, so the table fills after your first sync.

Each product shows:

* Monthly usage: lowest, median, p95 and latest.
* What you committed against what you used, and the commitment you left unused, in USD.
* What you paid on demand.
* Your effective rate next to Datadog's list price, where Datadog publishes one.
* The commitment LevelFour recommends on today's usage, and on the usage left once your open findings ship, with the yearly spend of each and the usage trend.

Each recommendation says whether its price comes from your bill or from list price. A quantity LevelFour worked out from the bill reads "at least" or "about". You get the exact figure by entering it in [the contract](#edit-the-contract).

A blank means LevelFour does not have enough to say. The yearly totals need six comparable months, and a recommendation needs a price from your bill or from Datadog's list. A month committed at a different charge stays out of the unused figure.

The savings column shows potential savings only. LevelFour adds it to nothing.

## Next

* [Connect Datadog](/connectors/datadog) covers the keys LevelFour reads your bill and usage with
* [Datadog savings](/connectors/datadog/findings) flags a product that keeps billing on demand, so you can size its commitment at renewal
