diff --git a/src/content/docs/service-level-management/consume-slm.mdx b/src/content/docs/service-level-management/consume-slm.mdx index ffc626c99f7..7020e8c4758 100644 --- a/src/content/docs/service-level-management/consume-slm.mdx +++ b/src/content/docs/service-level-management/consume-slm.mdx @@ -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 = '' 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 **Add to dashboard** option, available on the **Details** view. diff --git a/src/content/docs/service-level-management/create-slm.mdx b/src/content/docs/service-level-management/create-slm.mdx index 8390fd68d35..39955deaac4 100644 --- a/src/content/docs/service-level-management/create-slm.mdx +++ b/src/content/docs/service-level-management/create-slm.mdx @@ -111,10 +111,10 @@ 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. **Bad events fields** @@ -122,10 +122,10 @@ Based on `Transaction` events, these SLIs are the most common for request-driven ```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. @@ -150,10 +150,10 @@ 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. **Good events fields** @@ -161,11 +161,11 @@ Based on `Transaction` events, these SLIs are the most common for request-driven ```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. @@ -187,11 +187,11 @@ 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. **Bad events fields** @@ -199,11 +199,11 @@ 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')) AND otel.status_code = 'ERROR' ``` - Where `{entityGuid}` is the service's GUID. + Where `ENTITY_GUID` is the service's GUID. **Good events fields** @@ -241,12 +241,12 @@ 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') - 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. @@ -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. **Bad events fields** @@ -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. @@ -342,10 +342,10 @@ 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. **Bad events fields** @@ -353,10 +353,10 @@ The following SLIs are based on Google's Browser Core Web Vitals. ```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. **Good events fields** @@ -383,17 +383,17 @@ The following SLIs are based on Google's Browser Core Web Vitals. ```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 ``` @@ -410,10 +410,10 @@ 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. **Good events fields** @@ -421,17 +421,17 @@ The following SLIs are based on Google's Browser Core Web Vitals. ```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 ``` @@ -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: @@ -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 ``` @@ -500,10 +500,10 @@ 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. **Good events fields** @@ -511,10 +511,10 @@ The following SLIs are based on Google's Browser Core Web Vitals. ```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. @@ -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()`: