Forked from danielmciotti/new_relic_live_coding_board.txt
Created
May 14, 2021 17:33
-
-
Save rcoproc/f8630261b43a4dad0382a66f62ed8eb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## GAE | |
From GcpAppEngineServiceSample SELECT latest(flex.cpu.Utilization), latest(flex.cpu.ReservedCores) WHERE entityName LIKE 'integration-auth.%' | |
From GcpAppEngineServiceSample SELECT latest(system.memory.UsageBytes), latest(system.Instances) WHERE entityName LIKE 'integration-auth.%' | |
From GcpAppEngineServiceSample SELECT latest(system.memory.UsageBytes / 1e9), latest(system.Instances) WHERE entityName LIKE 'integration-auth.%'/B | |
## Transactions | |
From transaction select count(****) where appName = 'Integration Auth (Production)' | |
from transaction select count(*) where appName = 'Integration Auth (Production)' timeseries | |
from transaction select count(*) where appName = 'Integration Auth (Production)' timeseries compare with 1 week ago | |
from transaction select count(*) where appname = 'Integration Auth (Production)' timeseries facet request.method | |
ADD ANOTHER QUERY | |
from transaction select count(*) where appName = 'Integration Auth (Production)' timeseries | |
FROM Transaction SELECT count(*) WHERE appName = 'Integration Auth (Production)' TIMESERIES Facet cases(WHERE request.headers.userAgent LIKE 'Mozilla%' AS 'rapoza de fogo', WHERE request.headers.userAgent LIKE 'Ruby%' AS 'RUBIIIIIII', WHERE (request.headers.userAgent NOT LIKE 'Mozilla%' OR request.headers.userAgent LIKE 'Ruby%') AS 'Rapa') | |
FROM Transaction SELECT count(*) WHERE appName = 'Integration Auth (Production)' TIMESERIES FACET name | |
FROM Transaction SELECT count(*) WHERE appName = 'Integration Auth (Production)' TIMESERIES FACET cases(WHERE name LIKE '%show' AS 'Show', WHERE name LIKE '%accesses' AS 'accesses', WHERE name lIKE '%refresh_token' AS 'single refresh', WHERE name liKe '%refresh_tokens' AS 'All refresh', WHERE name LIKE '%index' as 'Index') | |
FROM Transaction SELECT count(*) WHERE appName = 'Integration Auth (Production)' TIMESERIES FACET cases(where name like '%ifood%' as 'ifood', WHERE name like '%bringg%' as 'mcDonalds', WHERE name like '%uber%' as 'uber v1 E v2', WHERE name like '%rappi%' as 'rappi v1 e v2', WHERE name like '%meli%' as 'Meli', where name like '%zap%' as 'zap') | |
## Duration | |
from transaction select average(duration) where appName = 'Integration Auth (Production)' | |
from transaction select percentile(duration, 99) where appName = 'Integration Auth (Production)' | |
from transaction select percentile(duration, 50, 95, 99) where appName = 'Integration Auth (Production)' | |
from transaction select histogram(duration, width: 1) where appName = 'Integration Auth (Production)' | |
from transaction select histogram(duration, width: 1) where appName = 'Integration Auth (Production)' since 1 day ago Facet hourOf(timestamp) | |
Comentario sobre heatmap mostrar fluxo constante de hits na aplicação | |
## Errors | |
FROM TransactionError SELECT count(*) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' | |
FROM TransactionError SELECT count(*) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' TIMESERIES | |
FROM TransactionError SELECT count(*) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' FACET request.uri TIMESERIES | |
FROM TransactionError SELECT count(*) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' FACET transactionName TIMESERIES | |
FROM TransactionError SELECT count(*) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' FACET request.method TIMESERIES | |
FROM TransactionError SELECT count(*) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' FACET error.class TIMESERIES | |
FROM TransactionError SELECT count(*) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' FACET error.class | |
FROM TransactionError SELECT histogram(duration) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' | |
FROM TransactionError SELECT histogram(log10(duration)) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' | |
FROM TransactionError SELECT max(duration) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' | |
FROM TransactionError SELECT histogram(databaseDuration, width: 1) SINcE 1 week ago WHERE appName = 'Integration Auth (Production)' | |
## Misc | |
FROM Transaction SELECT (count(*) * sum(duration * externalCallCount) - sum(duration) * sum(externalCallCount)) / ( sqrt(count(*) * sum(pow(duration,2)) - pow(sum(duration),2)) * sqrt(count(*) * sum(pow(externalCallCount,2)) - pow(sum(externalCallCount),2))) AS 'Coeficiente de Pearson' WHERE appName = 'Integration Auth (Production)' TIMESERIES siNcE 1 week ago | |
FROM Transaction SELECT (count(*) * sum(duration * externalCallCount) - sum(duration) * sum(externalCallCount)) / ( sqrt(count(*) * sum(pow(duration,2)) - pow(sum(duration),2)) * sqrt(count(*) * sum(pow(externalCallCount,2)) - pow(sum(externalCallCount),2))) AS 'Coeficiente de Pearson' WHERE appName = 'Integration Auth (Production)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment