Skip to content

Update nginx instrumentation #232

Update nginx instrumentation

Update nginx instrumentation #232

Workflow file for this run

name: nginx instrumentation CI
on:
push:
branches: "*"
paths:
- 'instrumentation/nginx/**'
- '.github/workflows/nginx.yml'
pull_request:
branches: [ main ]
paths:
- 'instrumentation/nginx/**'
- '.github/workflows/nginx.yml'
jobs:
nginx-build-test:
name: nginx
runs-on: ubuntu-24.04
strategy:
matrix:
image: ["ubuntu:24.04"]
steps:
- name: checkout otel nginx
uses: actions/checkout@v4
- name: setup
run: |
sudo ./instrumentation/nginx/ci/setup_environment.sh
- name: setup buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: build express backend docker
run: |
cd instrumentation/nginx
docker build -t otel-nginx-test/express-backend \
-f test/backend/simple_express/Dockerfile \
test/backend/simple_express
- name: build nginx docker
run: |
cd instrumentation/nginx
docker build -t otel-nginx-test/nginx \
--build-arg image=${{ matrix.image }} \
-f test/Dockerfile \
.
- name: run tests
run: |
cd instrumentation/nginx/test/instrumentation
mix local.hex --force --if-missing
mix local.rebar --force --if-missing
mix deps.get
mix test
- name: copy artifacts
id: artifacts
run: |
cd instrumentation/nginx
mkdir -p /tmp/otel_ngx/
docker build -f test/Dockerfile \
--build-arg image=${{ matrix.image }} \
--target export \
--output type=local,dest=/tmp/otel_ngx .
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: otel_ngx_module-${{ matrix.image }}.so
path: /tmp/otel_ngx/otel_ngx_module.so