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
Add tsh kubectl
support for tracer exporter
#26708
Conversation
51d310c
to
1d9ba30
Compare
This PR adds support for `--trace` exporter when running `tsh kubectl`. It allows any user to automatically export traces from `tsh`.
1d9ba30
to
301b601
Compare
tool/tsh/kubectl.go
Outdated
shutdownCtx, cancel := context.WithTimeout(cf.Context, 1*time.Second) | ||
defer cancel() | ||
err := provider.Shutdown(shutdownCtx) | ||
if err != nil && !strings.Contains(err.Error(), context.DeadlineExceeded.Error()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use errors.Is here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
@tigrato may I backport this to v13? I want to backport my other PR but seems to depend on this. This PR doesn't seem to be "risky" either. |
This PR adds support for
--trace
exporter when runningtsh kubectl
.It allows any user to automatically export traces from
tsh
.Usage:
tsh --trace --trace-exporter=dir kubectl get pods