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

Enhance e2e test for HotROD #5735

Closed
yurishkuro opened this issue Jul 12, 2024 · 3 comments
Closed

Enhance e2e test for HotROD #5735

yurishkuro opened this issue Jul 12, 2024 · 3 comments
Labels
area/otel docker Pull requests that update Docker code enhancement good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement

Comments

@yurishkuro
Copy link
Member

The existing CI test for HotROD scripts/hotrod-integration-test.sh only checks that the HotROD web UI is being served after running docker compose. Since OTEL Collector release v0.105 there was a change where OTLP receivers started using localhost as the default host to listen to (see #5734). This breaks visibility of Jaeger endpoints from HotROD app, but our CI tests did not fail, because scripts/hotrod-integration-test.sh doesn't actually check if the trace is successfully submitted to Jaeger.

We can do better. While we cannot simulate a click on the UI button in the test (technically, we can with a headless browser), we can still execute a request against HotROD's frontend service endpoint, which will trigger a trace generation into Jaeger. The endpoint should also return the trace ID in the response headers. Using that trace ID the test can poll Jaeger query for that trace, checking that the expected number of spans is present (retry until that number is returned or until a global timeout is reached, e.g. 5min).

@yurishkuro yurishkuro added help wanted Features that maintainers are willing to accept but do not have cycles to implement good first issue Good for beginners labels Jul 12, 2024
@dosubot dosubot bot added area/otel docker Pull requests that update Docker code enhancement labels Jul 12, 2024
@hellspawn679
Copy link
Contributor

when i run hotrod container it shows this
traces export: Post "http://localhost:4318/v1/traces": dial tcp 127.0.0.1:4318: connect: connection refused
and i ran jaeger container using this command

docker run -d --name jaeger \
  -p 16686:16686 \
  -p 4317:4317 \
  -p 4318:4318 \
  -e LOG_LEVEL=debug \
  -e COLLECTOR_OTLP_GRPC_HOST_PORT=0.0.0.0:4317 \
  -e COLLECTOR_OTLP_HTTP_HOST_PORT=0.0.0.0:4318 \
  jaegertracing/all-in-one:${JAEGER_VERSION:-latest}

@hellspawn679
Copy link
Contributor

hellspawn679 commented Jul 12, 2024

@yurishkuro I think it is trying to hit http://localhost:4318 inside the hotrod container

@yurishkuro
Copy link
Member Author

probably same issue as here #5734

yurishkuro pushed a commit that referenced this issue Jul 17, 2024
## Which problem is this PR solving?
- #5735

## Description of the changes
- added docker-compose file to test hotrod so that is can connect to
jaeger

## How was this change tested?
- 

## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: mehul gautam <mehulsharma4786@gamil.com>
Co-authored-by: mehul gautam <mehulsharma4786@gamil.com>
FlamingSaint pushed a commit to FlamingSaint/jaeger that referenced this issue Jul 20, 2024
## Which problem is this PR solving?
- jaegertracing#5735

## Description of the changes
- added docker-compose file to test hotrod so that is can connect to
jaeger

## How was this change tested?
- 

## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: mehul gautam <mehulsharma4786@gamil.com>
Co-authored-by: mehul gautam <mehulsharma4786@gamil.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/otel docker Pull requests that update Docker code enhancement good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement
Projects
None yet
Development

No branches or pull requests

2 participants