Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use string representation for Agent heartbeat ping debug log #41921

Closed
tgoodsell-tempus opened this issue May 22, 2024 · 0 comments · Fixed by #42016
Closed

Use string representation for Agent heartbeat ping debug log #41921

tgoodsell-tempus opened this issue May 22, 2024 · 0 comments · Fixed by #42016
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements

Comments

@tgoodsell-tempus
Copy link
Contributor

tgoodsell-tempus commented May 22, 2024

What would you like Teleport to do?

In the debug log generated by https://github.com/gravitational/teleport/blob/1ff524df8d433b3cf8cc5b07acde7350ad4f3a42/lib/reversetunnel/localsite.go#L775C1-L776C1:

Use the String representation instead of the standard int64 (nanoseconds) output.

What problem does this solve?

When turning on these logs and eyeballing them to see if there are latency issues between the agent(s) and the proxies, having the string representation which includes a unit and tries to choose the most appropriate unit for you, assists in the interpretation.

See: https://pkg.go.dev/time#Duration.String

Instead of:

{
addr: "245.0.27.39:49080"
caller: "reversetunnel/localsite.go:775"
component: "proxy:server"
latency: 16823061
level: "debug"
message: "Ping <- ipaddr:port"
}

It would be:

{
addr: "245.0.27.39:49080"
caller: "reversetunnel/localsite.go:775"
component: "proxy:server"
latency: "16.82ms"
level: "debug"
message: "Ping <- ipaddr:port"
}
@tgoodsell-tempus tgoodsell-tempus added the feature-request Used for new features in Teleport, improvements to current should be #enhancements label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements
Projects
None yet
1 participant