Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(coderd): addcoder_app usage stats#9001

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

mafredri
Copy link
Member

Updates#8658

@mafredri

This comment was marked as outdated.

@mafredrimafredriforce-pushed themafredri/feat-add-app-usage-to-template-insights branch from9bf63a4 tobefb4dcCompareAugust 9, 2023 15:19
@mtojekmtojek self-requested a reviewAugust 10, 2023 08:10
@mafredri
Copy link
MemberAuthor

mafredri commentedAug 10, 2023
edited
Loading

I've refactored the stats collection to perform rollups on short-lived requests and added full test coverage for theStatsCollector.

Default rollup window is 1 minute, we can extend it if we want to reduce rows further, but I don't think it'll be necessary.

What's left is:

  • Add tests forcoderd andwsproxy to ensure app usage produces stats (?)
  • Fix TODO aboutwsproxy auth
  • Check correctness ofdbauthz implementation

For now, the data looks like this:

SELECT*, session_ended_at- session_started_atAS session_lengthFROM workspace_app_statsORDER BY session_started_at;
iduser_idworkspace_idagent_idaccess_methodslug_or_portsession_idsession_started_atsession_ended_atrequestssession_length
245419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7pathcode-servere250b40e-537e-4d89-a45c-852f3f0ce0182023-08-10 22:03:00+002023-08-10 22:04:00+00900:01:00
255419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7pathcode-server16c08a01-6827-45ac-959b-fcd72b05c4bd2023-08-10 22:04:00+002023-08-10 22:05:00+002000:01:00
315419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7pathcode-serverfe340b03-46b6-48f8-87e6-64b5baf708b92023-08-10 22:04:09.204568+002023-08-10 22:16:20.918296+00100:12:11.713728
325419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7pathcode-server291de74a-4aee-4ee1-b02a-d8cceddd56ef2023-08-10 22:04:10.452269+002023-08-10 22:16:20.921671+00100:12:10.469402
305419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7terminal4f9c687b-f732-4c91-92ac-2cc459e6a7b22023-08-10 22:05:00+002023-08-10 22:06:00+00200:01:00
385419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7terminalbd7d51df-eb75-4642-9033-3102e8ea06652023-08-10 22:05:15.74551+002023-08-10 22:07:42.616165+00100:02:26.870655
395419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7terminal23e21c72-28de-4f12-90e7-7a23709599dd2023-08-10 22:05:23.250785+002023-08-10 22:07:46.848367+00100:02:23.597582
405419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7terminal32d92f3-07d8-4ed0-9373-d741e70cba4a2023-08-10 22:05:26.718312+002023-08-10 22:07:44.201889+00100:02:17.483577
415419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7terminal07d531c3-1d9b-4eac-b152-2b88e2c7302a2023-08-10 22:05:26.733824+002023-08-10 22:07:46.044149+00100:02:19.310325
735419d403-d7a1-4000-a9b1-3bab3c9c89936c7b8c1c-aeaa-4409-9448-2f46390938b61dacd2af-0b50-4fd4-bd99-7443e1fe06e7pathcode-server3d47059c-50d3-4afd-8976-69e836082bf02023-08-10 22:08:00+002023-08-10 22:09:00+004000:01:00

@mafredrimafredri marked this pull request as ready for reviewAugust 14, 2023 12:53
@mafredrimafredriforce-pushed themafredri/feat-add-app-usage-to-template-insights branch frome903d16 to1705138CompareAugust 14, 2023 14:02
@mafredrimafredriforce-pushed themafredri/feat-add-app-usage-to-template-insights branch fromb17b944 to6ec178bCompareAugust 14, 2023 14:43
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Note before merging: double-check for a duplicate migration!

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't think there's any newer migration on main? But yea, I will merge in main and fix if needed before merge. 👍🏻

@mafredrimafredriforce-pushed themafredri/feat-add-app-usage-to-template-insights branch froma23297b toc9272c5CompareAugust 16, 2023 11:57
@mafredrimafredri changed the titlefeat(coderd): trackcoder_app usagefeat(coderd): addcoder_app usage statsAug 16, 2023
@mafredrimafredri merged commit6fd9975 intomainAug 16, 2023
@mafredrimafredri deleted the mafredri/feat-add-app-usage-to-template-insights branchAugust 16, 2023 12:22
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 16, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@deansheatherdeansheatherdeansheather approved these changes

@mtojekmtojekAwaiting requested review from mtojek

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@mafredri@johnstcn@deansheather@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp