Skip to content

Commit 4f03520

Browse files
herin049aabmass
andauthored
Implement custom protoc plugin to generate OTLP JSON class definitions (#4910)
* add opentelemetry-codegen-json package * add opentelemetry-proto-json package * update project files to incorporate new packages * add 'Private :: Do Not Upload' to codegen pyproject.toml classifiers * add @json_serde decorator and update runtime utility file name * update docstring * add typechecking and linting for json codegen package * update to use 'path.as_posix()' for Windows compatability * add 'importlib.invalidate_caches()' to generate code fixture * add USERNAME=runner env var to github workflows for Windows compatability * update workflows * update tox.ini * update to use inheritence for common JSON serialization/deserialization methods * fix link in opentelemetry-proto-json README * add TODO to remove 'passenv' from tox.ini once fully upgraded to pytest 8.x.x --------- Co-authored-by: Aaron Abbott <aaronabbott@google.com>
1 parent 63fbcb8 commit 4f03520

76 files changed

Lines changed: 10141 additions & 1081 deletions

Some content is hidden

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

.github/workflows/lint_0.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,44 @@ jobs:
6969
- name: Run tests
7070
run: tox -e lint-opentelemetry-proto-gen-latest
7171

72+
lint-opentelemetry-protojson-gen-latest:
73+
name: opentelemetry-protojson-gen-latest
74+
runs-on: ubuntu-latest
75+
timeout-minutes: 30
76+
steps:
77+
- name: Checkout repo @ SHA - ${{ github.sha }}
78+
uses: actions/checkout@v4
79+
80+
- name: Set up Python 3.14
81+
uses: actions/setup-python@v5
82+
with:
83+
python-version: "3.14"
84+
85+
- name: Install tox
86+
run: pip install tox-uv
87+
88+
- name: Run tests
89+
run: tox -e lint-opentelemetry-protojson-gen-latest
90+
91+
lint-opentelemetry-codegen-json:
92+
name: opentelemetry-codegen-json
93+
runs-on: ubuntu-latest
94+
timeout-minutes: 30
95+
steps:
96+
- name: Checkout repo @ SHA - ${{ github.sha }}
97+
uses: actions/checkout@v4
98+
99+
- name: Set up Python 3.14
100+
uses: actions/setup-python@v5
101+
with:
102+
python-version: "3.14"
103+
104+
- name: Install tox
105+
run: pip install tox-uv
106+
107+
- name: Run tests
108+
run: tox -e lint-opentelemetry-codegen-json
109+
72110
lint-opentelemetry-sdk:
73111
name: opentelemetry-sdk
74112
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)