-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add APM tracing for client-go requests to the Kubernetes API (#5651)
This adds a custom APM round tripper for requests to the Kubernetes API. This can potentially be contributed to elastic/apm-agent-go as a new module. But I think it would be good to try it first in the context of the eck-operator. I structured the code in such a way to allow that if we decide it is worth contributing. Why a custom round tripper? To get a meaningful span summary that is specific to k8s. The current implementation is not perfect in this regard especially sub-resource requests are represented somewhat arbitrarily by subsections of the request path. The other thing implement here is to track requests done in the background by the client-go library to maintain the local cache. As far as I know there is no way to inject a context into the library that would enable tracing. This PR implements instead a default transaction mechanism to track those requests.
- Loading branch information
Showing
56 changed files
with
607 additions
and
355 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.