Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix broken link #19855

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/content/docs/service-level-management/consume-slm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,18 @@ As the total amount of tolerated bad responses will vary with the request throug

### SLI attainment over time and SLO target (%) [#sli-attainment]

The last chart shows two time series: the (SLI attainment over time)[#sli-over-time], and the SLO target. When the SLI value is below the SLO target,your service is missing the SLO. Use this chart to learn in which time ranges your service missed the SLO target.
The last chart shows two time series: the [SLI attainment over time](#sli-over-time), and the SLO target. When the SLI value is below the SLO target, your service is missing the SLO. Use this chart to learn in which time ranges your service missed the SLO target.

### Charting the SLI attainment on a dashboard [#sli-attainment-dashboard]

You can chart SLI attainment time series on your custom dashboards using the following query:

```sql
FROM Metric SELECT clamp_max((count(newrelic.sli.valid) - count(newrelic.sli.bad)) / count(newrelic.sli.valid) * 100, 100) AS 'SLI attainment' WHERE sli.id = '<sli.id>' UNTIL 2 MINUTES AGO TIMESERIES AUTO
FROM Metric SELECT clamp_max(
(count(newrelic.sli.valid) - count(newrelic.sli.bad)) /
count(newrelic.sli.valid) * 100, 100) AS 'SLI attainment'
WHERE sli.id = 'SLI_ID'
UNTIL 2 MINUTES AGO TIMESERIES AUTO
```

Where `sli.id` is the SLI identifier. The easiest way to add a chart like this to your dashboard is by using the <DNT>**Add to dashboard**</DNT> option, available on the <DNT>**Details**</DNT> view.
Expand Down
118 changes: 59 additions & 59 deletions src/content/docs/service-level-management/create-slm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,21 @@ Based on `Transaction` events, these SLIs are the most common for request-driven

```sql
FROM Transaction
WHERE entityGuid = '{entityGuid}'
WHERE entityGuid = 'ENTITY_GUID'
```

Where `{entityGuid}` is the service's GUID.
Where `ENTITY_GUID` is the service's GUID.

<DNT>
**Bad events fields**
</DNT>

```sql
FROM TransactionError
WHERE entityGuid = '{entityGuid}' AND error.expected != true
WHERE entityGuid = 'ENTITY_GUID' AND error.expected != true
```

Where `{entityGuid}` is the service's GUID.
Where `ENTITY_GUID` is the service's GUID.
</Collapser>

<Collapser
Expand All @@ -141,7 +141,7 @@ Based on `Transaction` events, these SLIs are the most common for request-driven

```sql
SELECT percentile(duration, 95) FROM Transaction
WHERE entityGuid = '{entityGuid}' SINCE 7 days ago LIMIT MAX
WHERE entityGuid = 'ENTITY_GUID' SINCE 7 days ago LIMIT MAX
```

<DNT>
Expand All @@ -150,22 +150,22 @@ Based on `Transaction` events, these SLIs are the most common for request-driven

```sql
FROM Transaction
WHERE entityGuid = '{entityGuid}' AND transactionType = 'Web'
WHERE entityGuid = 'ENTITY_GUID' AND transactionType = 'Web'
```

Where `{entityGuid}` is the service's GUID.
Where `ENTITY_GUID` is the service's GUID.

<DNT>
**Good events fields**
</DNT>

```sql
FROM Transaction
WHERE entityGuid = '{entityGuid}' AND transactionType = 'Web' AND duration < {duration}
WHERE entityGuid = 'ENTITY_GUID' AND transactionType = 'Web' AND duration < DURATION
```

* Where `{entityGuid}` is the service's GUID.
* Where `{duration}` is the response time that you consider provides a good experience for your client service or end-user, in seconds.
* Where `ENTITY_GUID` is the service's GUID.
* Where `DURATION` is the response time that you consider provides a good experience for your client service or end-user, in seconds.
</Collapser>
</CollapserGroup>

Expand All @@ -187,23 +187,23 @@ Based on OpenTelemetry spans, these SLIs are the most common for request-driven

```sql
FROM Span
WHERE entity.guid = '{entityGuid}' AND (span.kind IN ('server', 'consumer')
WHERE entity.guid = 'ENTITY_GUID' AND (span.kind IN ('server', 'consumer')
OR kind IN ('server', 'consumer'))
```

Where `{entityGuid}` is the service's GUID.
Where `ENTITY_GUID` is the service's GUID.

<DNT>
**Bad events fields**
</DNT>

```sql
FROM Span
WHERE entity.guid = '{entityGuid}' AND (span.kind IN ('server', 'consumer')
WHERE entity.guid = 'ENTITY_GUID' AND (span.kind IN ('server', 'consumer')
OR kind IN ('server', 'consumer')) AND otel.status_code = 'ERROR'
```

Where `{entityGuid}` is the service's GUID.
Where `ENTITY_GUID` is the service's GUID.
</Collapser>

<Collapser
Expand All @@ -219,7 +219,7 @@ Based on OpenTelemetry spans, these SLIs are the most common for request-driven

```sql
SELECT percentile(duration.ms, 95) FROM Span
WHERE entityGuid = '{entityGuid}' AND (span.kind IN ('server', 'consumer')
WHERE entityGuid = 'ENTITY_GUID' AND (span.kind IN ('server', 'consumer')
OR kind IN ('server', 'consumer')) SINCE 7 days ago LIMIT MAX
```

Expand All @@ -229,24 +229,24 @@ Based on OpenTelemetry spans, these SLIs are the most common for request-driven

```sql
FROM Span
WHERE entity.guid = '{entityGuid}' AND (span.kind IN ('server', 'consumer')
WHERE entity.guid = 'ENTITY_GUID' AND (span.kind IN ('server', 'consumer')
OR kind IN ('server', 'consumer'))
```

Where `{entityGuid}` is the service's GUID.
Where `ENTITY_GUID` is the service's GUID.

<DNT>
**Good events fields**
</DNT>

```sql
FROM Span
WHERE entity.guid = '{entityGuid}' AND (span.kind IN ('server', 'consumer')
OR kind IN ('server', 'consumer')) AND duration.ms < {duration}
WHERE entity.guid = 'ENTITY_GUID' AND (span.kind IN ('server', 'consumer')
OR kind IN ('server', 'consumer')) AND duration.ms < DURATION
```

* Where `{entityGuid}` is the service's GUID.
* Where `{duration}` is the response time that you consider provides a good experience for your client service or end-user, in seconds.
* Where `ENTITY_GUID` is the service's GUID.
* Where `DURATION` is the response time that you consider provides a good experience for your client service or end-user, in seconds.
</Collapser>
</CollapserGroup>

Expand All @@ -271,10 +271,10 @@ Note: This feature is still in beta.
```sql
FROM Metric
SELECT sum(getField(apm.service.transaction.duration, count))
WHERE appName = '{appName}'
WHERE appName = 'APP_NAME'
```

Where `{appName}` is the APM app name.
Where `APP_NAME` is the APM app name.

<DNT>
**Bad events fields**
Expand All @@ -283,10 +283,10 @@ Note: This feature is still in beta.
```sql
FROM Metric
SELECT sum(getField(apm.service.error.count, count))
WHERE appName = '{appName}' AND getField(`apm.service.error.count`, count) > 0
WHERE appName = 'APP_NAME' AND getField(`apm.service.error.count`, count) > 0
```

Where `{appName}` is the APM app name.
Where `APP_NAME` is the APM app name.
</Collapser>

<Collapser
Expand All @@ -303,10 +303,10 @@ Note: This feature is still in beta.
```sql
FROM Metric
SELECT sum(getField(apm.service.transaction.duration, count))
WHERE appName = '{appName}'
WHERE appName = 'APP_NAME'
```

Where `{appName}` is the APM app name.
Where `APP_NAME` is the APM app name.

And, now we use the custom metric to discover the good events.

Expand All @@ -317,10 +317,10 @@ Note: This feature is still in beta.
```sql
FROM Metric
SELECT sum(getField(newrelic.timeslice.value, count))
WHERE appName = '{appName}' AND metricTimesliceName = 'Custom/CrossClusterQuery/DataAvailability/status/success'
WHERE appName = 'APP_NAME' AND metricTimesliceName = 'Custom/CrossClusterQuery/DataAvailability/status/success'
```

Where `{appName}` is the APM app name.
Where `APP_NAME` is the APM app name.
</Collapser>
</CollapserGroup>

Expand All @@ -342,21 +342,21 @@ The following SLIs are based on Google's Browser Core Web Vitals.

```sql
FROM PageView
WHERE entityGuid = '{entityGuid}'
WHERE entityGuid = 'ENTITY_GUID'
```

Where `{entityGuid}` is the browser app GUID.
Where `ENTITY_GUID` is the browser app GUID.

<DNT>
**Bad events fields**
</DNT>

```sql
FROM JavaScriptError
WHERE entityGuid = '{entityGuid}' AND firstErrorInSession IS true
WHERE entityGuid = 'ENTITY_GUID' AND firstErrorInSession IS true
```

Where `{entityGuid}` is the browser app GUID.
Where `ENTITY_GUID` is the browser app GUID.
</Collapser>

<Collapser
Expand All @@ -372,28 +372,28 @@ The following SLIs are based on Google's Browser Core Web Vitals.

```sql
FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' AND largestContentfulPaint IS NOT NULL
WHERE entityGuid = 'ENTITY_GUID' AND largestContentfulPaint IS NOT NULL
```

Where `{entityGuid}` is the browser app GUID.
Where `ENTITY_GUID` is the browser app GUID.

<DNT>
**Good events fields**
</DNT>

```sql
FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' AND largestContentfulPaint < '{largestContentfulPaint}'
WHERE entityGuid = 'ENTITY_GUID' AND largestContentfulPaint < 'LARGEST_CONTENTFUL_PAINT'
```

* Where `{entityGuid}` is the browser app GUID.
* Where `{largestContentfulPaint}` is the amount of time (in milliseconds) to render the largest content element visible in the viewport that you consider provides a good experience for your end user. A frequent standard is 4000 ms.
* Where `ENTITY_GUID` is the browser app GUID.
* Where `LARGEST_CONTENTFUL_PAINT` is the amount of time (in milliseconds) to render the largest content element visible in the viewport that you consider provides a good experience for your end user. A frequent standard is 4000 ms.

To determine a realistic number to use for `{largestContentfulPaint}` in your environment, one typical practice is to select the 95 percentile duration of the responses for the last 7 or 15 days. Find it by using the query builder:
To determine a realistic number to use for `LARGEST_CONTENTFUL_PAINT` in your environment, one typical practice is to select the 95 percentile duration of the responses for the last 7 or 15 days. Find it by using the query builder:

```sql
SELECT percentile(largestContentfulPaint, 95) FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' SINCE 7 days ago LIMIT MAX
WHERE entityGuid = 'ENTITY_GUID' SINCE 7 days ago LIMIT MAX
```
</Collapser>

Expand All @@ -410,28 +410,28 @@ The following SLIs are based on Google's Browser Core Web Vitals.

```sql
FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' AND interactionToNextPaint IS NOT NULL
WHERE entityGuid = 'ENTITY_GUID' AND interactionToNextPaint IS NOT NULL
```

Where `{entityGuid}` is the browser app GUID.
Where `ENTITY_GUID` is the browser app GUID.

<DNT>
**Good events fields**
</DNT>

```sql
FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' AND interactionToNextPaint < {interactionToNextPaint}
WHERE entityGuid = 'ENTITY_GUID' AND interactionToNextPaint < INTERACTION_TO_NEXT_PAINT
```

* Where `{entityGuid}` is the browser app GUID.
* Where `{interactionToNextPaint}` is the amount of time (in milliseconds) the browser should respond in to provide a good experience for your end user. A frequent standard is 300 ms.
* Where `ENTITY_GUID` is the browser app GUID.
* Where `INTERACTION_TO_NEXT_PAINT` is the amount of time (in milliseconds) the browser should respond in to provide a good experience for your end user. A frequent standard is 300 ms.

To determine a realistic number to use for `{interactionToNextPaint}` in your environment, one typical practice is to select the 95 percentile duration of the responses for the last 7 or 15 days. Find it by using the query builder:
To determine a realistic number to use for `INTERACTION_TO_NEXT_PAINT` in your environment, one typical practice is to select the 95 percentile duration of the responses for the last 7 or 15 days. Find it by using the query builder:

```sql
SELECT percentile(interactionToNextPaint, 95) FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' SINCE 7 days ago LIMIT MAX FACET deviceType
WHERE entityGuid = 'ENTITY_GUID' SINCE 7 days ago LIMIT MAX FACET deviceType
```
</Collapser>

Expand All @@ -448,10 +448,10 @@ The following SLIs are based on Google's Browser Core Web Vitals.

```sql
FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' AND cumulativeLayoutShift IS NOT NULL
WHERE entityGuid = 'ENTITY_GUID' AND cumulativeLayoutShift IS NOT NULL
```

Where `{entityGuid}` is the browser app GUID.
Where `ENTITY_GUID` is the browser app GUID.

If you’d like to create separate SLIs to track CLS in desktop and mobile devices separately, add one of these clauses at the end of the field:

Expand All @@ -464,22 +464,22 @@ The following SLIs are based on Google's Browser Core Web Vitals.

```sql
FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' AND cumulativeLayoutShift < {cumulativeLayoutShift}
WHERE entityGuid = 'ENTITY_GUID' AND cumulativeLayoutShift < CUMULATIVE_LAYOUT_SHIFT
```

* Where `{entityGuid}` is the browser app GUID.
* Where `{cumulativeLayoutShift}` is a pre-set value. To provide a good user experience, your site should strive to have a CLS score of 0.1 or less. A CLS score of 0.25 or more is considered a poor user experience.
* Where `ENTITY_GUID` is the browser app GUID.
* Where `CUMULATIVE_LAYOUT_SHIFT` is a pre-set value. To provide a good user experience, your site should strive to have a CLS score of 0.1 or less. A CLS score of 0.25 or more is considered a poor user experience.

If you’ve decided to create separate SLIs to track CLS in desktop and mobile devices separately when you defined the valid events query, add this clause at the end of the field:

* `AND deviceType = 'Mobile'`
* `AND deviceType = 'Desktop'`

To determine a realistic number to select for `{cumulativeLayoutShift}` in your environment, one typical practice is to select the 75th percentile of page loads for the last 7 or 15 days, segmented across mobile and desktop devices. Find it by using the query builder:
To determine a realistic number to select for `CUMULATIVE_LAYOUT_SHIFT` in your environment, one typical practice is to select the 75th percentile of page loads for the last 7 or 15 days, segmented across mobile and desktop devices. Find it by using the query builder:

```sql
SELECT percentile(cumulativeLayoutShift, 95) FROM PageViewTiming
WHERE entityGuid = '{entityGuid}' SINCE 7 days ago LIMIT MAX FACET deviceType
WHERE entityGuid = 'ENTITY_GUID' SINCE 7 days ago LIMIT MAX FACET deviceType
```
</Collapser>
</CollapserGroup>
Expand All @@ -500,21 +500,21 @@ The following SLIs are based on Google's Browser Core Web Vitals.

```sql
FROM SyntheticCheck
WHERE entity.guid = '{entityGuid}'
WHERE entity.guid = 'ENTITY_GUID'
```

Where `{entityGuid}` is the synthetic check's GUID.
Where `ENTITY_GUID` is the synthetic check's GUID.

<DNT>
**Good events fields**
</DNT>

```sql
FROM SyntheticCheck
WHERE entity.guid = '{entityGuid}' AND result='SUCCESS'
WHERE entity.guid = 'ENTITY_GUID' AND result='SUCCESS'
```

Where `{entityGuid}` is the synthetic check's GUID.
Where `ENTITY_GUID` is the synthetic check's GUID.
</Collapser>
</CollapserGroup>

Expand Down Expand Up @@ -614,7 +614,7 @@ To create service levels, follow these steps:
```sql
FROM JavaScriptError
SELECT count(*)
WHERE entityGuid = '{entityGuid}' AND firstErrorInSession IS true
WHERE entityGuid = 'ENTITY_GUID' AND firstErrorInSession IS true
```

Example using `sum()`:
Expand Down