MCPcopy Index your code
hub / github.com/coder/coder / SendConnectedTelemetry

Method SendConnectedTelemetry

tailnet/conn.go:840–849  ·  view source on GitHub ↗

SendConnectedTelemetry should be called when connection to a peer with the given IP is established.

(ip netip.Addr, application string)

Source from the content-addressed store, hash-verified

838
839// SendConnectedTelemetry should be called when connection to a peer with the given IP is established.
840func (c *Conn) SendConnectedTelemetry(ip netip.Addr, application string) {
841 if c.telemetrySink == nil {
842 return
843 }
844 c.telemetryStore.markConnected(&ip, application)
845 e := c.newTelemetryEvent()
846 e.Status = proto.TelemetryEvent_CONNECTED
847 e.ConnectionSetup = durationpb.New(time.Since(c.createdAt))
848 c.sendTelemetryBackground(e)
849}
850
851func (c *Conn) SendDisconnectedTelemetry() {
852 if c.telemetrySink == nil {

Callers 2

SSHOnPortMethod · 0.80
SpeedtestMethod · 0.80

Implementers 1

fakeConnvpn/tunnel_internal_test.go

Calls 4

newTelemetryEventMethod · 0.95
markConnectedMethod · 0.80
NewMethod · 0.65

Tested by

no test coverage detected