Skip to content
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

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

carsonip
Copy link
Contributor

Description:

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:

Testing:

Documentation:

1. Update example to use --otlp-header instead of -otlp-header
2. Align examples to be more consistent with quoting
Copy link

linux-foundation-easycla bot commented Feb 14, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the cmd/telemetrygen telemetrygen command label Feb 14, 2024
@github-actions github-actions bot requested review from codeboten and mx-psi February 14, 2024 12:25
@carsonip carsonip marked this pull request as ready for review February 14, 2024 12:27
@carsonip carsonip requested a review from a team February 14, 2024 12:27
"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\\\"\")")
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR

  1. Further simplified the example by removing starting and trailing quotes, from --otlp-header \"key1=\\\"value1\\\"\" to --otlp-header key1=\\\"value1\\\"
  2. Use backtick strings so that it becomes --otlp-header key1=\"value1\"

@carsonip
Copy link
Contributor Author

I don't have the permissions to change labels, but a skip changelog label seems appropriate.

@mx-psi mx-psi added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Feb 14, 2024
@codeboten codeboten added this pull request to the merge queue Feb 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 14, 2024
@codeboten codeboten added this pull request to the merge queue Feb 14, 2024
@TylerHelmuth TylerHelmuth removed this pull request from the merge queue due to a manual request Feb 14, 2024
@TylerHelmuth TylerHelmuth merged commit cb80270 into open-telemetry:main Feb 14, 2024
146 of 147 checks passed
@github-actions github-actions bot added this to the next release milestone Feb 14, 2024
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
**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.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/telemetrygen telemetrygen command Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants