Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyadeepm04 committed Jul 12, 2024
2 parents 75bffd7 + 9304017 commit 6788c15
Show file tree
Hide file tree
Showing 245 changed files with 3,304 additions and 1,763 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[codespell]
# skipping auto generated folders
skip = ./.tox,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,.git,./opentelemetry-semantic-conventions
skip = ./.tox,./.mypy_cache,./docs/_build,./target,*/LICENSE,./venv,.git,./opentelemetry-semantic-conventions,*-requirements*.txt
ignore-words-list = ans,ue,ot,hist,ro
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: Bug Report
description: Create a report to help us improve
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please make sure to fill out the entire form below, providing as much context as you can in order to help us triage and track down your bug as quickly as possible.
Before filing a bug, please be sure you have searched through [existing bugs](https://github.com/open-telemetry/opentelemetry-python/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug) to see if your bug is already addressed.
If your bug is related to an instrumentation or plugin in [opentelemetry-python-contrib](https://github.com/open-telemetry/opentelemetry-python-contrib) please be sure to file it there.
- type: textarea
id: environment
attributes:
label: Describe your environment
description: |
Please describe any aspect of your environment relevant to the problem, including your Python version, [platform](https://docs.python.org/3/library/platform.html), version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.
value: |
OS: (e.g, Ubuntu)
Python version: (e.g., Python 3.8.10)
SDK version: (e.g., 1.25.0)
API version: (e.g., 1.25.0)
- type: textarea
attributes:
label: What happened?
description: Please provide as much detail as you reasonably can.
validations:
required: true

- type: textarea
attributes:
label: Steps to Reproduce
description: Provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). We will close the issue if the repro project you share with us is complex or we cannot reproduce the behavior you are reporting. We cannot investigate custom projects, so don't point us to such, please.
validations:
required: true

- type: textarea
attributes:
label: Expected Result
description: What did you expect to see?
validations:
required: true

- type: textarea
attributes:
label: Actual Result
description: What did you see instead?
validations:
required: true

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context about the problem here.
placeholder: Any additional information...

- type: dropdown
id: contribute
attributes:
label: Would you like to implement a fix?
description: For guidance on how to get started, refer to the [contribution guide](https://github.com/open-telemetry/opentelemetry-python/blob/main/CONTRIBUTING.md).
options:
- "No"
- "Yes"
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Slack
url: https://cloud-native.slack.com/archives/C01PD4HUVBL
about: Or the `#otel-python` channel in the CNCF Slack instance.
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Feature Request
description: Suggest an idea for this project
labels: [feature-request]
body:
- type: markdown
attributes:
value: |
Before opening a feature request against this repo, consider whether the feature should/could be implemented in the [other OpenTelemetry client libraries](https://github.com/open-telemetry/). If so, please [open an issue on opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification/issues/new) first.
- type: textarea
id: related-problem
attributes:
label: Is your feature request related to a problem?
description: Is your feature request related to a problem? If so, provide a concise description of the problem.
placeholder: Include the Issue ID from this or other repos.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: What do you want to happen instead? What is the expected behavior?
placeholder: I'd like to ...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: Which alternative solutions or features have you considered?
placeholder: Some potential solutions
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context about the feature request here.
placeholder: Some related requests in other projects or upstream spec proposals.
validations:
required: false
- type: dropdown
id: contribute
attributes:
label: Would you like to implement a fix?
description: |
For guidance on how to get started, refer to the [contribution guide](https://github.com/open-telemetry/opentelemetry-python/blob/main/CONTRIBUTING.md).
options:
- "No"
- "Yes"
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Description

<!--
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
-->

Fixes # (issue)

Expand All @@ -21,6 +23,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi

# Does This PR Require a Contrib Repo Change?

<!--
Answer the following question based on these examples of changes that would require a Contrib Repo Change:
- [The OTel specification](https://github.com/open-telemetry/opentelemetry-specification) has changed which prompted this PR to update the method interfaces of `opentelemetry-api/` or `opentelemetry-sdk/`
- The method interfaces of `test/util` have changed
Expand All @@ -33,6 +36,7 @@ Answer the following question based on these examples of changes that would requ
- Major changes to project information, such as in:
- `README.md`
- `CONTRIBUTING.md`
-->

- [ ] Yes. - Link to PR:
- [ ] No.
Expand Down
27 changes: 5 additions & 22 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,25 @@ on:
jobs:
sdk-benchmarks:
env:
py311: "3.11"
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-sdk-${{ matrix.os }}
runs-on: self-hosted
strategy:
# Ensures the entire test matrix is run, even if one permutation fails
fail-fast: false
matrix:
python-version: [py311]
os: [ubuntu-20.04, windows-2019]
steps:
- name: Checkout Core Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
- name: Set up Python ${{ env[matrix.python-version] }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env[matrix.python-version] }}
python-version: "3.12"
architecture: 'x64'
- name: Install tox
run: pip install tox
- name: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v4
with:
path: |
.tox
~/.cache/pip
key: v3-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini',
'dev-requirements.txt') }}-core
- name: Run tox
run: tox -f ${{ matrix.python-version }}-sdk -- -k opentelemetry-sdk/tests/performance/benchmarks --benchmark-json=opentelemetry-sdk/tests/output.json
run: tox -e benchmark-opentelemetry-sdk -- -k opentelemetry-sdk/benchmarks --benchmark-json=opentelemetry-sdk/output.json
- name: Report on SDK benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
name: OpenTelemetry Python SDK Benchmarks - Python ${{ env[matrix.python-version ]}} - SDK
name: OpenTelemetry Python SDK Benchmarks
tool: pytest
output-file-path: opentelemetry-sdk/tests/output.json
output-file-path: opentelemetry-sdk/output.json
gh-pages-branch: gh-pages
github-token: ${{ secrets.GITHUB_TOKEN }}
# Make a commit on `gh-pages` with benchmarks from previous step
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Lint tests

on:
push:
branches-ignore:
- 'release/*'
pull_request:

jobs:
lint-3_12:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
package:
- "opentelemetry-api"
- "opentelemetry-proto"
- "opentelemetry-sdk"
- "opentelemetry-semantic-conventions"
- "opentelemetry-getting-started"
- "opentelemetry-opentracing-shim"
- "opentelemetry-opencensus-shim"
- "opentelemetry-exporter-opencensus"
- "opentelemetry-exporter-otlp-proto-common"
- "opentelemetry-exporter-otlp-combined"
- "opentelemetry-exporter-otlp-proto-grpc"
- "opentelemetry-exporter-otlp-proto-http"
- "opentelemetry-exporter-otlp-proto-prometheus"
- "opentelemetry-exporter-otlp-proto-zipkin-combined"
- "opentelemetry-exporter-otlp-proto-zipkin-proto-http"
- "opentelemetry-exporter-otlp-proto-zipkin-json"
- "opentelemetry-propagator-b3"
- "opentelemetry-propagator-jaeger"
- "opentelemetry-test-utils"
os: [ubuntu-20.04]
runs-on: ubuntu-20.04
steps:
- name: Checkout Core 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: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v4
with:
path: |
.tox
~/.cache/pip
key: v7-build-tox-cache-${{ matrix.package }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
- name: run tox
run: tox -e lint-${{ matrix.package }}
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ jobs:
py39: 3.9
py310: "3.10"
py311: "3.11"
py312: "3.12"
pypy3: pypy-3.8
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{
matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
python-version: [py38, py39, py310, py311, pypy3]
python-version: [py38, py39, py310, py311, py312, pypy3]
package:
- "api"
- "sdk"
Expand All @@ -55,7 +56,7 @@ jobs:
- "exporter-zipkin-combined"
- "exporter-zipkin-proto-http"
- "exporter-zipkin-json"
- "protobuf"
- "proto"
- "propagator-b3"
- "propagator-jaeger"
os: [ubuntu-20.04, windows-2019]
Expand All @@ -68,6 +69,8 @@ jobs:
package: "exporter-otlp-combined"
- python-version: pypy3
package: "exporter-otlp-proto-grpc"
- python-version: pypy3
package: "getting-started"

steps:
- name: Checkout Core Repo @ SHA - ${{ github.sha }}
Expand All @@ -92,13 +95,12 @@ jobs:
if: ${{ matrix.os == 'windows-2019'}}
run: git config --system core.longpaths true
- name: run tox
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{
env.RUN_MATRIX_COMBINATION }}-benchmark.json
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra
misc:
strategy:
fail-fast: false
matrix:
tox-environment: ["docker-tests-proto3", "docker-tests-proto4", "lint", "spellcheck",
tox-environment: ["docker-tests-proto3", "docker-tests-proto4", "spellcheck",
"docs", "mypy", "mypyinstalled", "tracecontext"]
name: ${{ matrix.tox-environment }}
runs-on: ubuntu-20.04
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ docs/examples/django/db.sqlite3

# Semantic conventions
scripts/semconv/semantic-conventions

# Benchmark result files
*-benchmark.json
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ repos:
rev: 24.3.0
hooks:
- id: black
language_version: python3.11
language_version: python3.12
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
3 changes: 3 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ suggestion-mode=yes
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no

# Run python dependant checks considering the baseline version
py-version=3.8


[MESSAGES CONTROL]

Expand Down
Loading

0 comments on commit 6788c15

Please sign in to comment.