-
Notifications
You must be signed in to change notification settings - Fork 107
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
Implement telemetry #234
Implement telemetry #234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing some tests, but generally looks good 👍
Codecov Report
@@ Coverage Diff @@
## master #234 +/- ##
============================================
+ Coverage 99.65% 99.67% +0.01%
- Complexity 1422 1481 +59
============================================
Files 235 245 +10
Lines 4088 4318 +230
============================================
+ Hits 4074 4304 +230
Misses 14 14
Continue to review full report at Codecov.
|
FROM "organization" o | ||
LEFT JOIN "organization_token" t ON t.organization_id = o.id | ||
LEFT JOIN "organization_member" m ON m.organization_id = o.id AND m.role = :role_member | ||
LEFT JOIN "organization_member" ow ON ow.organization_id = o.id AND ow.role = :role_owner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This double join can be avoided with FILTER
😎
COUNT(m.id) FILTER (WHERE m.role = :role_member) AS members,
COUNT(m.id) FILTER (WHERE m.role = :role_owner) AS owners
check this please, I'm not sure 😉
COUNT(d.id) downloads, | ||
COUNT(w.date) webhooks | ||
FROM "organization_package" p | ||
LEFT JOIN "organization_package_download" d ON d.package_id = p.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing AND d.date::date <= :till
] | ||
); | ||
|
||
if ($response->getStatusCode() >= 300) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 300
? (I thought this client dealt with redirects) Maybe 400
?
* Implement telemetry * Show telemetry documentation link
42a736d
to
5b999ee
Compare
Thanks 🍻 |
This is full PR to master, I've rebased so I could use new Proxy service