-
Couldn't load subscription status.
- Fork 293
CP-45235: Support for xe-cli to transmit traceparent
#5633
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
CP-45235: Support for xe-cli to transmit traceparent
#5633
Conversation
| let extras_rest = process_args extras in | ||
| (*if traceparent is set as env var update it after we process the extras.*) | ||
| Option.iter | ||
| (fun tp -> traceparent := Some tp) |
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.
The cli argument must take precedence over the environment variable, which usually takes preference over the contents of the configuration file
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.
This is what it does: it sets the values from configuration files, then overwrites them with the values from environment variables and then again with values from the cli argument. process_args calls set_keyword to achieve this.
This line is separate because it reads and process TRACEPARENT env var after it processes XE_EXTRA_ARGS.
d3d880c to
ffb24e9
Compare
24681d7 to
5aa4494
Compare
Adds the possibility of `xe` commands to pass a `traceparent`. This can be done through the following ways: - a command arg: `xe <cmd> --traceparent <traceparent>`; - a environment variable: `TRACEPARENT=<traceparent>`: - specifying `traceparent=<traceparent>` in `.xe`. Priority is given in the same order as above. This should enable creating a single trace from the `xe-cli` caller through `xapi`. Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
5aa4494 to
dab475d
Compare
|
Rebased it on master. Passes BVT+BST 199170 |
Adds the possibility of
xecommands to pass atraceparent.This can be done through the following ways:
xe <cmd> --traceparent <traceparent>(orxe <cmd> traceparent=<traceparent>);TRACEPARENT=<traceparent>:traceparent=<traceparent>in.xe.Priority is given in the same order as above.
This should enable creating a single trace from the
xe-clicaller throughxapi.