Skip to content

Commit 55afd67

Browse files
authored
Merge branch 'main' into patch-1
2 parents f51f661 + 565e78d commit 55afd67

File tree

190 files changed

+3966
-1040
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+3966
-1040
lines changed

.github/component_owners.yml

+6
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,9 @@ components:
6767

6868
instrumentation/opentelemetry-instrumentation-cassandra:
6969
- mattcontinisio
70+
71+
instrumentation/opentelemetry-instrumentation-asyncio:
72+
- bourbonkk
73+
74+
instrumentation/opentelemetry-instrumentation-psycopg:
75+
- federicobond
+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Contrib Repo Tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'release/*'
7+
pull_request:
8+
env:
9+
CORE_REPO_SHA: a1253585f66d63e7c05a19f070f3bfe0ab6460c1
10+
11+
jobs:
12+
instrumentations-0:
13+
env:
14+
# We use these variables to convert between tox and GHA version literals
15+
py38: 3.8
16+
py39: 3.9
17+
py310: "3.10"
18+
py311: "3.11"
19+
pypy3: pypy-3.8
20+
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
24+
matrix:
25+
python-version: [py38, py39, py310, py311, pypy3]
26+
package:
27+
# Do not add more instrumentations here, add them in instrumentations_1.yml.
28+
# The reason for this separation of instrumentations into more than one YAML file is
29+
# the limit of jobs that can be run from a Github actions matrix:
30+
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
31+
# "A matrix will generate a maximum of 256 jobs per workflow run. This limit applies
32+
# to both GitHub-hosted and self-hosted runners."
33+
- "aiohttp-client"
34+
- "aiohttp-server"
35+
- "aiopg"
36+
- "aio-pika"
37+
- "asgi"
38+
- "asyncpg"
39+
- "aws-lambda"
40+
- "boto"
41+
- "boto3sqs"
42+
- "botocore"
43+
- "cassandra"
44+
- "celery"
45+
- "confluent-kafka"
46+
- "dbapi"
47+
- "django"
48+
- "elasticsearch"
49+
- "falcon"
50+
- "fastapi"
51+
- "flask"
52+
- "grpc"
53+
- "httpx"
54+
- "jinja2"
55+
- "kafka-python"
56+
- "logging"
57+
- "mysql"
58+
- "mysqlclient"
59+
- "sio-pika"
60+
- "psycopg2"
61+
- "pymemcache"
62+
- "pymongo"
63+
- "pymysql"
64+
- "pyramid"
65+
- "redis"
66+
- "remoulade"
67+
- "requests"
68+
- "sklearn"
69+
- "sqlalchemy"
70+
- "sqlite3"
71+
- "starlette"
72+
- "system-metrics"
73+
- "tornado"
74+
- "tortoiseorm"
75+
os: [ubuntu-20.04]
76+
exclude:
77+
- python-version: py39
78+
package: "sklearn"
79+
- python-version: py310
80+
package: "sklearn"
81+
- python-version: py311
82+
package: "sklearn"
83+
- python-version: pypy3
84+
package: "aiopg"
85+
- python-version: pypy3
86+
package: "asyncpg"
87+
- python-version: pypy3
88+
package: "boto"
89+
- python-version: pypy3
90+
package: "boto3sqs"
91+
- python-version: pypy3
92+
package: "botocore"
93+
- python-version: pypy3
94+
package: "psycopg2"
95+
- python-version: pypy3
96+
package: "remoulade"
97+
- python-version: pypy3
98+
package: "requests"
99+
- python-version: pypy3
100+
package: "sklearn"
101+
- python-version: pypy3
102+
package: "confluent-kafka"
103+
- python-version: pypy3
104+
package: "grpc"
105+
steps:
106+
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
107+
uses: actions/checkout@v2
108+
- name: Set up Python ${{ env[matrix.python-version] }}
109+
uses: actions/setup-python@v4
110+
with:
111+
python-version: ${{ env[matrix.python-version] }}
112+
- name: Install tox
113+
run: pip install tox
114+
- name: Cache tox environment
115+
# Preserves .tox directory between runs for faster installs
116+
uses: actions/cache@v1
117+
with:
118+
path: |
119+
.tox
120+
~/.cache/pip
121+
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
122+
- name: run tox
123+
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Contrib Repo Tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'release/*'
7+
pull_request:
8+
env:
9+
CORE_REPO_SHA: a1253585f66d63e7c05a19f070f3bfe0ab6460c1
10+
11+
jobs:
12+
instrumentations-1:
13+
env:
14+
# We use these variables to convert between tox and GHA version literals
15+
py38: 3.8
16+
py39: 3.9
17+
py310: "3.10"
18+
py311: "3.11"
19+
pypy3: pypy-3.8
20+
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
24+
matrix:
25+
python-version: [py38, py39, py310, py311, pypy3]
26+
package:
27+
- "urllib"
28+
- "urllib3v"
29+
- "wsgi"
30+
- "distro"
31+
- "richconsole"
32+
- "psycopg"
33+
- "prometheus-remote-write"
34+
- "sdkextension-aws"
35+
- "propagator-aws-xray"
36+
- "propagator-ot-trace"
37+
- "resource-detector-container"
38+
os: [ubuntu-20.04]
39+
exclude:
40+
- python-version: py311
41+
package: "prometheus-remote-write"
42+
- python-version: pypy3
43+
package: "prometheus-remote-write"
44+
steps:
45+
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
46+
uses: actions/checkout@v2
47+
- name: Set up Python ${{ env[matrix.python-version] }}
48+
uses: actions/setup-python@v4
49+
with:
50+
python-version: ${{ env[matrix.python-version] }}
51+
- name: Install tox
52+
run: pip install tox
53+
- name: Cache tox environment
54+
# Preserves .tox directory between runs for faster installs
55+
uses: actions/cache@v1
56+
with:
57+
path: |
58+
.tox
59+
~/.cache/pip
60+
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
61+
- name: run tox
62+
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json

.github/workflows/prepare-patch-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
python-version: 3.9
5656
- name: Install tox
57-
run: pip install tox==3.27.1
57+
run: pip install tox
5858
- name: run tox
5959
run: tox -e generate
6060

.github/workflows/prepare-release-branch.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
with:
8282
python-version: 3.9
8383
- name: Install tox
84-
run: pip install tox==3.27.1
84+
run: pip install tox
8585
- name: run tox
8686
run: tox -e generate
8787

@@ -165,7 +165,7 @@ jobs:
165165
with:
166166
python-version: 3.9
167167
- name: Install tox
168-
run: pip install tox==3.27.1
168+
run: pip install tox
169169
- name: run tox
170170
run: tox -e generate
171171

.github/workflows/release.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ jobs:
4545
4646
echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV
4747
48-
# check out main branch to verify there won't be problems with merging the change log
49-
# at the end of this workflow
50-
- uses: actions/checkout@v3
51-
with:
52-
ref: main
53-
5448
- run: |
5549
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
5650
# not making a patch release
@@ -60,13 +54,19 @@ jobs:
6054
fi
6155
fi
6256
57+
# check out main branch to verify there won't be problems with merging the change log
58+
# at the end of this workflow
59+
- uses: actions/checkout@v3
60+
with:
61+
ref: main
62+
6363
# back to the release branch
6464
- uses: actions/checkout@v3
6565

6666
# next few steps publish to pypi
6767
- uses: actions/setup-python@v1
6868
with:
69-
python-version: '3.7'
69+
python-version: '3.8'
7070

7171
- name: Build wheels
7272
run: ./scripts/build.sh
@@ -202,4 +202,4 @@ jobs:
202202
gh pr create --title "$message" \
203203
--body "$body" \
204204
--head $branch \
205-
--base main
205+
--base main

.github/workflows/test.yml

+2-85
Original file line numberDiff line numberDiff line change
@@ -6,92 +6,9 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 84c0e4f38d4fcdb8c13fd3988469fbb8cda28150
9+
CORE_REPO_SHA: a1253585f66d63e7c05a19f070f3bfe0ab6460c1
1010

1111
jobs:
12-
build:
13-
env:
14-
# We use these variables to convert between tox and GHA version literals
15-
py37: 3.7
16-
py38: 3.8
17-
py39: 3.9
18-
py310: "3.10"
19-
py311: "3.11"
20-
pypy3: "pypy3.7"
21-
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
22-
runs-on: ${{ matrix.os }}
23-
strategy:
24-
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
25-
matrix:
26-
python-version: [ py37, py38, py39, py310, py311, pypy3 ]
27-
package: ["instrumentation", "distro", "exporter", "sdkextension", "propagator", "resource"]
28-
os: [ ubuntu-20.04 ]
29-
steps:
30-
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
31-
uses: actions/checkout@v2
32-
- name: Set up Python ${{ env[matrix.python-version] }}
33-
uses: actions/setup-python@v4
34-
with:
35-
python-version: ${{ env[matrix.python-version] }}
36-
- name: Install tox
37-
run: pip install tox==3.27.1 tox-factor
38-
- name: Cache tox environment
39-
# Preserves .tox directory between runs for faster installs
40-
uses: actions/cache@v1
41-
with:
42-
path: |
43-
.tox
44-
~/.cache/pip
45-
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
46-
- name: run tox
47-
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
48-
# - name: Find and merge ${{ matrix.package }} benchmarks
49-
# # TODO: Add at least one benchmark to every package type to remove this (#249)
50-
# if: matrix.package == 'sdkextension' || matrix.package == 'propagator'
51-
# run: >-
52-
# mkdir -p benchmarks;
53-
# jq -s '.[0].benchmarks = ([.[].benchmarks] | add)
54-
# | if .[0].benchmarks == null then null else .[0] end'
55-
# **/**/tests/*${{ matrix.package }}*-benchmark.json > benchmarks/output_${{ matrix.package }}.json
56-
# - name: Upload all benchmarks under same key as an artifact
57-
# if: ${{ success() }}
58-
# uses: actions/upload-artifact@v2
59-
# with:
60-
# name: benchmarks
61-
# path: benchmarks/output_${{ matrix.package }}.json
62-
# combine-benchmarks:
63-
# runs-on: ubuntu-latest
64-
# needs: build
65-
# if: ${{ always() }}
66-
# name: Combine benchmarks from previous build job
67-
# steps:
68-
# - name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
69-
# uses: actions/checkout@v2
70-
# - name: Download all benchmarks as artifact using key
71-
# uses: actions/download-artifact@v2
72-
# with:
73-
# name: benchmarks
74-
# path: benchmarks
75-
# - name: Find and merge all benchmarks
76-
# run: >-
77-
# jq -s '.[0].benchmarks = ([.[].benchmarks] | add)
78-
# | if .[0].benchmarks == null then null else .[0] end'
79-
# benchmarks/output_*.json > output.json;
80-
# - name: Report on benchmark results
81-
# uses: benchmark-action/github-action-benchmark@v1
82-
# with:
83-
# name: OpenTelemetry Python Benchmarks - Python ${{ env[matrix.python-version ]}} - ${{ matrix.package }}
84-
# tool: pytest
85-
# output-file-path: output.json
86-
# github-token: ${{ secrets.GITHUB_TOKEN }}
87-
# max-items-in-chart: 100
88-
# # Alert with a commit comment on possible performance regression
89-
# alert-threshold: 200%
90-
# fail-on-alert: true
91-
# # Make a commit on `gh-pages` with benchmarks from previous step
92-
# auto-push: ${{ github.ref == 'refs/heads/main' }}
93-
# gh-pages-branch: gh-pages
94-
# benchmark-data-dir-path: benchmarks
9512
misc:
9613
strategy:
9714
fail-fast: false
@@ -107,7 +24,7 @@ jobs:
10724
with:
10825
python-version: "3.10"
10926
- name: Install tox
110-
run: pip install tox==3.27.1
27+
run: pip install tox
11128
- name: Install libsnappy-dev
11229
if: ${{ matrix.tox-environment == 'lint' }}
11330
run: sudo apt-get install -y libsnappy-dev

0 commit comments

Comments
 (0)