Skip to content

Commit

Permalink
added otel tests to the CI test-smoke
Browse files Browse the repository at this point in the history
Signed-off-by: jiaxiao zhou <[email protected]>
  • Loading branch information
Mossaka committed Jul 22, 2024
1 parent e07aef2 commit ef53564
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/action-test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
with:
name: test-img
path: dist
- name: enable OTLP
if: ${{ inputs.runtime == 'wasmtime' }}
run: |
sudo ./scripts/setup-otel.sh
- name: run
timeout-minutes: 5
run: |
Expand Down
18 changes: 18 additions & 0 deletions scripts/setup-otel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# start jeager endpoint
docker run -d -p16686:16686 -p4317:4317 -p4318:4318 -e COLLECTOR_OTLP_ENABLED=true jaegertracing/all-in-one:latest

systemctl stop containerd

mkdir -p /etc/systemd/system/containerd.service.d

# Add the environment variable to the override file
cat <<EOF > /etc/systemd/system/containerd.service.d/override.conf
[Service]
Environment="OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318"
Environment="OTEL_SERVICE_NAME=wasmtime"
EOF

systemctl daemon-reload
systemctl restart containerd

0 comments on commit ef53564

Please sign in to comment.