-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Modifies the default behavior of `otel-cli exec` so that command-line arguments to the child process are modified to inject the traceparent anywhere `{{traceparent}}` appears in them. This makes patterns like this work: ```shell export TRACEPARENT=00-5b28ee2bf1f1796cca65bef26fb90c35-9d699b596c3dced3-01 ./otel-cli exec --endpoint localhost:4317 -- curl --verbose -H 'traceparent: {{traceparent}}' https://github.com ``` This can be disabled with a new extra argument: `otel-cli exec --tp-disable-inject`. ## Squashed Commits * add support to template traceparent into exec command args ``` $ go build && TRACEPARENT=00-5b28ee2bf1f1796cca65bef26fb90c35-9d699b596c3dced3-01 ./otel-cli exec --endpoint localhost:4317 -- curl --verbose -H 'traceparent: {{tr aceparent}}' http://tobert.org * Trying 45.33.3.11:80... * Connected to tobert.org (45.33.3.11) port 80 (#0) > GET / HTTP/1.1 > Host: tobert.org > User-Agent: curl/7.81.0 > Accept: */* > traceparent: 00-5b28ee2bf1f1796cca65bef26fb90c35-433d7e8620e9ccea-01 ``` * update CHANGELOG.md * add an example of injecting traceparent into exec args * add a test for exec tp injection * remove unneeded regular expression on cmd output * add --tp-disable-inject to otel-cli exec along with tests * group injection tests in a suite Not a big deal, but makes a touch more sense.
- Loading branch information
Showing
5 changed files
with
98 additions
and
24 deletions.
There are no files selected for viewing
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
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