Skip to content

Commit

Permalink
feature/tracing-data: minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 committed Nov 13, 2023
1 parent 4804c73 commit d289e0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ As part of the LOOP plugin effort, we've added distributed tracing to the core n
One way to generate traces locally today is with the OCR2 basic smoke test.

1. navigate to `.github/tracing/` and then run `docker compose --file local-smoke-docker-compose.yaml up`
2. setup a local docker registry at `127.0.0.1:5000`
2. setup a local docker registry at `127.0.0.1:5000` (https://www.docker.com/blog/how-to-use-your-own-registry-2/)
3. run `make build_push_plugin_docker_image` in `chainlink/integration-tests/Makefile`
4. run `SELECTED_NETWORKS=SIMULATED CHAINLINK_IMAGE="127.0.0.1:5000/chainlink" CHAINLINK_VERSION="develop" go test -run TestOCRv2Basic ./smoke/ocr2_test.go`
5. navigate to `localhost:3000/explore` in a web browser to query for traces
Expand All @@ -25,7 +25,7 @@ Another way to generate traces is by enabling traces for PRs. This will instrume
3. Navigate to `Integration Tests / ETH Smoke Tests ocr2-plugins (pull_request)` details
4. Navigate to the summary of the integration tests
5. After the test completes, the generated trace data will be saved as an artifact, currently called `trace-data`
6. Download this artifact to this directory
6. Download the artifact to this directory (`chainlink/.github/tracing`)
7. `docker compose --file local-smoke-docker-compose.yaml up`
8. Run `sh replay.sh` to replay those traces to the otel-collector container that was spun up in the last step.
9. navigate to `localhost:3000/explore` in a web browser to query for traces
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ jobs:
if: false
run: |
echo "VOLUME_PATH=$(docker volume inspect --format '{{ .Mountpoint }}' otel-traces)" >> $GITHUB_OUTPUT
- name: Show Grafana Logs
- name: Show Otel-Collector Logs
if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins'
run: |
docker logs otel-collector
Expand Down Expand Up @@ -431,7 +431,7 @@ jobs:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
- name: Show Grafana Logs
- name: Show Otel-Collector Logs
if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins'
run: |
docker logs otel-collector
Expand All @@ -445,15 +445,10 @@ jobs:
this-job-name: ETH Smoke Tests ${{ matrix.product.name }}${{ matrix.product.tag_suffix }}
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
continue-on-error: true
- name: Wait for OTEL-Collector to flush buffered traces
if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins'
run: |
sleep 60
- name: Permissions on traces
if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins'
run: |
ls -l ./integration-tests/smoke/traces
# chmod -R 777 ./integration-tests/smoke/traces
- name: Upload Trace Data
if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins'
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit d289e0d

Please sign in to comment.