| 76 | } |
| 77 | |
| 78 | func (o *Observer) SendURL(url string) { |
| 79 | o.sendEvent(Event{EventType: SetURL, URL: url}) |
| 80 | |
| 81 | if !strings.HasPrefix(url, "https://") { |
| 82 | // We add https:// in the prefix for backwards compatibility as we used to do that with the old free tunnels |
| 83 | // and some tools (like `wrangler tail`) are regexp-ing for that specifically. |
| 84 | url = "https://" + url |
| 85 | } |
| 86 | o.metrics.userHostnamesCounts.WithLabelValues(url).Inc() |
| 87 | } |
| 88 | |
| 89 | func (o *Observer) SendReconnect(connIndex uint8) { |
| 90 | o.sendEvent(Event{Index: connIndex, EventType: Reconnecting}) |