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

docs: Add HTTP port to collector docker command #5441

Merged
merged 7 commits into from
Nov 13, 2024
Merged

Conversation

kaylareopelle
Copy link
Contributor

The docker run command includes a port for GRPC. If someone is using an HTTP OTLP exporter along with the collector, this command will not work out of the box.

This commit adds the HTTP port to the docker run command.

Discovered by @wsmoak in a discussion on: open-telemetry/opentelemetry-ruby#1525 (comment)

The docker run command includes a port for GRPC. If someone is using an HTTP OTLP exporter along with the collector, this command will not work out of the box. 

This commit adds the HTTP port to the docker run command.
@kaylareopelle kaylareopelle requested a review from a team as a code owner October 18, 2024 22:53
@opentelemetrybot opentelemetrybot requested a review from a team October 18, 2024 22:54
@opentelemetrybot opentelemetrybot requested review from mx-psi and removed request for a team October 18, 2024 22:54
Copy link
Contributor

@tiffany76 tiffany76 left a comment

Choose a reason for hiding this comment

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

LGTM. @open-telemetry/collector-approvers, PTAL. Thanks.

@@ -61,7 +61,8 @@ preferred shell.

```sh
docker run \
-p 127.0.0.1:4317:4317 \
-p 127.0.0.1:4317:4317 \ # for gRPC
Copy link
Contributor

Choose a reason for hiding this comment

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

i think the comment here will cause problems

Copy link
Contributor

Choose a reason for hiding this comment

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

$ docker run \
     -p 127.0.0.1:4317:4317 \ # for gRPC
     -p 127.0.0.1:4318:4318 \ # for HTTP
     -p 127.0.0.1:55679:55679 \
     otel/opentelemetry-collector-contrib
docker: invalid reference format.
See 'docker run --help'.
zsh: command not found: -p
zsh: command not found: -p

Copy link
Contributor

Choose a reason for hiding this comment

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

tried in bash as well to make sure

bash-3.2$ docker run \ -p 127.0.0.1:4317:4317 \ # for gRPC -p 127.0.0.1:4318:4318 \ # for HTTP -p 127.0.0.1:55679:55679 \ otel/opentelemetry-collector-contrib
docker: invalid reference format.
See 'docker run --help'.

Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

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

Thanks for this addition @kaylareopelle.

@codeboten, right, I'm not surprised that we can't have comments after end of line continuation characters.

All: this being a quick start, I'd suggest just dropping the port-use comments.

@codeboten
Copy link
Contributor

All: this being a quick start, I'd suggest just dropping the port-use comments.

Or even just above the docker run command:

```sh
   # 4317 for gRPC, 4318 for HTTP, 55679 for...
   docker run \
     -p 127.0.0.1:4317:4317 \

@opentelemetrybot opentelemetrybot requested a review from a team October 21, 2024 22:12
@kaylareopelle
Copy link
Contributor Author

All: this being a quick start, I'd suggest just dropping the port-use comments.

Or even just above the docker run command:

```sh
   # 4317 for gRPC, 4318 for HTTP, 55679 for...
   docker run \
     -p 127.0.0.1:4317:4317 \

Great point, @codeboten! My bad for not testing the snippet with the comments before opening this PR.

I updated the docs to place the comment at the top in 0b0a0d4. However, I'm also open to removing it entirely.

Please take another look when you have a chance!

@@ -60,8 +60,10 @@ preferred shell.
3. Launch the Collector:

```sh
# 4317 for gRPC, 4318 for HTTP, 55679 for ZPages
Copy link
Contributor

Choose a reason for hiding this comment

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

I still feel it better to just drop the comment, but will let other @open-telemetry/docs-approvers chime in. If we keep it, let's be clear that this comment is referring to port numbers.

Copy link
Member

Choose a reason for hiding this comment

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

Can we move that comment into the text above, like "Launch the Collector, listening on ports 4317 (for OTLP grPC), 4318 (for OTLP HTTP) and 55679 (for ZPages):"

Copy link
Contributor Author

@kaylareopelle kaylareopelle Nov 5, 2024

Choose a reason for hiding this comment

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

Either way works for me! I updated the PR to use the text @svrnm suggested in: c9d08a4

@kaylareopelle
Copy link
Contributor Author

I don't really understand what the Files / FILE FORMAT (pull_request) check is looking for. What needs to be changed to get it to pass?

@tiffany76
Copy link
Contributor

/fix:format

@opentelemetrybot
Copy link
Collaborator

You triggered fix:format action run at https://github.com/open-telemetry/opentelemetry.io/actions/runs/11694711177

@opentelemetrybot
Copy link
Collaborator

fix:format was successful.

IMPORTANT: (RE-)RUN /fix:all to ensure that there are no remaining check issues.

@tiffany76
Copy link
Contributor

Hi @kaylareopelle. The file formatting check flagged the line length: our linter looks for 80 characters per line. I've fixed it with a GitHub action. You should be all set now.

@kaylareopelle
Copy link
Contributor Author

@chalin - Could you take another look? Since you requested changes, I need your approval before we can move forward.

Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

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

Thanks for the ping.
LGTM ✨

@chalin chalin merged commit 5f5b9cd into main Nov 13, 2024
19 checks passed
@chalin chalin deleted the docker-run-4318 branch November 13, 2024 10:40
drewby pushed a commit to drewby/opentelemetry.io that referenced this pull request Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants