Skip to content

Commit

Permalink
Add Initial Support for Instrumenting OpenAI Python Library - Chat Co…
Browse files Browse the repository at this point in the history
…mpletion Create (#2759)
  • Loading branch information
karthikscale3 authored Oct 22, 2024
1 parent cef28d6 commit beed0aa
Show file tree
Hide file tree
Showing 23 changed files with 1,617 additions and 130 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ env:

jobs:

lint-instrumentation-openai-v2:
name: instrumentation-openai-v2
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e lint-instrumentation-openai-v2

lint-resource-detector-container:
name: resource-detector-container
runs-on: ubuntu-latest
Expand Down
216 changes: 108 additions & 108 deletions .github/workflows/test_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,114 @@ env:

jobs:

py38-test-instrumentation-openai-v2_ubuntu-latest:
name: instrumentation-openai-v2 3.8 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py38-test-instrumentation-openai-v2 -- -ra

py39-test-instrumentation-openai-v2_ubuntu-latest:
name: instrumentation-openai-v2 3.9 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py39-test-instrumentation-openai-v2 -- -ra

py310-test-instrumentation-openai-v2_ubuntu-latest:
name: instrumentation-openai-v2 3.10 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py310-test-instrumentation-openai-v2 -- -ra

py311-test-instrumentation-openai-v2_ubuntu-latest:
name: instrumentation-openai-v2 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py311-test-instrumentation-openai-v2 -- -ra

py312-test-instrumentation-openai-v2_ubuntu-latest:
name: instrumentation-openai-v2 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-openai-v2 -- -ra

pypy3-test-instrumentation-openai-v2_ubuntu-latest:
name: instrumentation-openai-v2 pypy-3.8 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python pypy-3.8
uses: actions/setup-python@v5
with:
python-version: "pypy-3.8"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e pypy3-test-instrumentation-openai-v2 -- -ra

py38-test-resource-detector-container_ubuntu-latest:
name: resource-detector-container 3.8 Ubuntu
runs-on: ubuntu-latest
Expand Down Expand Up @@ -4407,111 +4515,3 @@ jobs:

- name: Run tests
run: tox -e py311-test-instrumentation-pymemcache-2 -- -ra

py311-test-instrumentation-pymemcache-3_ubuntu-latest:
name: instrumentation-pymemcache-3 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py311-test-instrumentation-pymemcache-3 -- -ra

py311-test-instrumentation-pymemcache-4_ubuntu-latest:
name: instrumentation-pymemcache-4 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py311-test-instrumentation-pymemcache-4 -- -ra

py312-test-instrumentation-pymemcache-0_ubuntu-latest:
name: instrumentation-pymemcache-0 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-pymemcache-0 -- -ra

py312-test-instrumentation-pymemcache-1_ubuntu-latest:
name: instrumentation-pymemcache-1 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-pymemcache-1 -- -ra

py312-test-instrumentation-pymemcache-2_ubuntu-latest:
name: instrumentation-pymemcache-2 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-pymemcache-2 -- -ra

py312-test-instrumentation-pymemcache-3_ubuntu-latest:
name: instrumentation-pymemcache-3 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-pymemcache-3 -- -ra
108 changes: 108 additions & 0 deletions .github/workflows/test_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,114 @@ env:

jobs:

py311-test-instrumentation-pymemcache-3_ubuntu-latest:
name: instrumentation-pymemcache-3 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py311-test-instrumentation-pymemcache-3 -- -ra

py311-test-instrumentation-pymemcache-4_ubuntu-latest:
name: instrumentation-pymemcache-4 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py311-test-instrumentation-pymemcache-4 -- -ra

py312-test-instrumentation-pymemcache-0_ubuntu-latest:
name: instrumentation-pymemcache-0 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-pymemcache-0 -- -ra

py312-test-instrumentation-pymemcache-1_ubuntu-latest:
name: instrumentation-pymemcache-1 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-pymemcache-1 -- -ra

py312-test-instrumentation-pymemcache-2_ubuntu-latest:
name: instrumentation-pymemcache-2 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-pymemcache-2 -- -ra

py312-test-instrumentation-pymemcache-3_ubuntu-latest:
name: instrumentation-pymemcache-3 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox

- name: Run tests
run: tox -e py312-test-instrumentation-pymemcache-3 -- -ra

py312-test-instrumentation-pymemcache-4_ubuntu-latest:
name: instrumentation-pymemcache-4 3.12 Ubuntu
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit beed0aa

Please sign in to comment.