Compare commits

...

9 commits

Author SHA1 Message Date
daroche
6e138d16b0 Merge upstream into no-cmake 2025-08-05 22:38:00 +02:00
Pavel Pautov
22d6380458 Add CI workflow for Alpine Linux.
The workflow uses Nginx build system with OS provided gRPC.
2025-03-31 21:02:28 -07:00
Pavel Pautov
72d8eed53a Fix build against Nginx 1.22 (fix #85).
Some checks failed
Ubuntu build / build-module (push) Has been cancelled
2025-01-22 13:05:02 -08:00
Eugene Grebenschikov
f578402f19 Verify export via TLS (#12).
Co-authored-by: Pavel Pautov <p.pautov@f5.com>
2024-12-20 17:40:47 -08:00
Pavel Pautov
9dc4dc2803 Verify custom exporter headers support (#62). 2024-12-20 14:53:37 -08:00
Pavel Pautov
a45a594801 Support sending custom headers to export endpoint (fix #62).
The headers are configured by "header" directive in "otel_exporter" block, e.g.
    otel_exporter {
        endpoint localhost:4317;
        header X-API-Token "token value";
    }
2024-12-20 14:53:37 -08:00
Pavel Pautov
88a64bb2c3 Consolidate transport related parameters into a struct.
Also, replace leftover cast with getMainConf().
2024-12-20 14:53:37 -08:00
Pavel Pautov
f633a8eef2 Fail early if "trusted_certificate" is a directory.
Previously, the error was caused by enormous std::string allocation.
2024-12-20 14:53:37 -08:00
Eugene
c9136f2ec8
Verify custom resource attributes support (#32).
Co-authored-by: p-pautov <37922380+p-pautov@users.noreply.github.com>
2024-12-19 17:53:38 -08:00
3 changed files with 47 additions and 2 deletions

45
.github/workflows/alpine.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Alpine build
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container: alpine
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
apk add build-base openssl-dev zlib-dev pcre2-dev \
cmake git grpc-dev protobuf-dev \
python3
- name: Checkout nginx
uses: actions/checkout@v4
with:
repository: nginx/nginx
path: nginx
- name: Build nginx
working-directory: nginx
run: |
auto/configure --with-compat --with-http_ssl_module \
--with-http_v2_module --with-http_v3_module
make -j $(nproc)
- name: Build module
working-directory: nginx
run: |
NGX_OTEL_CMAKE_OPTS="-D NGX_OTEL_GRPC=package" \
auto/configure --with-compat --add-dynamic-module=..
make -j $(nproc) modules
- name: Install test dependencies
run: |
python -m venv tests-venv
tests-venv/bin/pip install -r tests/requirements.txt
- name: Run tests
run: |
tests-venv/bin/pytest tests --maxfail=10 --nginx=nginx/objs/nginx \
--module=nginx/objs/ngx_otel_module.so

View file

@ -7,7 +7,7 @@ on:
pull_request:
jobs:
build-module:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository

View file

@ -296,10 +296,10 @@ ngx_int_t setHeader(ngx_http_request_t* r, StrView name, StrView value)
return NGX_ERROR;
}
*header = {};
header->hash = hash;
header->key = toNgxStr(name);
header->lowcase_key = header->key.data;
header->next = NULL;
}
header->value = toNgxStr(value);