Amzani / asyncapi-metrics-dashboard

1 stars 1 forks source link

Metrics readiness #2

Closed Amzani closed 6 months ago

Amzani commented 6 months ago

Related to #1

Amzani commented 6 months ago

/progress 10

Checking the metrics we collect

Amzani commented 6 months ago

/progress 15

We have Number of created AsyncAPI files and AsyncAPI 3.0x Adoption

In NewRelic

AsyncAPI 3.0x Adoption

SELECT count(1) FROM Metric WHERE metricName = 'asyncapi_adoption.action.finished' AND action = 'validate' AND  asyncapi_version = '3.0.0' SINCE last week

Number of created AsyncAPI files

SELECT count(1) FROM Metric WHERE metricName = 'asyncapi_adoption.action.finished' AND action = 'new' SINCE last week
Amzani commented 6 months ago

/progress 20

SELECT count(1) doesn't work as expected.

SELECT sum(asyncapi_adoption.action.finished) as 'Asyncapi V3 adoption'
FROM Metric 
WHERE action = 'validate' 
AND  asyncapi_version = '3.0.0'
SELECT sum(asyncapi_adoption.action.finished) as 'Created AsyncAPI files'
FROM Metric 
WHERE action = 'new:file'

Dashboard: https://onenr.io/0Vwga07k8jJ

Amzani commented 6 months ago

/progress 25

For Time to first API Design we expect to add two metadata in newRelic Metric table :

e.g

SELECT filter(latest(endTimestamp), WHERE action = 'generate:fromTemplate' AND source is not null AND success = true)/1000 - filter(latest(endTimestamp), WHERE action = 'new:file' AND source is not null AND success = true)/1000 AS 'TS'
FROM Metric FACET source, user

Then compute averages, median...

Amzani commented 6 months ago

/progress 100

System errors

SELECT sum(asyncapi_adoption.action.finished) as 'System errors'
FROM Metric
WHERE success = false

Validation errors

SELECT sum(asyncapi_adoption.action.finished) as 'Validation Errors'
FROM Metric
WHERE action = 'validate'
AND validation_result='invalid'

Time to fix a validation error

SELECT filter(latest(endTimestamp), WHERE action = 'validate' AND validation_result ='valid' AND source is not null AND success = true)/1000 - filter(latest(endTimestamp), WHERE action = 'validate' AND validation_result ='invalid' AND source is not null AND success = true)/1000 AS 'TS'
FROM Metric FACET source, user

Then compute averages, median...

peter-rr commented 6 months ago
SELECT sum(asyncapi_adoption.action.finished) as 'Created AsyncAPI files'
FROM Metric 
WHERE action = 'new:file'

@Amzani I've realised about these improvements about Number of created AsyncAPI files: