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 additional network telemetry stats & events#13800

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
ethanndickson merged 17 commits intomainfromethan/more-telemetry
Jul 10, 2024

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedJul 8, 2024
edited
Loading

  • SetConnectionAge to the time sincetailnet.NewConn was called.
  • SetConnectionSetup to the time betweentailnet.NewConn being called, and a connected telemetry event being sent.
  • SetP2PSetup to the time betweentailnet.NewConn and when we find out our connection is direct.
  • Send telemetry events whenever the Tailscale network map changes.
  • Send telemetry events whenever the connection type changes (DERP<->P2P).

@ethanndicksonethanndickson marked this pull request as draftJuly 8, 2024 08:35
server.telemetryStore.setNetInfo(ni)
nodeUp.setNetInfo(ni)
})
server.wireguardEngine.AddNetworkMapCallback(func(nm *netmap.NetworkMap) {
Copy link
MemberAuthor

@ethanndicksonethanndicksonJul 8, 2024
edited
Loading

Choose a reason for hiding this comment

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

We use this callback to ensure we always have the latest Tailscale node data for a given peer.

@ethanndicksonethanndickson marked this pull request as ready for reviewJuly 9, 2024 05:21

// Watch for changes in the connection type (P2P<->DERP) and send telemetry events.
func (c *Conn) watchConnChange() {
ticker := time.NewTicker(time.Millisecond * 50)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Because we have to manually check if the connection has changed like this, P2PSetup can be ~50ms off it's true value.


// nil if not connected
connSetupTime *durationpb.Duration
connectedIP *netip.Addr
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

To support coderd and agent telemetry in the future, we'll need to change this to a map of peers to nodes/IPs.

@ethanndicksonethanndickson merged commite8db21c intomainJul 10, 2024
28 checks passed
@ethanndicksonethanndickson deleted the ethan/more-telemetry branchJuly 10, 2024 04:14
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 10, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@deansheatherdeansheatherdeansheather approved these changes

@coadlercoadlerAwaiting requested review from coadler

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ethanndickson@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp