-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
telemetrygen: Fix cmd docs examples #31254
telemetrygen: Fix cmd docs examples #31254
Conversation
1. Update example to use --otlp-header instead of -otlp-header 2. Align examples to be more consistent with quoting
"Flag may be repeated to set multiple headers (e.g -otlp-header key1=value1 -otlp-header key2=value2)") | ||
fs.Var(&c.Headers, "otlp-header", "Custom header to be passed along with each OTLP request. The value is expected in the format key=\"value\". "+ | ||
"Note you may need to escape the quotes when using the tool from a cli. "+ | ||
"Flag may be repeated to set multiple headers (e.g --otlp-header \"key1=\\\"value1\\\"\" --otlp-header \"key2=\\\"value2\\\"\")") |
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.
Maybe we can use backtick strings here? That way we can avoid the double escaping
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.
Updated the PR
- Further simplified the example by removing starting and trailing quotes, from
--otlp-header \"key1=\\\"value1\\\"\"
to--otlp-header key1=\\\"value1\\\"
- Use backtick strings so that it becomes
--otlp-header key1=\"value1\"
I don't have the permissions to change labels, but a skip changelog label seems appropriate. |
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> No functional change. Update cmd docs. 1. Update example to use --otlp-header instead of -otlp-header 2. Align examples to be more consistent with quoting **Link to tracking Issue:** <Issue number if applicable> **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.>
Description:
No functional change. Update cmd docs.
Link to tracking Issue:
Testing:
Documentation: