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: change agent to use v2 API for reporting stats#12024

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
spikecurtis merged 1 commit intomainfromspike/10534-report-stats
Feb 7, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedFeb 6, 2024
edited
Loading

Modifies the agent to use the v2 API to report its statistics, using thestatsReporter subcomponent.

@spikecurtisspikecurtis marked this pull request as ready for reviewFebruary 6, 2024 10:21
@spikecurtisspikecurtisforce-pushed thespike/10534-report-stats branch 2 times, most recently from3ac9064 to204c103CompareFebruary 6, 2024 10:25
if req.Stats != nil {
f.statsCh <- req.Stats
}
return &agentproto.UpdateStatsResponse{ReportInterval: durationpb.New(statsInterval)}, nil
Copy link
Member

Choose a reason for hiding this comment

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

Does it mean that tests are time dependent on realstatsInterval? If so, it is possible to refactor them to useclock?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

yes, they are, and yes, it's possible. But, I think that's outside the scope of this PR. I've just copied the hardcoded value from before into aconst.

mtojek reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Oh, I assumed that it would be a low-hanging fruit to refactor, but I'm good with leaving for further.

Comment on lines -180 to +181
ok,s.ConnectionCount,s.RxBytes,s.TxBytes,s.SessionCountVSCode,s.ConnectionMedianLatencyMS)
ok,s.ConnectionCount,s.RxBytes,s.TxBytes,s.SessionCountVscode,s.ConnectionMedianLatencyMs)
Copy link
Member

Choose a reason for hiding this comment

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

VSCode vs Vscode
PTY vs Pty

are these renamed on purpose?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The SDK type fields were written by humans, the proto type fields are machine translated from lowercase_with_underscores so it doesn't get capitalization correct in all cases. Unfortunate from a style perspective, but I haven't chased down how to fix it yet.

mtojek reacted with thumbs up emoji
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

LGTM

@spikecurtisspikecurtis merged commit1cf4b62 intomainFeb 7, 2024
@spikecurtisspikecurtis deleted the spike/10534-report-stats branchFebruary 7, 2024 11:26
@spikecurtisGraphite App
Copy link
ContributorAuthor

Merge activity

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 7, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@spikecurtis@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp