fastotel 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fastotel-0.1.0/.github/workflows/ci.yml +45 -0
- fastotel-0.1.0/.github/workflows/release.yml +69 -0
- fastotel-0.1.0/.github/workflows/wheels.yml +62 -0
- fastotel-0.1.0/.gitignore +14 -0
- fastotel-0.1.0/CHANGELOG.md +21 -0
- fastotel-0.1.0/Cargo.lock +132 -0
- fastotel-0.1.0/Cargo.toml +15 -0
- fastotel-0.1.0/LICENSE +21 -0
- fastotel-0.1.0/Makefile +42 -0
- fastotel-0.1.0/PKG-INFO +76 -0
- fastotel-0.1.0/README.md +45 -0
- fastotel-0.1.0/pyproject.toml +71 -0
- fastotel-0.1.0/python/fastotel/__init__.py +10 -0
- fastotel-0.1.0/python/fastotel/_fastotel.pyi +1 -0
- fastotel-0.1.0/python/fastotel/py.typed +0 -0
- fastotel-0.1.0/scripts/version.py +107 -0
- fastotel-0.1.0/src/lib.rs +5 -0
- fastotel-0.1.0/tests/test_import.py +21 -0
- fastotel-0.1.0/uv.lock +404 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
version:
|
|
10
|
+
# A pull request into master is a release once merged, so it must carry a new version
|
|
11
|
+
if: github.event_name == 'pull_request'
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v5
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0 # the base branch and the tags
|
|
17
|
+
- uses: astral-sh/setup-uv@v6
|
|
18
|
+
- run: uv run --no-project python scripts/version.py check "origin/${{ github.base_ref }}"
|
|
19
|
+
|
|
20
|
+
lint:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v5
|
|
24
|
+
- uses: astral-sh/setup-uv@v6
|
|
25
|
+
- run: uv sync --locked
|
|
26
|
+
- run: make lint
|
|
27
|
+
|
|
28
|
+
test:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v5
|
|
36
|
+
- uses: astral-sh/setup-uv@v6
|
|
37
|
+
with:
|
|
38
|
+
python-version: ${{ matrix.python-version }}
|
|
39
|
+
- run: uv sync --locked
|
|
40
|
+
- run: uv run pytest
|
|
41
|
+
|
|
42
|
+
wheels:
|
|
43
|
+
# Release builds the same wheels; a pull request finds out first
|
|
44
|
+
if: github.event_name == 'pull_request'
|
|
45
|
+
uses: ./.github/workflows/wheels.yml
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Every push to master releases the version in pyproject.toml. The version job of CI makes sure a pull
|
|
4
|
+
# request bumps it; a change that reaches master without a bump fails here. See scripts/version.py.
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [master]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: release
|
|
11
|
+
cancel-in-progress: false
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
version:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
outputs:
|
|
17
|
+
version: ${{ steps.version.outputs.version }}
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v5
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0 # the tags tell which versions are released
|
|
22
|
+
- uses: astral-sh/setup-uv@v6
|
|
23
|
+
- id: version
|
|
24
|
+
name: Check that the version is not released yet
|
|
25
|
+
run: |
|
|
26
|
+
version=$(uv run --no-project python scripts/version.py unreleased)
|
|
27
|
+
echo "version=${version}" >> "$GITHUB_OUTPUT"
|
|
28
|
+
|
|
29
|
+
build:
|
|
30
|
+
needs: version
|
|
31
|
+
uses: ./.github/workflows/wheels.yml
|
|
32
|
+
|
|
33
|
+
publish:
|
|
34
|
+
needs: [version, build]
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
environment:
|
|
37
|
+
name: pypi
|
|
38
|
+
url: https://pypi.org/project/fastotel/
|
|
39
|
+
permissions:
|
|
40
|
+
id-token: write # PyPI Trusted Publishing
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/download-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
pattern: wheels-*
|
|
45
|
+
merge-multiple: true
|
|
46
|
+
path: dist/
|
|
47
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
48
|
+
|
|
49
|
+
tag:
|
|
50
|
+
needs: [version, publish]
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
permissions:
|
|
53
|
+
contents: write
|
|
54
|
+
env:
|
|
55
|
+
VERSION: ${{ needs.version.outputs.version }}
|
|
56
|
+
GH_TOKEN: ${{ github.token }}
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@v5
|
|
59
|
+
- uses: astral-sh/setup-uv@v6
|
|
60
|
+
- name: Tag the release
|
|
61
|
+
run: |
|
|
62
|
+
git config user.name "github-actions[bot]"
|
|
63
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
64
|
+
git tag -a "v${VERSION}" -m "fastotel ${VERSION}"
|
|
65
|
+
git push origin "v${VERSION}"
|
|
66
|
+
- name: Publish the release notes from CHANGELOG.md
|
|
67
|
+
run: |
|
|
68
|
+
uv run --no-project python scripts/version.py notes > notes.md
|
|
69
|
+
gh release create "v${VERSION}" --verify-tag --title "fastotel ${VERSION}" --notes-file notes.md
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Wheels
|
|
2
|
+
|
|
3
|
+
# Builds the sdist and a wheel per platform, then runs the tests against each wheel on the oldest and the newest
|
|
4
|
+
# supported Python. CI calls it on every pull request so a release never meets a broken build first; Release
|
|
5
|
+
# calls it to get what it publishes.
|
|
6
|
+
on:
|
|
7
|
+
workflow_call:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
wheels:
|
|
11
|
+
name: ${{ matrix.platform.name }}
|
|
12
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
platform:
|
|
17
|
+
- { name: linux-x86_64, runner: ubuntu-latest, target: x86_64, manylinux: auto, test: true }
|
|
18
|
+
- { name: linux-aarch64, runner: ubuntu-24.04-arm, target: aarch64, manylinux: auto, test: true }
|
|
19
|
+
- { name: musllinux-x86_64, runner: ubuntu-latest, target: x86_64, manylinux: musllinux_1_2, test: false }
|
|
20
|
+
- { name: musllinux-aarch64, runner: ubuntu-24.04-arm, target: aarch64, manylinux: musllinux_1_2, test: false }
|
|
21
|
+
- { name: macos-x86_64, runner: macos-15-intel, target: x86_64, test: true }
|
|
22
|
+
- { name: macos-arm64, runner: macos-latest, target: aarch64, test: true }
|
|
23
|
+
- { name: windows-x64, runner: windows-latest, target: x64, test: true }
|
|
24
|
+
- { name: windows-arm64, runner: windows-11-arm, target: aarch64, test: true }
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v5
|
|
27
|
+
- uses: actions/setup-python@v6
|
|
28
|
+
if: runner.os != 'Linux'
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.11"
|
|
31
|
+
- uses: PyO3/maturin-action@v1
|
|
32
|
+
with:
|
|
33
|
+
target: ${{ matrix.platform.target }}
|
|
34
|
+
manylinux: ${{ matrix.platform.manylinux }}
|
|
35
|
+
args: --release --locked --out dist
|
|
36
|
+
- uses: astral-sh/setup-uv@v6
|
|
37
|
+
if: matrix.platform.test
|
|
38
|
+
- name: Test the wheel
|
|
39
|
+
if: matrix.platform.test
|
|
40
|
+
shell: bash
|
|
41
|
+
run: |
|
|
42
|
+
for python in 3.11 3.14; do
|
|
43
|
+
uv run --isolated --no-project --python "$python" --with pytest --with dist/*.whl \
|
|
44
|
+
pytest -p no:cacheprovider tests
|
|
45
|
+
done
|
|
46
|
+
- uses: actions/upload-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: wheels-${{ matrix.platform.name }}
|
|
49
|
+
path: dist/
|
|
50
|
+
|
|
51
|
+
sdist:
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v5
|
|
55
|
+
- uses: PyO3/maturin-action@v1
|
|
56
|
+
with:
|
|
57
|
+
command: sdist
|
|
58
|
+
args: --out dist
|
|
59
|
+
- uses: actions/upload-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: wheels-sdist
|
|
62
|
+
path: dist/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
5
|
+
and the project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-10-09
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- The package skeleton: a PyO3 extension module built with maturin, `fastotel.__version__`, type stubs and
|
|
14
|
+
`py.typed`. Nothing replaces the OpenTelemetry SDK yet; see #1 for the plan.
|
|
15
|
+
- `abi3` wheels for CPython 3.11 and newer on Linux (manylinux and musllinux, x86_64 and aarch64), macOS
|
|
16
|
+
(x86_64 and arm64) and Windows (x64 and arm64), plus the sdist.
|
|
17
|
+
- Releases: every version that reaches `master` is published to PyPI through Trusted Publishing, tagged and
|
|
18
|
+
given release notes from this file.
|
|
19
|
+
|
|
20
|
+
[Unreleased]: https://github.com/troyan-dy/fastotel/compare/v0.1.0...HEAD
|
|
21
|
+
[0.1.0]: https://github.com/troyan-dy/fastotel/releases/tag/v0.1.0
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "fastotel"
|
|
7
|
+
version = "0.0.0"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"pyo3",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
[[package]]
|
|
13
|
+
name = "heck"
|
|
14
|
+
version = "0.5.0"
|
|
15
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
16
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
17
|
+
|
|
18
|
+
[[package]]
|
|
19
|
+
name = "libc"
|
|
20
|
+
version = "0.2.190"
|
|
21
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
22
|
+
checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
|
|
23
|
+
|
|
24
|
+
[[package]]
|
|
25
|
+
name = "once_cell"
|
|
26
|
+
version = "1.21.4"
|
|
27
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
28
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
29
|
+
|
|
30
|
+
[[package]]
|
|
31
|
+
name = "portable-atomic"
|
|
32
|
+
version = "1.15.0"
|
|
33
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
34
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
35
|
+
|
|
36
|
+
[[package]]
|
|
37
|
+
name = "proc-macro2"
|
|
38
|
+
version = "1.0.107"
|
|
39
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
40
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
41
|
+
dependencies = [
|
|
42
|
+
"unicode-ident",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[[package]]
|
|
46
|
+
name = "pyo3"
|
|
47
|
+
version = "0.29.3"
|
|
48
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
49
|
+
checksum = "700d18fa267b73b9b521fd7e13580e2f446916f176cacee1ab63fcc8191f1655"
|
|
50
|
+
dependencies = [
|
|
51
|
+
"libc",
|
|
52
|
+
"once_cell",
|
|
53
|
+
"portable-atomic",
|
|
54
|
+
"pyo3-build-config",
|
|
55
|
+
"pyo3-ffi",
|
|
56
|
+
"pyo3-macros",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[[package]]
|
|
60
|
+
name = "pyo3-build-config"
|
|
61
|
+
version = "0.29.3"
|
|
62
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
63
|
+
checksum = "7b3fc0c4d08f6bb10e71fe39dfb9e2f59c6eb6854e22ec8092f50c69a4499adb"
|
|
64
|
+
dependencies = [
|
|
65
|
+
"target-lexicon",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
[[package]]
|
|
69
|
+
name = "pyo3-ffi"
|
|
70
|
+
version = "0.29.3"
|
|
71
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
72
|
+
checksum = "dfc0b8e19df29aad7086cf977bb0c2a2f143e30567eb113e9cf72b62ca698330"
|
|
73
|
+
dependencies = [
|
|
74
|
+
"libc",
|
|
75
|
+
"pyo3-build-config",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
[[package]]
|
|
79
|
+
name = "pyo3-macros"
|
|
80
|
+
version = "0.29.3"
|
|
81
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
82
|
+
checksum = "6100e8a4b5eba53afaa5ed078364851a0b2499c553a44c31026b929049b49dc6"
|
|
83
|
+
dependencies = [
|
|
84
|
+
"proc-macro2",
|
|
85
|
+
"pyo3-macros-backend",
|
|
86
|
+
"quote",
|
|
87
|
+
"syn",
|
|
88
|
+
]
|
|
89
|
+
|
|
90
|
+
[[package]]
|
|
91
|
+
name = "pyo3-macros-backend"
|
|
92
|
+
version = "0.29.3"
|
|
93
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
94
|
+
checksum = "6143877a16e82b5a727b7127ff4cd86858a24a28d745d72f43e6f227c7b1bdb3"
|
|
95
|
+
dependencies = [
|
|
96
|
+
"heck",
|
|
97
|
+
"proc-macro2",
|
|
98
|
+
"quote",
|
|
99
|
+
"syn",
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
[[package]]
|
|
103
|
+
name = "quote"
|
|
104
|
+
version = "1.0.47"
|
|
105
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
106
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
107
|
+
dependencies = [
|
|
108
|
+
"proc-macro2",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[[package]]
|
|
112
|
+
name = "syn"
|
|
113
|
+
version = "2.0.119"
|
|
114
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
115
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
116
|
+
dependencies = [
|
|
117
|
+
"proc-macro2",
|
|
118
|
+
"quote",
|
|
119
|
+
"unicode-ident",
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
[[package]]
|
|
123
|
+
name = "target-lexicon"
|
|
124
|
+
version = "0.13.5"
|
|
125
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
127
|
+
|
|
128
|
+
[[package]]
|
|
129
|
+
name = "unicode-ident"
|
|
130
|
+
version = "1.0.26"
|
|
131
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
132
|
+
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "fastotel"
|
|
3
|
+
# The package version lives in pyproject.toml; this crate is not published on its own
|
|
4
|
+
version = "0.0.0"
|
|
5
|
+
edition = "2024"
|
|
6
|
+
publish = false
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
|
|
9
|
+
[lib]
|
|
10
|
+
name = "_fastotel"
|
|
11
|
+
crate-type = ["cdylib"]
|
|
12
|
+
|
|
13
|
+
[dependencies]
|
|
14
|
+
# One wheel per platform for every CPython from 3.11 on, through the stable ABI
|
|
15
|
+
pyo3 = { version = "0.29", features = ["abi3-py311"] }
|
fastotel-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dmitriy Troyan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
fastotel-0.1.0/Makefile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.DEFAULT_GOAL := help
|
|
2
|
+
|
|
3
|
+
PY_VERSIONS := 3.11 3.12 3.13 3.14
|
|
4
|
+
# The build script of PyO3 checks the interpreter against abi3-py311; the system python3 may be older
|
|
5
|
+
export PYO3_PYTHON ?= $(CURDIR)/.venv/bin/python
|
|
6
|
+
|
|
7
|
+
.PHONY: help
|
|
8
|
+
help: ## Show available targets
|
|
9
|
+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
10
|
+
|
|
11
|
+
.PHONY: install
|
|
12
|
+
install: ## Build the extension and install it with the dev dependencies
|
|
13
|
+
uv sync --locked
|
|
14
|
+
|
|
15
|
+
.PHONY: lint
|
|
16
|
+
lint: ## Run ruff, mypy, cargo fmt and clippy
|
|
17
|
+
uv run ruff check .
|
|
18
|
+
uv run ruff format --check .
|
|
19
|
+
uv run mypy
|
|
20
|
+
cargo fmt --check
|
|
21
|
+
cargo clippy --locked --all-targets -- -D warnings
|
|
22
|
+
|
|
23
|
+
.PHONY: format
|
|
24
|
+
format: ## Autofix lint issues and format the code
|
|
25
|
+
uv run ruff check --fix .
|
|
26
|
+
uv run ruff format .
|
|
27
|
+
cargo fmt
|
|
28
|
+
|
|
29
|
+
.PHONY: test
|
|
30
|
+
test: ## Run tests
|
|
31
|
+
uv run pytest
|
|
32
|
+
|
|
33
|
+
.PHONY: test-all
|
|
34
|
+
test-all: ## Run tests on every supported Python version
|
|
35
|
+
@for v in $(PY_VERSIONS); do \
|
|
36
|
+
echo "==> Python $$v"; \
|
|
37
|
+
uv run --isolated --python $$v pytest || exit 1; \
|
|
38
|
+
done
|
|
39
|
+
|
|
40
|
+
.PHONY: check-version
|
|
41
|
+
check-version: ## Check that the version is bumped against origin/master, as CI does on a pull request
|
|
42
|
+
uv run --no-project python scripts/version.py check origin/master
|
fastotel-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fastotel
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: Operating System :: MacOS
|
|
7
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
8
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
16
|
+
Classifier: Programming Language :: Rust
|
|
17
|
+
Classifier: Topic :: System :: Monitoring
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Summary: A Rust-backed drop-in for the OpenTelemetry Python SDK that takes tracing overhead off the request path
|
|
21
|
+
Keywords: opentelemetry,otel,otlp,tracing,observability,rust,pyo3
|
|
22
|
+
Author: Dmitriy Troyan
|
|
23
|
+
License-Expression: MIT
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
26
|
+
Project-URL: Changelog, https://github.com/troyan-dy/fastotel/blob/master/CHANGELOG.md
|
|
27
|
+
Project-URL: Homepage, https://github.com/troyan-dy/fastotel
|
|
28
|
+
Project-URL: Issues, https://github.com/troyan-dy/fastotel/issues
|
|
29
|
+
Project-URL: Repository, https://github.com/troyan-dy/fastotel
|
|
30
|
+
|
|
31
|
+
# fastotel
|
|
32
|
+
|
|
33
|
+
[](https://pypi.org/project/fastotel/)
|
|
34
|
+
[](https://pypi.org/project/fastotel/)
|
|
35
|
+
[](https://github.com/troyan-dy/fastotel/actions/workflows/ci.yml)
|
|
36
|
+
[](https://github.com/troyan-dy/fastotel/blob/master/LICENSE)
|
|
37
|
+
|
|
38
|
+
A Rust-backed drop-in for the OpenTelemetry Python SDK that takes tracing overhead off the request path.
|
|
39
|
+
|
|
40
|
+
> **Status: pre-alpha.** The package is a skeleton: it installs and imports, and nothing replaces the SDK yet.
|
|
41
|
+
> The plan is in [#1](https://github.com/troyan-dy/fastotel/issues/1).
|
|
42
|
+
|
|
43
|
+
## Why
|
|
44
|
+
|
|
45
|
+
Instrumentation packages (FastAPI, httpx, SQLAlchemy, aiokafka, …) depend only on `opentelemetry-api`.
|
|
46
|
+
fastotel replaces parts of `opentelemetry-sdk` behind that API, so existing instrumentation keeps working.
|
|
47
|
+
|
|
48
|
+
In the pure-Python SDK, the `BatchSpanProcessor` worker thread encodes OTLP protobuf, gzips and sends spans
|
|
49
|
+
while holding the GIL, so it competes for CPU with request handling. In Rust, batching, encoding, compression
|
|
50
|
+
and export run on a thread that never takes the GIL.
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install fastotel
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Wheels are built for CPython 3.11 and newer on Linux (glibc and musl), macOS and Windows, x86_64 and arm64.
|
|
59
|
+
|
|
60
|
+
## Development
|
|
61
|
+
|
|
62
|
+
Needs [uv](https://docs.astral.sh/uv/) and a Rust toolchain ([rustup](https://rustup.rs/)).
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
make install # build the extension, install the dev dependencies
|
|
66
|
+
make test # run the tests
|
|
67
|
+
make lint # ruff, mypy, cargo fmt, clippy
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Every change that reaches `master` is a release: a pull request bumps the version in `pyproject.toml`
|
|
71
|
+
(`uv version --bump patch`) and adds its section to `CHANGELOG.md`.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
[MIT](https://github.com/troyan-dy/fastotel/blob/master/LICENSE)
|
|
76
|
+
|
fastotel-0.1.0/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# fastotel
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/fastotel/)
|
|
4
|
+
[](https://pypi.org/project/fastotel/)
|
|
5
|
+
[](https://github.com/troyan-dy/fastotel/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/troyan-dy/fastotel/blob/master/LICENSE)
|
|
7
|
+
|
|
8
|
+
A Rust-backed drop-in for the OpenTelemetry Python SDK that takes tracing overhead off the request path.
|
|
9
|
+
|
|
10
|
+
> **Status: pre-alpha.** The package is a skeleton: it installs and imports, and nothing replaces the SDK yet.
|
|
11
|
+
> The plan is in [#1](https://github.com/troyan-dy/fastotel/issues/1).
|
|
12
|
+
|
|
13
|
+
## Why
|
|
14
|
+
|
|
15
|
+
Instrumentation packages (FastAPI, httpx, SQLAlchemy, aiokafka, …) depend only on `opentelemetry-api`.
|
|
16
|
+
fastotel replaces parts of `opentelemetry-sdk` behind that API, so existing instrumentation keeps working.
|
|
17
|
+
|
|
18
|
+
In the pure-Python SDK, the `BatchSpanProcessor` worker thread encodes OTLP protobuf, gzips and sends spans
|
|
19
|
+
while holding the GIL, so it competes for CPU with request handling. In Rust, batching, encoding, compression
|
|
20
|
+
and export run on a thread that never takes the GIL.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install fastotel
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Wheels are built for CPython 3.11 and newer on Linux (glibc and musl), macOS and Windows, x86_64 and arm64.
|
|
29
|
+
|
|
30
|
+
## Development
|
|
31
|
+
|
|
32
|
+
Needs [uv](https://docs.astral.sh/uv/) and a Rust toolchain ([rustup](https://rustup.rs/)).
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
make install # build the extension, install the dev dependencies
|
|
36
|
+
make test # run the tests
|
|
37
|
+
make lint # ruff, mypy, cargo fmt, clippy
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Every change that reaches `master` is a release: a pull request bumps the version in `pyproject.toml`
|
|
41
|
+
(`uv version --bump patch`) and adds its section to `CHANGELOG.md`.
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
[MIT](https://github.com/troyan-dy/fastotel/blob/master/LICENSE)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "fastotel"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A Rust-backed drop-in for the OpenTelemetry Python SDK that takes tracing overhead off the request path"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
authors = [{ name = "Dmitriy Troyan" }]
|
|
9
|
+
requires-python = ">=3.11"
|
|
10
|
+
dependencies = []
|
|
11
|
+
keywords = ["opentelemetry", "otel", "otlp", "tracing", "observability", "rust", "pyo3"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Operating System :: MacOS",
|
|
16
|
+
"Operating System :: Microsoft :: Windows",
|
|
17
|
+
"Operating System :: POSIX :: Linux",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Programming Language :: Python :: 3.14",
|
|
24
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
25
|
+
"Programming Language :: Rust",
|
|
26
|
+
"Topic :: System :: Monitoring",
|
|
27
|
+
"Typing :: Typed",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://github.com/troyan-dy/fastotel"
|
|
32
|
+
Repository = "https://github.com/troyan-dy/fastotel"
|
|
33
|
+
Issues = "https://github.com/troyan-dy/fastotel/issues"
|
|
34
|
+
Changelog = "https://github.com/troyan-dy/fastotel/blob/master/CHANGELOG.md"
|
|
35
|
+
|
|
36
|
+
[dependency-groups]
|
|
37
|
+
dev = [
|
|
38
|
+
"maturin>=1.15,<2",
|
|
39
|
+
"mypy>=1.13",
|
|
40
|
+
"pytest>=8.3",
|
|
41
|
+
"ruff>=0.8",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[build-system]
|
|
45
|
+
requires = ["maturin>=1.15,<2"]
|
|
46
|
+
build-backend = "maturin"
|
|
47
|
+
|
|
48
|
+
[tool.maturin]
|
|
49
|
+
python-source = "python"
|
|
50
|
+
module-name = "fastotel._fastotel"
|
|
51
|
+
# The agent instructions stay out of the sdist
|
|
52
|
+
exclude = [{ path = "CLAUDE.md", format = "sdist" }, { path = "docs/agents/**/*", format = "sdist" }]
|
|
53
|
+
|
|
54
|
+
[tool.uv]
|
|
55
|
+
# uv rebuilds the extension when the Rust sources change, not only the Python metadata
|
|
56
|
+
cache-keys = [{ file = "pyproject.toml" }, { file = "Cargo.toml" }, { file = "Cargo.lock" }, { file = "src/**/*.rs" }]
|
|
57
|
+
|
|
58
|
+
[tool.ruff]
|
|
59
|
+
line-length = 120
|
|
60
|
+
target-version = "py311"
|
|
61
|
+
|
|
62
|
+
[tool.ruff.lint]
|
|
63
|
+
select = ["E", "W", "F", "I", "N", "B", "A", "UP", "S", "RUF"]
|
|
64
|
+
ignore = ["S101"]
|
|
65
|
+
|
|
66
|
+
[tool.mypy]
|
|
67
|
+
files = ["python", "tests", "scripts"]
|
|
68
|
+
strict = true
|
|
69
|
+
|
|
70
|
+
[tool.pytest.ini_options]
|
|
71
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# The native module built from src/lib.rs
|
|
File without changes
|