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

chore: add DRPC server implementation for network telemetry#13675

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
deansheather merged 6 commits intomainfromdean/drpc-network-telemetry-server
Jul 1, 2024

Conversation

deansheather
Copy link
Member

@deansheatherdeansheather commentedJun 26, 2024
edited
Loading

  • Adds implementation fortailnetproto.DRPCTailnetServerPostTelemetry method
    • Telemetry gets batched into groups of 1000 events, or smaller batches every 60s.
  • Adds new types totelemetry package and converter functions

TODO:

  • Write tests
  • Sending a max-sized batch of 1000 should reset the batch timer
    • Maybe we could just discard events received past 1000 to avoid this problem entirely.

@ethanndicksonGraphite App
Copy link
Member

ethanndickson commentedJun 27, 2024
edited
Loading

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@deansheather and the rest of your teammates onGraphiteGraphite

@deansheather
Copy link
MemberAuthor

Graphite messed up all the commits in my branch and now they're co-authored by Ethan... the actual commits were only written by me. When I do the merge I'll remove the co-authored by line.

ethanndickson reacted with confused emoji

@deansheatherdeansheather marked this pull request as ready for reviewJune 28, 2024 07:17
@ethanndicksonethanndicksonforce-pushed thedean/drpc-network-telemetry-server branch from937bf83 to479df1fCompareJune 28, 2024 07:23
Comment on lines 268 to 272
func (b*NetworkTelemetryBatcher)Close()error {
close(b.closed)
<-b.done
returnnil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably accept a context so it can't block forever, or move the waiting to a separateWaitUntilEmpty() or similar

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'm not going to make it accept a context, but I've added a 5s timeout and an error.

ifb.ticker!=nil {
b.ticker.Reset(b.frequency)
}
gob.batchFn(events)
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels a bit racey. We should probably have a separate channel to signal to the other goroutine that it should tick.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This isn't racey because we hold a lock. If a tick happens while we're handling messages, the pending events list will be emptied and the periodic batcher goroutine will do nothing because there are no events. If somehow we went above the batch size anyways and overflow, it'll just send two telemetry events in short succession which is acceptable. I've added a comment that the ticker reset is best effort

ethanndickson reacted with thumbs up emoji
Copy link
Member

@ethanndicksonethanndickson left a comment

Choose a reason for hiding this comment

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

LGTM

@deansheatherdeansheather merged commit6c94dd4 intomainJul 1, 2024
@deansheatherdeansheather deleted the dean/drpc-network-telemetry-server branchJuly 1, 2024 15:50
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 1, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@ethanndicksonethanndicksonethanndickson left review comments

+1 more reviewer

@coadlercoadlercoadler approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees

@deansheatherdeansheather

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@deansheather@ethanndickson@coadler

[8]ページ先頭

©2009-2025 Movatter.jp