2021-09-12 19:49:24 +00:00
|
|
|
name: Elixir
|
|
|
|
|
|
|
|
on:
|
2022-11-25 21:35:36 +00:00
|
|
|
pull_request:
|
2021-09-12 19:49:24 +00:00
|
|
|
branches:
|
2023-08-25 20:11:23 +00:00
|
|
|
- "main"
|
2021-09-12 19:49:24 +00:00
|
|
|
types: [opened, reopened, synchronize, labeled]
|
2022-11-15 23:22:28 +00:00
|
|
|
|
2021-09-12 19:49:24 +00:00
|
|
|
push:
|
|
|
|
branches:
|
2023-08-25 20:11:23 +00:00
|
|
|
- "main"
|
2021-09-12 19:49:24 +00:00
|
|
|
|
2022-11-15 23:22:28 +00:00
|
|
|
concurrency:
|
2022-11-25 21:35:36 +00:00
|
|
|
group: ci-${{ github.head_ref || github.run_id }}-elixir
|
2022-11-15 23:22:28 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-09-12 19:49:24 +00:00
|
|
|
jobs:
|
2021-09-13 00:49:05 +00:00
|
|
|
test-matrix:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-13 00:49:05 +00:00
|
|
|
- name: Read file
|
|
|
|
id: set-matrix
|
|
|
|
run: |
|
2023-08-25 20:11:23 +00:00
|
|
|
matrixStringifiedObject="$(jq -c . .github/elixir-test-matrix.json)"
|
2022-11-15 23:22:28 +00:00
|
|
|
echo "matrix=$matrixStringifiedObject" >> $GITHUB_OUTPUT
|
2023-08-25 20:11:23 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-dataloader:
|
2021-10-08 21:38:18 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_dataloader'))
|
2021-10-08 21:38:18 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_dataloader"
|
2021-10-08 21:38:18 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Dataloader test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2021-10-08 21:38:18 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
services:
|
|
|
|
postgres:
|
2021-10-14 03:11:26 +00:00
|
|
|
image: circleci/postgres:13.3-ram
|
2023-08-25 20:11:23 +00:00
|
|
|
ports: ["5432:5432"]
|
2021-10-08 21:38:18 +00:00
|
|
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
|
|
env:
|
|
|
|
POSTGRES_USER: postgres
|
2021-10-14 03:11:26 +00:00
|
|
|
POSTGRES_PASSWORD: postgres
|
2023-09-05 15:38:49 +00:00
|
|
|
POSTGRES_DB: opentelemetry_dataloader_test
|
|
|
|
|
2022-12-15 00:38:18 +00:00
|
|
|
steps:
|
2023-09-05 15:38:49 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-12-15 00:38:18 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2022-12-15 00:38:18 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2023-09-05 15:38:49 +00:00
|
|
|
uses: actions/cache@v3
|
2022-12-15 00:38:18 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2022-12-15 00:38:18 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
2021-10-08 21:38:18 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-ecto:
|
2022-12-15 00:38:18 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_ecto'))
|
2022-12-15 00:38:18 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_ecto"
|
2022-12-15 00:38:18 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Ecto test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2022-12-15 00:38:18 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
2023-09-05 15:38:49 +00:00
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: circleci/postgres:13.3-ram
|
|
|
|
ports: ["5432:5432"]
|
|
|
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
|
|
env:
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_DB: opentelemetry_ecto_test
|
2021-10-08 21:38:18 +00:00
|
|
|
steps:
|
2023-09-05 15:38:49 +00:00
|
|
|
- uses: actions/checkout@v2
|
2021-10-08 21:38:18 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2021-10-08 21:38:18 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2023-11-10 04:33:23 +00:00
|
|
|
uses: actions/cache@v3
|
2021-10-08 21:38:18 +00:00
|
|
|
with:
|
|
|
|
path: |
|
2021-12-28 21:14:26 +00:00
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
2021-10-08 21:38:18 +00:00
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2021-10-08 21:38:18 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-finch:
|
2021-09-13 00:49:05 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_finch'))
|
2021-09-13 00:49:05 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_finch"
|
2021-09-12 19:49:24 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Finch test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2021-09-12 19:49:24 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2021-09-13 00:49:05 +00:00
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
2021-09-12 19:49:24 +00:00
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-12 19:49:24 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2021-09-12 19:49:24 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2021-09-12 19:49:24 +00:00
|
|
|
with:
|
|
|
|
path: |
|
2021-12-28 21:14:26 +00:00
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
2021-09-12 19:49:24 +00:00
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2021-09-12 19:49:24 +00:00
|
|
|
- name: Test
|
2022-01-04 21:39:19 +00:00
|
|
|
run: mix test
|
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-httpoison:
|
2022-01-04 21:39:19 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_httpoison'))
|
2022-01-04 21:39:19 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_httpoison"
|
2022-01-04 21:39:19 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-09-05 15:38:49 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
name: Opentelemetry HTTPoison test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2022-01-04 21:39:19 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-04 21:39:19 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2022-01-04 21:39:19 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2022-01-04 21:39:19 +00:00
|
|
|
with:
|
|
|
|
path: |
|
2022-01-05 05:34:06 +00:00
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
2022-11-09 19:27:40 +00:00
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2022-11-09 19:27:40 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
2023-03-31 15:51:27 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-nebulex:
|
2023-03-31 15:51:27 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_nebulex'))
|
2023-03-31 15:51:27 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_nebulex"
|
2023-03-31 15:51:27 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Nebulex test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2023-03-31 15:51:27 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2023-03-31 15:51:27 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2023-03-31 15:51:27 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
2022-11-09 19:27:40 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-oban:
|
2022-11-09 19:27:40 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_oban'))
|
2022-11-09 19:27:40 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_oban"
|
2022-11-09 19:27:40 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Oban test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2022-11-09 19:27:40 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
2023-09-05 15:38:49 +00:00
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: circleci/postgres:13.3-ram
|
|
|
|
ports: ["5432:5432"]
|
|
|
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
|
|
env:
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_DB: opentelemetry_oban_test
|
2022-11-09 19:27:40 +00:00
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-11-09 19:27:40 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2022-11-09 19:27:40 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2022-11-09 19:27:40 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
2022-01-04 21:39:19 +00:00
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2022-01-04 21:39:19 +00:00
|
|
|
- name: Test
|
2021-09-12 19:49:24 +00:00
|
|
|
run: mix test
|
2021-11-28 01:33:47 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-phoenix:
|
2021-11-28 01:33:47 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_phoenix'))
|
2021-11-28 01:33:47 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_phoenix"
|
2021-11-28 01:33:47 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
2023-09-05 15:38:49 +00:00
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Phoenix test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2021-11-28 01:33:47 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-28 01:33:47 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2021-11-28 01:33:47 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2021-11-28 01:33:47 +00:00
|
|
|
with:
|
|
|
|
path: |
|
2021-12-28 21:14:26 +00:00
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
2021-11-28 01:33:47 +00:00
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2021-11-28 01:33:47 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-redix:
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_redix'))
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_redix"
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Redix test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
services:
|
2023-09-05 15:38:49 +00:00
|
|
|
redis:
|
|
|
|
image: redis:alpine
|
|
|
|
ports: ["6379:6379"]
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
with:
|
|
|
|
path: |
|
2021-12-28 21:14:26 +00:00
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
Add opentelemetry integration to Oban (#6)
By default a new trace is automatically started when a job is processed
by monitoring these events:
* `[:oban, :job, :start]` — at the point a job is fetched from the database and will execute
* `[:oban, :job, :stop]` — after a job succeeds and the success is recorded in the database
* `[:oban, :job, :exception]` — after a job fails and the failure is recorded in the database
To also record a span when a job is created and to link traces together
`Oban.insert/2` has to be replaced by `OpentelemetryOban.insert/2`.
Before:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> Oban.insert()
```
After:
```elixir
%{id: 1, in_the: "business", of_doing: "business"}
|> MyApp.Business.new()
|> OpentelemetryOban.insert()
```
Co-authored-by: Tristan Sloughter <t@crashfast.com>
2021-12-08 15:41:36 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
2023-08-25 20:11:23 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-req:
|
2023-04-05 16:34:49 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_req'))
|
2023-04-05 16:34:49 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_req"
|
2023-04-05 16:34:49 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Req test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2023-04-05 16:34:49 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2023-04-05 16:34:49 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2023-04-05 16:34:49 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
2023-08-25 20:11:23 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-telemetry:
|
2022-03-23 19:02:28 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_telemetry'))
|
2022-03-23 19:02:28 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_telemetry"
|
2022-03-23 19:02:28 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
2023-09-05 15:38:49 +00:00
|
|
|
working-directory: utilities/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Telemetry test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2022-03-23 19:02:28 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-23 19:02:28 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2022-03-23 19:02:28 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2022-03-23 19:02:28 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2022-03-23 19:02:28 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
2022-08-25 18:47:59 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-process-propagator:
|
2022-08-25 18:47:59 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_process_propagator'))
|
2022-08-25 18:47:59 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_process_propagator"
|
2022-08-25 18:47:59 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
2023-09-05 15:38:49 +00:00
|
|
|
working-directory: propagators/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Process Propagator test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2022-08-25 18:47:59 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-25 18:47:59 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2022-08-25 18:47:59 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2022-08-25 18:47:59 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2022-08-25 18:47:59 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|
2023-06-04 14:23:03 +00:00
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-tesla:
|
2023-06-04 14:23:03 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'elixir') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_tesla'))
|
2023-06-04 14:23:03 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_tesla"
|
2023-06-04 14:23:03 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-09-05 15:38:49 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
name: Opentelemetry Tesla test on Elixir ${{ matrix.elixir_version }} (OTP ${{ matrix.otp_version }})
|
2023-06-04 14:23:03 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
2023-09-16 15:17:35 +00:00
|
|
|
version-type: strict
|
2023-06-04 14:23:03 +00:00
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
elixir-version: ${{ matrix.elixir_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/deps
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir_version }}-v3-${{ hashFiles('**/mix.lock') }}
|
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: mix deps.get
|
|
|
|
- name: Compile project
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2023-08-25 20:11:23 +00:00
|
|
|
if: matrix.check_formatted
|
2023-06-04 14:23:03 +00:00
|
|
|
- name: Test
|
|
|
|
run: mix test
|