Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d6012c8
switch first lot of services
thompson-tomo Apr 12, 2026
dd84344
set wd
thompson-tomo Apr 12, 2026
36d45e7
update include
thompson-tomo Apr 12, 2026
b35b0da
move a couple more services
thompson-tomo Apr 12, 2026
480eef6
lint
thompson-tomo Apr 12, 2026
8a0d45d
switch redis
thompson-tomo Apr 12, 2026
610a8ff
lint
thompson-tomo Apr 12, 2026
892eb56
redis fixes
thompson-tomo Apr 12, 2026
04b2ff4
more fixes
thompson-tomo Apr 12, 2026
b3dee9f
port revert
thompson-tomo Apr 12, 2026
1d3e155
revert
thompson-tomo Apr 12, 2026
7c3be4c
switch port
thompson-tomo Apr 12, 2026
1a0ec1c
standardise ports
thompson-tomo Apr 12, 2026
a81cdbe
cleanup pg test
thompson-tomo Apr 12, 2026
8923a05
migrate mysql
thompson-tomo Apr 12, 2026
8608733
add missing files
thompson-tomo Apr 12, 2026
014ae0d
migrate kafka
thompson-tomo Apr 12, 2026
f538602
update zk health check
thompson-tomo Apr 12, 2026
b0847d1
cleanup
thompson-tomo Apr 12, 2026
fa6e3af
completion
thompson-tomo Apr 12, 2026
c38cee9
more lint
thompson-tomo Apr 12, 2026
d0dd4df
more lint
thompson-tomo Apr 12, 2026
a164015
More cleanup
thompson-tomo Apr 12, 2026
723ece6
Rename Docker service step in CI workflow
thompson-tomo Apr 12, 2026
0b73d18
Simplify job name
thompson-tomo Apr 12, 2026
f69f54d
Add healthcheck to RabbitMQ service
thompson-tomo Apr 13, 2026
c12f3b3
Use HealthChecks
thompson-tomo Apr 13, 2026
cee56ca
Merge branch 'main' into simple_docker_services
thompson-tomo Apr 13, 2026
510821c
Merge branch 'main' into simple_docker_services
thompson-tomo Apr 15, 2026
fbdf76e
Merge branch 'main' into simple_docker_services
thompson-tomo Apr 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .docker/infra/kafka/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,35 @@ services:
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
healthcheck:
test:
["CMD-SHELL", "zookeeper-shell localhost:2181 ls / > /dev/null 2>&1"]
interval: 5s
timeout: 5s
retries: 5

kafka:
image: confluentinc/cp-kafka:7.9.6@sha256:9e178783dba8cf44cd8b1d260f548a587a21235921957edd4ed7aa7d060b0852
ports:
- "9092:9092"
- "29092:29092"
depends_on:
zookeeper:
condition: service_healthy
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:29092,PLAINTEXT_HOST://kafka:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
healthcheck:
test:
[
"CMD-SHELL",
"kafka-broker-api-versions --bootstrap-server localhost:29092",
]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
9 changes: 6 additions & 3 deletions .docker/infra/mysql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
services:
mysql:
image: mysql:8.0.31@sha256:3d7ae561cf6095f6aca8eb7830e1d14734227b1fb4748092f2be2cfbccf7d614
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_DATABASE=mysql
- MYSQL_ROOT_PASSWORD=root
- MYSQL_PASSWORD=mysql
- MYSQL_USER=mysql
expose:
- "3306"
ports:
- "3306:3306"
command: ["mysqld", "--default-authentication-plugin=mysql_native_password"]
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -uroot -proot"]
interval: 5s
timeout: 2s
retries: 3
9 changes: 6 additions & 3 deletions .docker/infra/postgres/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ services:
image: postgres:14.22@sha256:705a5d5b5836f3fcba0d02c4d281e6a7dd9ed2dd4078640f08a1e1e9896e097d
environment:
- POSTGRES_PASSWORD=postgres
expose:
- "5432"
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 5s
timeout: 2s
retries: 3
volumes:
- postgres_socket:/var/run/postgresql
- /var/run/postgresql:/var/run/postgresql
Comment on lines 13 to +14
Copy link
Copy Markdown
Contributor Author

@thompson-tomo thompson-tomo Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to do this but there is a socket test which requires this otherwise it would fail.

5 changes: 5 additions & 0 deletions .docker/infra/rabbitmq/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ services:
image: rabbitmq:4.2.5-alpine@sha256:53e51f8469ef13d0a1a2b03c0d36dcf4efbf13089f552440ec5620ca07f2c64e
ports:
- "5672:5672"
healthcheck:
test: ["CMD-SHELL", "rabbitmq-diagnostics -q ping"]
interval: 5s
timeout: 5s
retries: 10
14 changes: 12 additions & 2 deletions .docker/infra/redis/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
services:
redis:
image: redis:8.6.2@sha256:009cc37796fbdbe1b631b4cc0582bed167e5e403ed8bcd06f77eb6cb5aeb6f93
environment:
REDIS_PASSWORD: passw0rd
ports:
- "6379:6379"
command: ["redis-server", "--requirepass", "passw0rd"]
healthcheck:
test: ["CMD-SHELL", 'redis-cli -a "passw0rd" ping']
Comment thread
thompson-tomo marked this conversation as resolved.
interval: 10s
timeout: 5s
retries: 5
volumes:
- redis_data:/data
ports:
- "16379:6379"

volumes:
redis_data:
246 changes: 17 additions & 229 deletions .github/workflows/ci-instrumentation-with-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
- "instrumentation/ruby_kafka/**"
- "instrumentation/sidekiq/**"
- "instrumentation/trilogy/**"
- ".docker/infra/**"
- ".github/workflows/ci-instrumentation-with-services.yml"
- ".github/actions/**"
- "Rakefile"
Expand All @@ -41,11 +42,6 @@ concurrency:
cancel-in-progress: true # Cancel any previous runs of this workflow

jobs:
check:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
runs-on: ubuntu-24.04
steps:
- run: echo "Repository check passed"
instrumentation_with_services:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
strategy:
Expand All @@ -54,235 +50,32 @@ jobs:
gem:
- dalli
- mongo
os:
- ubuntu-latest
name: other / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "Test Ruby 4.0"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "4.0"
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.3"
yard: true
coverage: true
build: true
services:
memcached:
image: memcached:1.6.40-alpine@sha256:8a82a3927694e42bc52679dc81532244de51e5faed5f9541a1283e3ad7271db1
ports:
- 11211:11211
mongodb:
image: mongo:6.0.27@sha256:03cda579c8caad6573cb98c2b3d5ff5ead452a6450561129b89595b4b9c18de2
ports:
- 27017:27017

instrumentation_mysql:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
strategy:
fail-fast: false
matrix:
gem:
- bunny
- pg
- que
- redis
- resque
- sidekiq
- mysql2
- trilogy
os:
- ubuntu-latest
name: mysql / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "Test Ruby 4.0"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "4.0"
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.3"
yard: true
coverage: true
build: true
services:
mysql:
image: mysql:8.0.31@sha256:3d7ae561cf6095f6aca8eb7830e1d14734227b1fb4748092f2be2cfbccf7d614
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 -e MYSQL_DATABASE=mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_PASSWORD=mysql -e MYSQL_USER=mysql -p 3306:3306 --entrypoint sh mysql:8.0.31@sha256:3d7ae561cf6095f6aca8eb7830e1d14734227b1fb4748092f2be2cfbccf7d614 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"

instrumentation_kafka:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
strategy:
fail-fast: false
matrix:
gem:
- racecar
- rdkafka
- ruby_kafka
os:
- ubuntu-latest
name: kafka / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "Test Ruby 4.0"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "4.0"
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.3"
yard: true
coverage: true
build: true
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.9.6@sha256:d3294ad2b353ac5a155ad9abe37884f75c482f387af553679210303b7118a0d3
ports:
- 2181:2181
env:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka:7.9.6@sha256:9e178783dba8cf44cd8b1d260f548a587a21235921957edd4ed7aa7d060b0852
ports:
- 9092:9092
- 29092:29092
env:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

instrumentation_redis:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
strategy:
fail-fast: false
matrix:
gem:
- redis
- resque
- sidekiq
os:
- ubuntu-latest
name: redis / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "Test Ruby 4.0"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "4.0"
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.3"
yard: true
coverage: true
build: true
services:
redis:
image: redis:8.6.2@sha256:009cc37796fbdbe1b631b4cc0582bed167e5e403ed8bcd06f77eb6cb5aeb6f93
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli -a \"$REDIS_PASSWORD\" ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
-e REDIS_PASSWORD=passw0rd
--entrypoint sh redis:8.6.2@sha256:009cc37796fbdbe1b631b4cc0582bed167e5e403ed8bcd06f77eb6cb5aeb6f93 -c "exec redis-server --requirepass \"$REDIS_PASSWORD\""
env:
REDIS_PASSWORD: "passw0rd"

instrumentation_postgresql:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
strategy:
fail-fast: false
matrix:
gem:
- pg
- que
os:
- ubuntu-latest
name: postgresql / ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "Test Ruby 4.0"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "4.0"
- name: "Test Ruby 3.4"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.4"
- name: "Test Ruby 3.3"
uses: ./.github/actions/test_gem
with:
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
ruby: "3.3"
yard: true
coverage: true
build: true
services:
postgres:
image: postgres:14.22@sha256:705a5d5b5836f3fcba0d02c4d281e6a7dd9ed2dd4078640f08a1e1e9896e097d
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: --health-cmd="pg_isready" --health-interval=5s --health-timeout=2s --health-retries=3
volumes:
- "/var/run/postgresql:/var/run/postgresql"

instrumentation_rabbitmq:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
strategy:
fail-fast: false
matrix:
gem:
- bunny
os:
- ubuntu-latest
name: rabbitmq / ${{ matrix.gem }} / ${{ matrix.os }}
name: ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set environment variables
id: inputs
shell: bash
run: |
dir=$(find . -iname 'opentelemetry-instrumentation-${{ matrix.gem }}.gemspec' -exec dirname {} \;)
echo "gem_dir=${dir}" >> $GITHUB_OUTPUT
- name: Start Docker Service/s
run: docker compose -f test/compose.yml up -d
Comment thread
thompson-tomo marked this conversation as resolved.
Outdated
working-directory: "${{ steps.inputs.outputs.gem_dir }}"
- name: "Test Ruby 4.0"
uses: ./.github/actions/test_gem
with:
Expand All @@ -301,8 +94,3 @@ jobs:
yard: true
coverage: true
build: true
services:
rabbitmq:
image: rabbitmq:4.2.5-alpine@sha256:53e51f8469ef13d0a1a2b03c0d36dcf4efbf13089f552440ec5620ca07f2c64e
ports:
- "5672:5672"
Loading
Loading