mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 20:59:58 +00:00
TUN-4811: Publish quick tunnels' hostname in /metrics under userHostname
for backwards-compatibility
This commit is contained in:
@@ -111,6 +111,13 @@ func (o *Observer) sendConnectedEvent(connIndex uint8, location string) {
|
||||
|
||||
func (o *Observer) sendURL(url string) {
|
||||
o.sendEvent(Event{EventType: SetURL, URL: url})
|
||||
|
||||
if !strings.HasPrefix(url, "https://") {
|
||||
// We add https:// in the prefix for backwards compatibility as we used to do that with the old free tunnels
|
||||
// and some tools (like `wrangler tail`) are regexp-ing for that specifically.
|
||||
url = "https://" + url
|
||||
}
|
||||
o.metrics.userHostnamesCounts.WithLabelValues(url).Inc()
|
||||
}
|
||||
|
||||
func (o *Observer) SendReconnect(connIndex uint8) {
|
||||
|
Reference in New Issue
Block a user