Compare commits
669 Commits
Author | SHA1 | Date |
---|---|---|
|
109173fec7 | |
|
b63ca133be | |
|
1f78c8acff | |
|
49fa53131d | |
|
333fc5dcb4 | |
|
80c357bb16 | |
|
3c4d18cc13 | |
|
b74633a552 | |
|
b1c2c7941b | |
|
b69ebb7224 | |
|
6977da3893 | |
|
ca079cbc56 | |
|
40d8942bf5 | |
|
78300e9642 | |
|
c4347e027c | |
|
0a03c9abf2 | |
|
85dbfe520a | |
|
b27225273b | |
|
591051f8bb | |
|
50cdeeee12 | |
|
04f8899252 | |
|
59cc34e9f3 | |
|
b7301823a0 | |
|
4a21b3974b | |
|
85ea8f382d | |
|
8f7bab5337 | |
|
ccf9cabeee | |
|
701d65b022 | |
|
b9a78e7475 | |
|
77325aa89a | |
|
6d8becf9ad | |
|
6c89a56da5 | |
|
3e0632cb31 | |
|
7bd0895d01 | |
|
a912c9e57c | |
|
75c73d1e29 | |
|
a164d37a3c | |
|
e2ba6d43c0 | |
|
4e42ed674a | |
|
72f437c456 | |
|
93353660f6 | |
|
1953d97958 | |
|
df275921a9 | |
|
c1a689507b | |
|
b3f98ab936 | |
|
dc35754dbd | |
|
fa6d972444 | |
|
5e4b55812a | |
|
680f197515 | |
|
1909c913b2 | |
|
f9d9f19aa5 | |
|
0db4d0bb8f | |
|
71bfc9550e | |
|
38f7413836 | |
|
4d6893e8fa | |
|
dbdff31220 | |
|
ef2b5468d5 | |
|
f21182890a | |
|
ec731581af | |
|
ccdf522626 | |
|
9e1284687a | |
|
1034b746af | |
|
3efd161cb6 | |
|
99049a9652 | |
|
4b9b949dde | |
|
dc37067b93 | |
|
517257cbef | |
|
4a1e0ce941 | |
|
9bc7764139 | |
|
abafc2131f | |
|
2c0033f842 | |
|
cc7169cf2c | |
|
45797ec3a1 | |
|
5c76d04a35 | |
|
9d41f9bf10 | |
|
02dc87ef73 | |
|
e6869cdc75 | |
|
dec311ff0e | |
|
da661f6547 | |
|
afc0d5531d | |
|
8a83770d7b | |
|
c6cdbeb51f | |
|
7f347e54df | |
|
369a9f2e00 | |
|
c54292fa08 | |
|
d6f6c60c16 | |
|
dd151673d1 | |
|
3431a4e8b0 | |
|
c47e341ab8 | |
|
8390db35ae | |
|
b8018c5262 | |
|
ce90639428 | |
|
fce17db166 | |
|
9c969f363e | |
|
7562ff08f3 | |
|
4b832859cc | |
|
6587485d05 | |
|
bb85f983a3 | |
|
04f9e8dd7f | |
|
6d5a5149d0 | |
|
6bde73ce34 | |
|
3a585b4b58 | |
|
e50cb3271f | |
|
5a2cfb3d65 | |
|
fdcd80d89f | |
|
ff18e7c18b | |
|
78373353f5 | |
|
fa499f5ca8 | |
|
642d8c4081 | |
|
27d5d93a6a | |
|
3d37106115 | |
|
dde065b139 | |
|
8b2558f22e | |
|
0ea9998c4c | |
|
50ab047143 | |
|
139d787168 | |
|
af179659a2 | |
|
76e614fac4 | |
|
46cf5b5257 | |
|
164259e149 | |
|
db617eb3fd | |
|
3c60b62ad1 | |
|
8d14f0bb2a | |
|
a5474c3b29 | |
|
e43e8c91cd | |
|
ad29af3996 | |
|
3c88163c99 | |
|
f96d14cc62 | |
|
6189be647c | |
|
6daf581f46 | |
|
db52193b3c | |
|
3708604bb5 | |
|
d5dce5de99 | |
|
ad2fe813ab | |
|
fde1ef84c7 | |
|
9811782358 | |
|
4f9ee01b5f | |
|
2d5a21a3da | |
|
3dd42960e0 | |
|
c0132c6ab0 | |
|
65720812f7 | |
|
fa8a6995c7 | |
|
23cadea66a | |
|
2371adf3f8 | |
|
a83c8d9a04 | |
|
a01564cf08 | |
|
9e4de00420 | |
|
0ff1032bdd | |
|
81eaea57f9 | |
|
c6c0162cef | |
|
f98f5688ae | |
|
6114b60506 | |
|
f17a1bd65a | |
|
e0189e25dc | |
|
2f4d4c56fc | |
|
c09a299010 | |
|
139f3e52d9 | |
|
b76119bb8f | |
|
c4eb3714c5 | |
|
dc01beda66 | |
|
38006e86c4 | |
|
b1f714ee0f | |
|
3c2599c761 | |
|
f8bb30ef67 | |
|
72490eafcd | |
|
638c57f7a4 | |
|
e4a5b54135 | |
|
b5a0ee526c | |
|
17a57bf6d3 | |
|
2f5b0bf1fc | |
|
6245fb833c | |
|
8644630e7f | |
|
52bbcd6001 | |
|
8e3cd65f28 | |
|
0cb9ba55e8 | |
|
96f4a039c5 | |
|
789bf866e3 | |
|
1623dc0e71 | |
|
63e43d5222 | |
|
95873604ab | |
|
34368612f4 | |
|
bf3c0be507 | |
|
42e8b0a451 | |
|
6e61ff0c32 | |
|
231d26c4be | |
|
c0bc2c9797 | |
|
64f28ca279 | |
|
d7bc137c60 | |
|
cca571ab72 | |
|
6b3a11beb2 | |
|
9d8a6c6420 | |
|
85e21a9e22 | |
|
d18c5fe19c | |
|
65a2713d9f | |
|
748c92592d | |
|
7af1918b89 | |
|
44754e2a50 | |
|
731054f736 | |
|
dd68241907 | |
|
eabab7d0ad | |
|
93e6fcfa26 | |
|
5478a0b77a | |
|
0bb1c42a78 | |
|
2756c1edff | |
|
ec3c51dcd1 | |
|
3f50c08580 | |
|
37f85bf8cc | |
|
20413ef7d7 | |
|
9460773e5c | |
|
86a7f6bab3 | |
|
9b217bb4ff | |
|
9d9353d4c6 | |
|
a716949d1c | |
|
07c97eac38 | |
|
52871b82b6 | |
|
e54256ddb7 | |
|
c59b514cda | |
|
5219242eaf | |
|
b7e7d0cbe5 | |
|
406707b2bd | |
|
8406e2e789 | |
|
29ef6a9455 | |
|
3ebdb6344b | |
|
a606fab849 | |
|
0ad779a5b3 | |
|
962a3aecdb | |
|
41e670aeee | |
|
9af3136e7f | |
|
cf6d45e96c | |
|
26bcc9347b | |
|
908437db5d | |
|
147e3f754e | |
|
3d5935f4f6 | |
|
95f14cd8df | |
|
e5eb524e89 | |
|
3e394a4814 | |
|
16c041e22b | |
|
54882871b9 | |
|
c084ca8fa5 | |
|
8db1479e0d | |
|
72dc1cf1f6 | |
|
16eaec8d03 | |
|
d116ae39d6 | |
|
396aad9c24 | |
|
375eb6f2cc | |
|
5fd648eac4 | |
|
b03bf0037f | |
|
2176e3e43e | |
|
59894979ef | |
|
77708cd7dd | |
|
73ecf39517 | |
|
7eead8f1ae | |
|
72576f65e0 | |
|
1092344918 | |
|
54cbf59aae | |
|
1ddba1b518 | |
|
52ff7bdd4b | |
|
6fcaa0a104 | |
|
cc62d1f05e | |
|
d155540038 | |
|
f8b0f726ce | |
|
59ecd4d608 | |
|
770003dd17 | |
|
38f0e33641 | |
|
37e05aff86 | |
|
490580d6f3 | |
|
d2a51b95e5 | |
|
eb03dac1f0 | |
|
830231092d | |
|
e32aac7b18 | |
|
7804e0a4e8 | |
|
ecf5529f99 | |
|
c530f0d98f | |
|
eb394c0b21 | |
|
6134d5a2f9 | |
|
6c92f387aa | |
|
f393546d4a | |
|
9cf26836bd | |
|
76170313f1 | |
|
9e83e25441 | |
|
b6541f0bad | |
|
668cb75f24 | |
|
0da62aa532 | |
|
142b86c1bf | |
|
8656a06f88 | |
|
af8d0930ca | |
|
d330ab3dd0 | |
|
16ebf2519b | |
|
97d1514b65 | |
|
41bd34f6e1 | |
|
1737ee6940 | |
|
5c5fc732fb | |
|
d9e14487b2 | |
|
116f98df72 | |
|
7b1554bddc | |
|
beff723389 | |
|
4e992dd60a | |
|
d0cbf8e1a5 | |
|
0032e68161 | |
|
ae13079df8 | |
|
19a59e4be7 | |
|
1c820ea96e | |
|
53b87145b3 | |
|
a29ad8a6a3 | |
|
23f67eb77b | |
|
803bb322ba | |
|
c32cc7a3e2 | |
|
a6e4a0ca43 | |
|
e3ba54b95c | |
|
89a0b28a09 | |
|
c28f7c978e | |
|
b6a6f75834 | |
|
66a6780721 | |
|
bf8e2814ea | |
|
4606cf2c10 | |
|
46b14662f8 | |
|
1d6968b672 | |
|
1d8286c08a | |
|
ca4d5170d0 | |
|
4a5bf9bd7e | |
|
499548ebbb | |
|
77613da396 | |
|
226258e457 | |
|
6c88f01f0c | |
|
d341ef5062 | |
|
acffef957d | |
|
8cfbca2293 | |
|
d6a59e4bdf | |
|
155962b442 | |
|
3109724f48 | |
|
07c3324a3b | |
|
54c7ee80ab | |
|
a940fc4a65 | |
|
f6b68d0c02 | |
|
7cbe58691a | |
|
8582da5b8d | |
|
779ec9eb93 | |
|
e49806ea35 | |
|
39bd7fa79a | |
|
5145a07fd1 | |
|
5c566a0c37 | |
|
0adc58b4bf | |
|
9d06509bf5 | |
|
beed0aa395 | |
|
cef28d6f24 | |
|
e4ece57a81 | |
|
d7d7e96ce5 | |
|
6a54106f5b | |
|
6bb6d3896d | |
|
65b703529b | |
|
eccb05c808 | |
|
d52f42fb7f | |
|
f8bb28928c | |
|
a084c2c7df | |
|
3deb6b9db6 | |
|
41b64539d0 | |
|
6fcfbd67b8 | |
|
97c3664fd7 | |
|
08def3e40a | |
|
1a39ac80f8 | |
|
bed13f5136 | |
|
d135f20c29 | |
|
6f1a17d8dd | |
|
02c956190d | |
|
9cced9757a | |
|
f1d91097d8 | |
|
afb7f54b50 | |
|
6c5730f31a | |
|
d6e667f3eb | |
|
40c3363e9d | |
|
f5868df7f8 | |
|
98958b6f1e | |
|
f7878e7613 | |
|
f8a4f1ebf8 | |
|
ee67ea8ba5 | |
|
161acbb8ca | |
|
b0129acbdf | |
|
5a0540ba8b | |
|
3ec1b9717c | |
|
476f6e245a | |
|
5558e78d8c | |
|
830397ecbf | |
|
19f8e775ce | |
|
bc4d2c5b75 | |
|
fb75ac05d8 | |
|
1ad9d90308 | |
|
dda369b724 | |
|
560fd04962 | |
|
4108d57e7a | |
|
e7f647e91b | |
|
af9e841742 | |
|
9c327eae00 | |
|
f1f017fd15 | |
|
6981035aec | |
|
f9dc90fedc | |
|
c238af5442 | |
|
fc1c8f0f3f | |
|
009bdbaef0 | |
|
f0d8cb39e9 | |
|
2a707bccce | |
|
8bfae49a7a | |
|
76919d3089 | |
|
aeac52301a | |
|
0d28c8b978 | |
|
ca0dd50c43 | |
|
265490fc78 | |
|
3e18560228 | |
|
c3e9f75fb9 | |
|
4ea9e5a99a | |
|
fa6a36b8ef | |
|
32e6f6da92 | |
|
dab664c06e | |
|
bfcb16b3c0 | |
|
c87ffd4a35 | |
|
d563f8d841 | |
|
1c8d8ef536 | |
|
b65f67ded5 | |
|
35cc6f2854 | |
|
dbfa6818bf | |
|
33ad0dc012 | |
|
c45a6201e2 | |
|
5a48824f4f | |
|
26ab80925f | |
|
4f985196c6 | |
|
6690ecc441 | |
|
68b20f96c5 | |
|
a47810c2a2 | |
|
e799a74bbe | |
|
92da527977 | |
|
38e4ea4a24 | |
|
948b47d43c | |
|
cc52bd2729 | |
|
910d5ec281 | |
|
a322a0a26b | |
|
6594cdf053 | |
|
fa23d8a7a0 | |
|
05073008a3 | |
|
e6c27e0800 | |
|
5a7935ff1f | |
|
24bc71eb2e | |
|
f8f58ee411 | |
|
7e48ee7254 | |
|
7c7a2a4312 | |
|
7567efa341 | |
|
432d6f570c | |
|
6bc48be45a | |
|
15f3b97d5a | |
|
6293d6a991 | |
|
5a27946920 | |
|
b697f4ab9a | |
|
43dfc73c4c | |
|
bbbe3ab7ab | |
|
60fb936b7e | |
|
0b20c955fa | |
|
b1b9be0813 | |
|
15fd1de93f | |
|
5ff46ac9d1 | |
|
c8e529e437 | |
|
3518974d6e | |
|
c4c9b6b9a1 | |
|
75faaad986 | |
|
c272e68774 | |
|
fcc67514f5 | |
|
a9247774c4 | |
|
7da7f554ea | |
|
c9bad6269c | |
|
a3e457ca8c | |
|
8821a95202 | |
|
ef4bc9f9b4 | |
|
b16394b202 | |
|
77749225b7 | |
|
90211489a3 | |
|
df3415b0dd | |
|
a29242f493 | |
|
529178d9ae | |
|
58a6d3a79c | |
|
7f7c0f31fe | |
|
f531996f53 | |
|
ff17c79c16 | |
|
3d758a973c | |
|
919b2c295f | |
|
593f86fd04 | |
|
a166208616 | |
|
f6ed62a7aa | |
|
a61739c9c2 | |
|
41ca9027a8 | |
|
feed69bcc7 | |
|
fecb1e2862 | |
|
b776ac92a8 | |
|
3669b477bd | |
|
d93afc8773 | |
|
4a75c535a7 | |
|
b94c5906fd | |
|
daa84a6c63 | |
|
91a69d4c99 | |
|
795c93376c | |
|
6be205e604 | |
|
881a179e3b | |
|
361da3e45e | |
|
477b73cd9a | |
|
184d8d45b9 | |
|
da78275a55 | |
|
af9675cf04 | |
|
20e68e38e7 | |
|
ab0ea0e0f9 | |
|
97621523b8 | |
|
4357c35dd2 | |
|
3511ed180d | |
|
0216a9644a | |
|
bc4b0493b9 | |
|
5b841282ab | |
|
bb9eebb73e | |
|
e306aba7ec | |
|
95fea2bfa7 | |
|
c06fd1dd53 | |
|
768694cf75 | |
|
ed51ebb312 | |
|
73d0fa46a9 | |
|
55c829b6c4 | |
|
0db9dbe311 | |
|
dc711e870e | |
|
728976fb10 | |
|
41792e7bb3 | |
|
7bddbb5419 | |
|
bd9156fff8 | |
|
25e429aaf9 | |
|
f7cef14739 | |
|
ac97b00457 | |
|
59a737c285 | |
|
88111d0a83 | |
|
eb8e45695e | |
|
65b4f850a0 | |
|
e6409568c1 | |
|
c1a51fde96 | |
|
78285a5795 | |
|
66a107fa49 | |
|
da75015fad | |
|
c28f9b837f | |
|
f4f3042f85 | |
|
f8758c6902 | |
|
460fc33583 | |
|
d0500c2f8a | |
|
6a40ffd905 | |
|
9b7197d3b9 | |
|
46d2ce6ace | |
|
eabceff062 | |
|
935f51eb8e | |
|
bc804a3b07 | |
|
0a231e57f9 | |
|
1d3dea0475 | |
|
1ee7261ea7 | |
|
2a174b2543 | |
|
5116305f77 | |
|
de7ce0fb22 | |
|
2493258af1 | |
|
58f3d87b78 | |
|
3291f38e8d | |
|
bd4a22a0d9 | |
|
c8d5f851ed | |
|
d5b5925cf8 | |
|
5375acf534 | |
|
a0c3211c4f | |
|
1cd8ccb28a | |
|
0980486f2f | |
|
5cb4dab364 | |
|
c644f0d7d5 | |
|
4e90498bf3 | |
|
2718ffc7a7 | |
|
7f4853ac79 | |
|
ad06e7043c | |
|
2317adcc34 | |
|
7656bdb8fe | |
|
4de0e5659d | |
|
9ce1c26d27 | |
|
ab50a4e151 | |
|
82b07959a9 | |
|
07318bd378 | |
|
99678ccd3a | |
|
8322ee790e | |
|
e84bfff6cf | |
|
a5c48871fa | |
|
804a9090a1 | |
|
fdb2e141d4 | |
|
fdcbbddb6c | |
|
85ca0a6b80 | |
|
805c72ceff | |
|
955b483f7a | |
|
24eadcf63d | |
|
37aba928d4 | |
|
d06de3f9f1 | |
|
ca082a7c52 | |
|
ada27842bd | |
|
96655cefbc | |
|
86a552ecc8 | |
|
26479c8a34 | |
|
4360b5f6e8 | |
|
c8889d7211 | |
|
0e66ef6e20 | |
|
9cf995c62e | |
|
35cb8c5254 | |
|
4bb095e961 | |
|
24c1ccabc5 | |
|
bc734282b9 | |
|
69fbfd6080 | |
|
dc62f8de49 | |
|
1f3bcd6555 | |
|
bbcd5eebe3 | |
|
4107d395cf | |
|
a892b0b0f3 | |
|
847e8faadc | |
|
e7df01a26c | |
|
74f58219d0 | |
|
5207a78460 | |
|
b84d779104 | |
|
ca8daea8bf | |
|
fc864fe99a | |
|
801dcedcb8 | |
|
ab97e07eef | |
|
70d9b3d9ea | |
|
51c78bf3a8 | |
|
a8e57bfbb8 | |
|
ef7125000a | |
|
5e1e866ec1 | |
|
11812b190a | |
|
78424fa985 | |
|
1b68fdc8c8 | |
|
c9832ba232 | |
|
dcffb584c4 | |
|
9bb73fc4c5 | |
|
1782e96b77 | |
|
6c2e54da64 | |
|
617cae9375 | |
|
223c79c617 | |
|
8f02162221 | |
|
0b5e3b4bcd | |
|
e30dd1abeb | |
|
74820251f1 | |
|
fbda226a5a | |
|
d1c3cb33dc | |
|
28f49a56e4 | |
|
17de1d5765 | |
|
8d43618798 | |
|
7404e69663 | |
|
fd6b8f1647 | |
|
e923938646 | |
|
e56cdc8fec | |
|
ba05c2c0c3 | |
|
ce2de1f5a9 | |
|
5f68e9701b | |
|
d948f21ad3 | |
|
5552db2adf | |
|
1bf9f429e4 | |
|
2417c099a0 | |
|
c54a9d1ad2 | |
|
5b4e5d810a | |
|
717d10760a | |
|
3273d8c39f | |
|
9b3d0b485e | |
|
af1528d288 | |
|
aa8ae2efe3 | |
|
1e0b11f07a | |
|
cb5a07c765 | |
|
565e78de2c | |
|
2e746198bf | |
|
46a8c59e03 | |
|
8daa8ad481 | |
|
1c2171528e | |
|
adfb1c763d | |
|
d2d4561593 |
33
.flake8
33
.flake8
|
@ -1,33 +0,0 @@
|
|||
[flake8]
|
||||
ignore =
|
||||
# line too long, defer to black
|
||||
E501
|
||||
|
||||
# allow line breaks before binary ops
|
||||
W503
|
||||
|
||||
# allow line breaks after binary ops
|
||||
W504
|
||||
|
||||
# allow whitespace before ':' (https://github.com/psf/black#slices)
|
||||
E203
|
||||
|
||||
exclude =
|
||||
.bzr
|
||||
.git
|
||||
.hg
|
||||
.svn
|
||||
.tox
|
||||
CVS
|
||||
.venv*/
|
||||
venv*/
|
||||
target
|
||||
__pycache__
|
||||
exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/gen/
|
||||
exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/gen/
|
||||
exporter/opentelemetry-exporter-jaeger/build/*
|
||||
docs/examples/opentelemetry-example-app/src/opentelemetry_example_app/grpc/gen/
|
||||
docs/examples/opentelemetry-example-app/build/*
|
||||
opentelemetry-proto/build/*
|
||||
opentelemetry-proto/src/opentelemetry/proto/
|
||||
scripts/*
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve
|
||||
labels: bug
|
||||
---
|
||||
|
||||
**Describe your environment** 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.
|
||||
|
||||
**Steps to reproduce**
|
||||
Describe exactly how to reproduce the error. Include a code sample if applicable.
|
||||
|
||||
**What is the expected behavior?**
|
||||
What did you expect to see?
|
||||
|
||||
**What is the actual behavior?**
|
||||
What did you see instead?
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
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-contrib/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug) to see if your bug is already addressed.
|
||||
|
||||
- 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.9.10)
|
||||
Package version: (e.g., 0.46.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) if possible and the needed steps to reproduce the problem.
|
||||
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-contrib/blob/main/CONTRIBUTING.md).
|
||||
options:
|
||||
- "No"
|
||||
- "Yes"
|
|
@ -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.
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for this project
|
||||
labels: feature-request
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
**Is your feature request related to a problem?**
|
||||
If so, provide a concise description of the problem.
|
||||
|
||||
**Describe the solution you'd like**
|
||||
What do you want to happen instead? What is the expected behavior?
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
Which alternative solutions or features have you considered?
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the feature request here.
|
|
@ -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: What problem do you want to solve?
|
||||
description: Is your feature request related to a problem? If so, provide a concise description of the problem.
|
||||
placeholder: Describe the problem and include relevant issue IDs
|
||||
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-contrib/blob/main/CONTRIBUTING.md).
|
||||
options:
|
||||
- "No"
|
||||
- "Yes"
|
|
@ -11,6 +11,9 @@ components:
|
|||
- oxeye-nikolay
|
||||
- nikosokolik
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-asyncclick:
|
||||
- jomcgi
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-kafka-python:
|
||||
- nozik
|
||||
|
||||
|
@ -35,6 +38,7 @@ components:
|
|||
sdk-extension/opentelemetry-sdk-extension-aws:
|
||||
- NathanielRN
|
||||
- Kausik-A
|
||||
- srprash
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-tortoiseorm:
|
||||
- tonybaloney
|
||||
|
@ -44,29 +48,36 @@ components:
|
|||
|
||||
instrumentation/opentelemetry-instrumentation-urllib:
|
||||
- shalevr
|
||||
- ocelotl
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-urllib3:
|
||||
- shalevr
|
||||
- ocelotl
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-sqlalchemy:
|
||||
- shalevr
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-flask:
|
||||
- ocelotl
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-jinja2:
|
||||
- ocelotl
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-logging:
|
||||
- ocelotl
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-requests:
|
||||
- ocelotl
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-cassandra:
|
||||
- mattcontinisio
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-asyncio:
|
||||
- bourbonkk
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-psycopg:
|
||||
- federicobond
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-pymssql:
|
||||
- guillaumep
|
||||
|
||||
instrumentation/opentelemetry-instrumentation-aiokafka:
|
||||
- dimastbk
|
||||
|
||||
processor/opentelemetry-processor-baggage:
|
||||
- codeboten
|
||||
|
||||
instrumentation-genai/:
|
||||
- karthikscale3
|
||||
- lmolkova
|
||||
- lzchen
|
||||
- gyliu513
|
||||
- nirga
|
||||
- alizenhom
|
||||
- codefromthecrypt
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
sed -i "/\[stable\]/{n;s/version=.*/version=$1/}" eachdist.ini
|
||||
sed -i "/\[prerelease\]/{n;s/version=.*/version=$2/}" eachdist.ini
|
||||
|
||||
./scripts/eachdist.py update_patch_versions \
|
||||
--stable_version=$1 \
|
||||
--unstable_version=$2 \
|
||||
--stable_version_prev=$3 \
|
||||
--unstable_version_prev=$4
|
||||
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# history is needed to run git cherry-pick below
|
||||
fetch-depth: 0
|
||||
|
@ -40,4 +40,4 @@ jobs:
|
|||
gh pr create --title "[$GITHUB_REF_NAME] $title" \
|
||||
--body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
|
||||
--head $branch \
|
||||
--base $GITHUB_REF_NAME
|
||||
--base $GITHUB_REF_NAME
|
||||
|
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
&& github.actor != 'opentelemetrybot'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check for CHANGELOG changes
|
||||
run: |
|
||||
|
@ -33,4 +33,4 @@ jobs:
|
|||
echo "No CHANGELOG was modified."
|
||||
echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required."
|
||||
false
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -20,16 +20,16 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: python
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
|
|
@ -10,6 +10,10 @@ jobs:
|
|||
run_self:
|
||||
runs-on: ubuntu-latest
|
||||
name: Auto Assign Owners
|
||||
permissions:
|
||||
contents: read # to read changed files
|
||||
issues: write # to read/write issue assignees
|
||||
pull-requests: write # to read/write PR reviewers
|
||||
# Don't fail tests if this workflow fails. Some pending issues:
|
||||
# - https://github.com/dyladan/component-owners/issues/8
|
||||
continue-on-error: true
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,20 @@
|
|||
name: FOSSA scanning
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
fossa:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
|
||||
with:
|
||||
api-key: ${{secrets.FOSSA_API_KEY}}
|
||||
team: OpenTelemetry
|
|
@ -0,0 +1,16 @@
|
|||
from pathlib import Path
|
||||
|
||||
from generate_workflows_lib import (
|
||||
generate_contrib_workflow,
|
||||
generate_lint_workflow,
|
||||
generate_misc_workflow,
|
||||
generate_test_workflow,
|
||||
)
|
||||
|
||||
tox_ini_path = Path(__file__).parent.parent.parent.joinpath("tox.ini")
|
||||
workflows_directory_path = Path(__file__).parent
|
||||
|
||||
generate_test_workflow(tox_ini_path, workflows_directory_path, "ubuntu-latest")
|
||||
generate_lint_workflow(tox_ini_path, workflows_directory_path)
|
||||
generate_misc_workflow(tox_ini_path, workflows_directory_path)
|
||||
generate_contrib_workflow(workflows_directory_path)
|
|
@ -0,0 +1,17 @@
|
|||
from pathlib import Path
|
||||
|
||||
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
||||
|
||||
|
||||
class CustomBuildHook(BuildHookInterface):
|
||||
def initialize(self, version, build_data):
|
||||
with open(
|
||||
Path(__file__).parent.parent.parent.parent.joinpath("tox.ini")
|
||||
) as tox_ini_file_0:
|
||||
with open(
|
||||
Path(__file__).parent.joinpath(
|
||||
"src/generate_workflows_lib/tox.ini"
|
||||
),
|
||||
"w",
|
||||
) as tox_ini_file_1:
|
||||
tox_ini_file_1.write(tox_ini_file_0.read())
|
|
@ -0,0 +1,32 @@
|
|||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "generate-workflows-lib"
|
||||
dynamic = ["version"]
|
||||
description = "A library to generate workflows"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Typing :: Typed",
|
||||
]
|
||||
dependencies = ["Jinja2", "tox"]
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "src/generate_workflows_lib/version.py"
|
||||
|
||||
[tool.hatch.build.targets.wheel.hooks.custom]
|
1
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/.gitignore
vendored
Normal file
1
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
tox.ini
|
236
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py
vendored
Normal file
236
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py
vendored
Normal file
|
@ -0,0 +1,236 @@
|
|||
from collections import defaultdict
|
||||
from pathlib import Path
|
||||
from re import compile as re_compile
|
||||
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from tox.config.cli.parse import get_options
|
||||
from tox.config.sets import CoreConfigSet
|
||||
from tox.config.source.tox_ini import ToxIni
|
||||
from tox.session.state import State
|
||||
|
||||
_tox_test_env_regex = re_compile(
|
||||
r"(?P<python_version>py\w+)-test-"
|
||||
r"(?P<name>[-\w]+\w)-?(?P<test_requirements>\d+)?"
|
||||
)
|
||||
_tox_lint_env_regex = re_compile(r"lint-(?P<name>[-\w]+)")
|
||||
_tox_contrib_env_regex = re_compile(
|
||||
r"py39-test-(?P<name>[-\w]+\w)-?(?P<contrib_requirements>\d+)?"
|
||||
)
|
||||
|
||||
|
||||
def get_tox_envs(tox_ini_path: Path) -> list:
|
||||
tox_ini = ToxIni(tox_ini_path)
|
||||
|
||||
conf = State(get_options(), []).conf
|
||||
|
||||
tox_section = next(tox_ini.sections())
|
||||
|
||||
core_config_set = CoreConfigSet(
|
||||
conf, tox_section, tox_ini_path.parent, tox_ini_path
|
||||
)
|
||||
|
||||
(
|
||||
core_config_set.loaders.extend(
|
||||
tox_ini.get_loaders(
|
||||
tox_section,
|
||||
base=[],
|
||||
override_map=defaultdict(list, {}),
|
||||
conf=core_config_set,
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
return core_config_set.load("env_list")
|
||||
|
||||
|
||||
def get_test_job_datas(tox_envs: list, operating_systems: list) -> list:
|
||||
os_alias = {"ubuntu-latest": "Ubuntu", "windows-latest": "Windows"}
|
||||
|
||||
python_version_alias = {
|
||||
"pypy3": "pypy-3.9",
|
||||
"pypy310": "pypy-3.10",
|
||||
"py39": "3.9",
|
||||
"py310": "3.10",
|
||||
"py311": "3.11",
|
||||
"py312": "3.12",
|
||||
"py313": "3.13",
|
||||
}
|
||||
|
||||
test_job_datas = []
|
||||
|
||||
for operating_system in operating_systems:
|
||||
for tox_env in tox_envs:
|
||||
tox_test_env_match = _tox_test_env_regex.match(tox_env)
|
||||
|
||||
if tox_test_env_match is None:
|
||||
continue
|
||||
|
||||
groups = tox_test_env_match.groupdict()
|
||||
|
||||
aliased_python_version = python_version_alias[
|
||||
groups["python_version"]
|
||||
]
|
||||
tox_env = tox_test_env_match.string
|
||||
|
||||
test_requirements = groups["test_requirements"]
|
||||
|
||||
if test_requirements is None:
|
||||
test_requirements = " "
|
||||
|
||||
else:
|
||||
test_requirements = f"-{test_requirements} "
|
||||
|
||||
test_job_datas.append(
|
||||
{
|
||||
"name": f"{tox_env}_{operating_system}",
|
||||
"ui_name": (
|
||||
f"{groups['name']}"
|
||||
f"{test_requirements}"
|
||||
f"{aliased_python_version} "
|
||||
f"{os_alias[operating_system]}"
|
||||
),
|
||||
"python_version": aliased_python_version,
|
||||
"tox_env": tox_env,
|
||||
"os": operating_system,
|
||||
}
|
||||
)
|
||||
|
||||
return test_job_datas
|
||||
|
||||
|
||||
def get_lint_job_datas(tox_envs: list) -> list:
|
||||
lint_job_datas = []
|
||||
|
||||
for tox_env in tox_envs:
|
||||
tox_lint_env_match = _tox_lint_env_regex.match(tox_env)
|
||||
|
||||
if tox_lint_env_match is None:
|
||||
continue
|
||||
|
||||
tox_env = tox_lint_env_match.string
|
||||
|
||||
lint_job_datas.append(
|
||||
{
|
||||
"name": f"{tox_env}",
|
||||
"ui_name": f"{tox_lint_env_match.groupdict()['name']}",
|
||||
"tox_env": tox_env,
|
||||
}
|
||||
)
|
||||
|
||||
return lint_job_datas
|
||||
|
||||
|
||||
def get_contrib_job_datas(tox_envs: list) -> list:
|
||||
contrib_job_datas = []
|
||||
|
||||
for tox_env in tox_envs:
|
||||
tox_contrib_env_match = _tox_contrib_env_regex.match(tox_env)
|
||||
|
||||
if tox_contrib_env_match is None:
|
||||
continue
|
||||
|
||||
groups = tox_contrib_env_match.groupdict()
|
||||
|
||||
tox_env = tox_contrib_env_match.string
|
||||
|
||||
contrib_requirements = groups["contrib_requirements"]
|
||||
|
||||
if contrib_requirements is None:
|
||||
contrib_requirements = " "
|
||||
|
||||
else:
|
||||
contrib_requirements = f"-{contrib_requirements} "
|
||||
|
||||
contrib_job_datas.append(
|
||||
{
|
||||
"ui_name": (f"{groups['name']}" f"{contrib_requirements}"),
|
||||
"tox_env": tox_env,
|
||||
}
|
||||
)
|
||||
|
||||
return contrib_job_datas
|
||||
|
||||
|
||||
def get_misc_job_datas(tox_envs: list) -> list:
|
||||
misc_job_datas = []
|
||||
|
||||
_tox_benchmark_env_regex = re_compile(r"benchmark.+")
|
||||
|
||||
for tox_env in tox_envs:
|
||||
if (
|
||||
_tox_test_env_regex.match(tox_env) is not None
|
||||
or _tox_lint_env_regex.match(tox_env) is not None
|
||||
or _tox_contrib_env_regex.match(tox_env) is not None
|
||||
or _tox_benchmark_env_regex.match(tox_env) is not None
|
||||
):
|
||||
continue
|
||||
|
||||
misc_job_datas.append(tox_env)
|
||||
|
||||
return misc_job_datas
|
||||
|
||||
|
||||
def _generate_workflow(
|
||||
job_datas: list, name: str, workflow_directory_path: Path, max_jobs=250
|
||||
):
|
||||
# Github seems to limit the amount of jobs in a workflow file, that is why
|
||||
# they are split in groups of 250 per workflow file.
|
||||
for file_number, job_datas in enumerate(
|
||||
[
|
||||
job_datas[index : index + max_jobs]
|
||||
for index in range(0, len(job_datas), max_jobs)
|
||||
]
|
||||
):
|
||||
with open(
|
||||
workflow_directory_path.joinpath(f"{name}_{file_number}.yml"), "w"
|
||||
) as test_yml_file:
|
||||
test_yml_file.write(
|
||||
Environment(loader=FileSystemLoader(Path(__file__).parent))
|
||||
.get_template(f"{name}.yml.j2")
|
||||
.render(job_datas=job_datas, file_number=file_number)
|
||||
)
|
||||
test_yml_file.write("\n")
|
||||
|
||||
|
||||
def generate_test_workflow(
|
||||
tox_ini_path: Path, workflow_directory_path: Path, *operating_systems
|
||||
) -> None:
|
||||
_generate_workflow(
|
||||
get_test_job_datas(get_tox_envs(tox_ini_path), operating_systems),
|
||||
"test",
|
||||
workflow_directory_path,
|
||||
)
|
||||
|
||||
|
||||
def generate_lint_workflow(
|
||||
tox_ini_path: Path,
|
||||
workflow_directory_path: Path,
|
||||
) -> None:
|
||||
_generate_workflow(
|
||||
get_lint_job_datas(get_tox_envs(tox_ini_path)),
|
||||
"lint",
|
||||
workflow_directory_path,
|
||||
)
|
||||
|
||||
|
||||
def generate_contrib_workflow(
|
||||
workflow_directory_path: Path,
|
||||
) -> None:
|
||||
_generate_workflow(
|
||||
get_contrib_job_datas(
|
||||
get_tox_envs(Path(__file__).parent.joinpath("tox.ini"))
|
||||
),
|
||||
"core_contrib_test",
|
||||
workflow_directory_path,
|
||||
)
|
||||
|
||||
|
||||
def generate_misc_workflow(
|
||||
tox_ini_path: Path,
|
||||
workflow_directory_path: Path,
|
||||
) -> None:
|
||||
_generate_workflow(
|
||||
get_misc_job_datas(get_tox_envs(tox_ini_path)),
|
||||
"misc",
|
||||
workflow_directory_path,
|
||||
)
|
46
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/core_contrib_test.yml.j2
vendored
Normal file
46
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/core_contrib_test.yml.j2
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Do not edit this file.
|
||||
# This file is generated automatically by executing tox -e generate-workflows
|
||||
|
||||
name: Core Contrib Test {{ file_number }}
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
CORE_REPO_SHA:
|
||||
required: true
|
||||
type: string
|
||||
CONTRIB_REPO_SHA:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
CORE_REPO_SHA: ${% raw %}{{ inputs.CORE_REPO_SHA }}{% endraw %}
|
||||
CONTRIB_REPO_SHA: ${% raw %}{{ inputs.CONTRIB_REPO_SHA }}{% endraw %}
|
||||
PIP_EXISTS_ACTION: w
|
||||
|
||||
jobs:
|
||||
{%- for job_data in job_datas %}
|
||||
|
||||
{{ job_data.tox_env }}:
|
||||
name: {{ job_data.ui_name }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout contrib repo @ SHA - ${% raw %}{{ env.CONTRIB_REPO_SHA }}{% endraw %}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: open-telemetry/opentelemetry-python-contrib
|
||||
ref: ${% raw %}{{ env.CONTRIB_REPO_SHA }}{% endraw %}
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.9"
|
||||
architecture: "x64"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e {{ job_data.tox_env }} -- -ra
|
||||
{%- endfor %}
|
50
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2
vendored
Normal file
50
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Do not edit this file.
|
||||
# This file is generated automatically by executing tox -e generate-workflows
|
||||
|
||||
name: Lint {{ file_number }}
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||
# For PRs you can change the inner fallback ('main')
|
||||
# For pushes you change the outer fallback ('main')
|
||||
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
|
||||
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||
'main'
|
||||
) || 'main' }}{% endraw %}
|
||||
CONTRIB_REPO_SHA: main
|
||||
PIP_EXISTS_ACTION: w
|
||||
|
||||
jobs:
|
||||
{%- for job_data in job_datas %}
|
||||
|
||||
{{ job_data.name }}:
|
||||
name: {{ job_data.ui_name }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e {{ job_data.tox_env }}
|
||||
{%- endfor %}
|
87
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2
vendored
Normal file
87
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
# Do not edit this file.
|
||||
# This file is generated automatically by executing tox -e generate-workflows
|
||||
|
||||
name: Misc {{ file_number }}
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||
# For PRs you can change the inner fallback ('main')
|
||||
# For pushes you change the outer fallback ('main')
|
||||
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
|
||||
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||
'main'
|
||||
) || 'main' }}{% endraw %}
|
||||
CONTRIB_REPO_SHA: main
|
||||
PIP_EXISTS_ACTION: w
|
||||
|
||||
jobs:
|
||||
{%- for job_data in job_datas %}
|
||||
|
||||
{{ job_data }}:
|
||||
name: {{ job_data }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
{%- if job_data == "generate-workflows" %}
|
||||
if: |
|
||||
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
|
||||
&& github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
|
||||
{%- endif %}
|
||||
{%- if job_data == "public-symbols-check" %}
|
||||
if: |
|
||||
!contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
|
||||
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
|
||||
{%- endif %}
|
||||
{%- if job_data == "docs" %}
|
||||
if: |
|
||||
github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
|
||||
{%- endif %}
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
|
||||
uses: actions/checkout@v4
|
||||
{%- if job_data == "public-symbols-check" %}
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout main
|
||||
run: git checkout main
|
||||
|
||||
- name: Pull origin
|
||||
run: git pull --rebase=false origin main
|
||||
|
||||
- name: Checkout pull request
|
||||
run: git checkout ${% raw %}{{ github.event.pull_request.head.sha }}{% endraw %}
|
||||
{%- endif %}
|
||||
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e {{ job_data }}
|
||||
{%- if job_data == "generate-workflows" %}
|
||||
|
||||
- name: Check workflows are up to date
|
||||
run: git diff --exit-code || (echo 'Generated workflows are out of date, run "tox -e generate-workflows" and commit the changes in this PR.' && exit 1)
|
||||
{%- endif %}
|
||||
{%- if job_data == "generate" %}
|
||||
|
||||
- name: Check workflows are up to date
|
||||
run: git diff --exit-code || (echo 'Generated code is out of date, run "tox -e generate" and commit the changes in this PR.' && exit 1)
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
55
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2
vendored
Normal file
55
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
# Do not edit this file.
|
||||
# This file is generated automatically by executing tox -e generate-workflows
|
||||
|
||||
name: Test {{ file_number }}
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||
# For PRs you can change the inner fallback ('main')
|
||||
# For pushes you change the outer fallback ('main')
|
||||
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
|
||||
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||
'main'
|
||||
) || 'main' }}{% endraw %}
|
||||
CONTRIB_REPO_SHA: main
|
||||
PIP_EXISTS_ACTION: w
|
||||
|
||||
jobs:
|
||||
{%- for job_data in job_datas %}
|
||||
|
||||
{{ job_data.name }}:
|
||||
name: {{ job_data.ui_name }}
|
||||
runs-on: {{ job_data.os }}
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python {{ job_data.python_version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "{{ job_data.python_version }}"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
{%- if job_data.os == "windows-latest" %}
|
||||
|
||||
- name: Configure git to support long filenames
|
||||
run: git config --system core.longpaths true
|
||||
{%- endif %}
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e {{ job_data.tox_env }} -- -ra
|
||||
{%- endfor %}
|
1
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/version.py
vendored
Normal file
1
.github/workflows/generate_workflows_lib/src/generate_workflows_lib/version.py
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
__version__ = "0.1.0"
|
|
@ -1,123 +0,0 @@
|
|||
name: Contrib Repo Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
env:
|
||||
CORE_REPO_SHA: e98af82ff0ebe7e687fda265093aa576cd9ba80f
|
||||
|
||||
jobs:
|
||||
instrumentations-0:
|
||||
env:
|
||||
# We use these variables to convert between tox and GHA version literals
|
||||
py38: 3.8
|
||||
py39: 3.9
|
||||
py310: "3.10"
|
||||
py311: "3.11"
|
||||
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]
|
||||
package:
|
||||
# Do not add more instrumentations here, add them in instrumentations_1.yml.
|
||||
# The reason for this separation of instrumentations into more than one YAML file is
|
||||
# the limit of jobs that can be run from a Github actions matrix:
|
||||
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
|
||||
# "A matrix will generate a maximum of 256 jobs per workflow run. This limit applies
|
||||
# to both GitHub-hosted and self-hosted runners."
|
||||
- "aiohttp-client"
|
||||
- "aiohttp-server"
|
||||
- "aiopg"
|
||||
- "aio-pika"
|
||||
- "asgi"
|
||||
- "asyncpg"
|
||||
- "aws-lambda"
|
||||
- "boto"
|
||||
- "boto3sqs"
|
||||
- "botocore"
|
||||
- "cassandra"
|
||||
- "celery"
|
||||
- "confluent-kafka"
|
||||
- "dbapi"
|
||||
- "django"
|
||||
- "elasticsearch"
|
||||
- "falcon"
|
||||
- "fastapi"
|
||||
- "flask"
|
||||
- "grpc"
|
||||
- "httpx"
|
||||
- "jinja2"
|
||||
- "kafka-python"
|
||||
- "logging"
|
||||
- "mysql"
|
||||
- "mysqlclient"
|
||||
- "sio-pika"
|
||||
- "psycopg2"
|
||||
- "pymemcache"
|
||||
- "pymongo"
|
||||
- "pymysql"
|
||||
- "pyramid"
|
||||
- "redis"
|
||||
- "remoulade"
|
||||
- "requests"
|
||||
- "sklearn"
|
||||
- "sqlalchemy"
|
||||
- "sqlite3"
|
||||
- "starlette"
|
||||
- "system-metrics"
|
||||
- "tornado"
|
||||
- "tortoiseorm"
|
||||
os: [ubuntu-20.04]
|
||||
exclude:
|
||||
- python-version: py39
|
||||
package: "sklearn"
|
||||
- python-version: py310
|
||||
package: "sklearn"
|
||||
- python-version: py311
|
||||
package: "sklearn"
|
||||
- python-version: pypy3
|
||||
package: "aiopg"
|
||||
- python-version: pypy3
|
||||
package: "asyncpg"
|
||||
- python-version: pypy3
|
||||
package: "boto"
|
||||
- python-version: pypy3
|
||||
package: "boto3sqs"
|
||||
- python-version: pypy3
|
||||
package: "botocore"
|
||||
- python-version: pypy3
|
||||
package: "psycopg2"
|
||||
- python-version: pypy3
|
||||
package: "remoulade"
|
||||
- python-version: pypy3
|
||||
package: "requests"
|
||||
- python-version: pypy3
|
||||
package: "sklearn"
|
||||
- python-version: pypy3
|
||||
package: "confluent-kafka"
|
||||
- python-version: pypy3
|
||||
package: "grpc"
|
||||
steps:
|
||||
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ env[matrix.python-version] }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ env[matrix.python-version] }}
|
||||
- name: Install tox
|
||||
run: pip install tox
|
||||
- name: Cache tox environment
|
||||
# Preserves .tox directory between runs for faster installs
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: |
|
||||
.tox
|
||||
~/.cache/pip
|
||||
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
|
||||
- name: run tox
|
||||
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
|
|
@ -1,61 +0,0 @@
|
|||
name: Contrib Repo Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
env:
|
||||
CORE_REPO_SHA: e98af82ff0ebe7e687fda265093aa576cd9ba80f
|
||||
|
||||
jobs:
|
||||
instrumentations-1:
|
||||
env:
|
||||
# We use these variables to convert between tox and GHA version literals
|
||||
py38: 3.8
|
||||
py39: 3.9
|
||||
py310: "3.10"
|
||||
py311: "3.11"
|
||||
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]
|
||||
package:
|
||||
- "urllib"
|
||||
- "urllib3v"
|
||||
- "wsgi"
|
||||
- "distro"
|
||||
- "richconsole"
|
||||
- "prometheus-remote-write"
|
||||
- "sdkextension-aws"
|
||||
- "propagator-aws-xray"
|
||||
- "propagator-ot-trace"
|
||||
- "resource-detector-container"
|
||||
os: [ubuntu-20.04]
|
||||
exclude:
|
||||
- python-version: py311
|
||||
package: "prometheus-remote-write"
|
||||
- python-version: pypy3
|
||||
package: "prometheus-remote-write"
|
||||
steps:
|
||||
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ env[matrix.python-version] }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ env[matrix.python-version] }}
|
||||
- name: Install tox
|
||||
run: pip install tox
|
||||
- name: Cache tox environment
|
||||
# Preserves .tox directory between runs for faster installs
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: |
|
||||
.tox
|
||||
~/.cache/pip
|
||||
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
|
||||
- name: run tox
|
||||
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra --benchmark-json=${{ env.RUN_MATRIX_COMBINATION }}-benchmark.json
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,192 @@
|
|||
# Do not edit this file.
|
||||
# This file is generated automatically by executing tox -e generate-workflows
|
||||
|
||||
name: Misc 0
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||
# For PRs you can change the inner fallback ('main')
|
||||
# For pushes you change the outer fallback ('main')
|
||||
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
|
||||
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||
'main'
|
||||
) || 'main' }}
|
||||
CONTRIB_REPO_SHA: main
|
||||
PIP_EXISTS_ACTION: w
|
||||
|
||||
jobs:
|
||||
|
||||
spellcheck:
|
||||
name: spellcheck
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e spellcheck
|
||||
|
||||
docker-tests:
|
||||
name: docker-tests
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e docker-tests
|
||||
|
||||
docs:
|
||||
name: docs
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
if: |
|
||||
github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e docs
|
||||
|
||||
generate:
|
||||
name: generate
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e generate
|
||||
|
||||
- name: Check workflows are up to date
|
||||
run: git diff --exit-code || (echo 'Generated code is out of date, run "tox -e generate" and commit the changes in this PR.' && exit 1)
|
||||
|
||||
generate-workflows:
|
||||
name: generate-workflows
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
if: |
|
||||
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
|
||||
&& github.event.pull_request.user.login != 'opentelemetrybot' && github.event_name == 'pull_request'
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e generate-workflows
|
||||
|
||||
- name: Check workflows are up to date
|
||||
run: git diff --exit-code || (echo 'Generated workflows are out of date, run "tox -e generate-workflows" and commit the changes in this PR.' && exit 1)
|
||||
|
||||
shellcheck:
|
||||
name: shellcheck
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e shellcheck
|
||||
|
||||
ruff:
|
||||
name: ruff
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e ruff
|
||||
|
||||
typecheck:
|
||||
name: typecheck
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e typecheck
|
|
@ -0,0 +1,47 @@
|
|||
name: OSSF Scorecard
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "10 6 * * 1" # once a week
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed for Code scanning upload
|
||||
security-events: write
|
||||
# Needed for GitHub OIDC token if publish_results is true
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable
|
||||
# uploads of run results in SARIF format to the repository Actions tab.
|
||||
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard (optional).
|
||||
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@5f8171a638ada777af81d42b55959a643bb29017 # v3.28.12
|
||||
with:
|
||||
sarif_file: results.sarif
|
|
@ -0,0 +1,121 @@
|
|||
name: "[Package] Prepare patch release"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package:
|
||||
type: choice
|
||||
options:
|
||||
- opentelemetry-propagator-aws-xray
|
||||
- opentelemetry-resource-detector-azure
|
||||
- opentelemetry-sdk-extension-aws
|
||||
- opentelemetry-instrumentation-openai-v2
|
||||
- opentelemetry-instrumentation-vertexai
|
||||
- opentelemetry-instrumentation-google-genai
|
||||
description: 'Package to be released'
|
||||
required: true
|
||||
run-name: "[Package][${{ inputs.package }}] Prepare patch release"
|
||||
|
||||
jobs:
|
||||
prepare-patch-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Verify prerequisites
|
||||
run: |
|
||||
if [[ $GITHUB_REF_NAME != package-release/${{ inputs.package }}/v* ]]; then
|
||||
echo this workflow should only be run against package-release/${{ inputs.package }}* branches, but is running on $GITHUB_REF_NAME
|
||||
exit 1
|
||||
fi
|
||||
|
||||
path=./$(./scripts/eachdist.py find-package --package ${{ inputs.package }})
|
||||
changelog=$path/CHANGELOG.md
|
||||
|
||||
if [ ! -f $changelog ]; then
|
||||
echo "missing $changelog file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then
|
||||
echo the $changelog is missing an \"Unreleased\" section
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version=$(./scripts/eachdist.py version --package ${{ inputs.package }})
|
||||
|
||||
version_file=$(find $path -type f -path "*version*.py")
|
||||
file_count=$(echo "$version_file" | wc -l)
|
||||
|
||||
if [ "$file_count" -ne 1 ]; then
|
||||
echo "Error: expected one version file, found $file_count"
|
||||
echo "$version_file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
|
||||
# 1.2.3 or 1.2.3rc1
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
patch="${BASH_REMATCH[3]}"
|
||||
next_version="$major.$minor.$((patch + 1))"
|
||||
release_branch_name="package-release/${{ inputs.package }}/v$major.$minor.x"
|
||||
elif [[ $version =~ ^([0-9]+)\.([0-9]+)b([0-9]+)$ ]]; then
|
||||
# 0.1b1
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
patch="${BASH_REMATCH[3]}"
|
||||
next_version="$major.${minor}b$((patch + 1))"
|
||||
release_branch_name="package-release/${{ inputs.package }}/v$major.${minor}bx"
|
||||
else
|
||||
echo "unexpected version: '$version'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $GITHUB_REF_NAME != $release_branch_name ]]; then
|
||||
echo this workflow should only be run against $release_branch_name branch, but is running on $GITHUB_REF_NAME
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "PACKAGE_NAME=${{ inputs.package }}" >> $GITHUB_ENV
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
echo "NEXT_VERSION=$next_version" >> $GITHUB_ENV
|
||||
echo "CHANGELOG=$changelog" >> $GITHUB_ENV
|
||||
echo "VERSION_FILE=$version_file" >> $GITHUB_ENV
|
||||
|
||||
- name: Update version
|
||||
run: |
|
||||
# replace the version in the version file (1.2.3 -> 1.2.4)
|
||||
sed -i -E "s/__version__\s*=\s*\"${VERSION}\"/__version__ = \"${NEXT_VERSION}\"/g" $VERSION_FILE
|
||||
|
||||
- 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 tox
|
||||
run: tox -e generate
|
||||
|
||||
- name: Update the change log with the approximate release date
|
||||
run: |
|
||||
# the actual release date on main will be updated at the end of the release workflow
|
||||
date=$(date "+%Y-%m-%d")
|
||||
sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version ${NEXT_VERSION} ($date)/" ${CHANGELOG}
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- name: Create pull request
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
|
||||
run: |
|
||||
message="Prepare patch release for ${PACKAGE_NAME} v${NEXT_VERSION}"
|
||||
branch="opentelemetrybot/patch-${PACKAGE_NAME}-version-to-v${NEXT_VERSION}"
|
||||
|
||||
git commit -a -m "$message"
|
||||
git push origin HEAD:$branch
|
||||
gh pr create --title "[$GITHUB_REF_NAME] $message" \
|
||||
--body "$message." \
|
||||
--head $branch \
|
||||
--base $GITHUB_REF_NAME
|
|
@ -0,0 +1,198 @@
|
|||
name: "[Package] Prepare release"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package:
|
||||
type: choice
|
||||
options:
|
||||
- opentelemetry-propagator-aws-xray
|
||||
- opentelemetry-resource-detector-azure
|
||||
- opentelemetry-sdk-extension-aws
|
||||
- opentelemetry-instrumentation-openai-v2
|
||||
- opentelemetry-instrumentation-vertexai
|
||||
- opentelemetry-instrumentation-google-genai
|
||||
description: 'Package to be released'
|
||||
required: true
|
||||
|
||||
run-name: "[Package][${{ inputs.package }}] Prepare release"
|
||||
jobs:
|
||||
prereqs:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.verify.outputs.version }}
|
||||
changelog: ${{ steps.verify.outputs.changelog }}
|
||||
version_file: ${{ steps.verify.outputs.version_file }}
|
||||
release_branch_name: ${{ steps.verify.outputs.release_branch_name }}
|
||||
next_version: ${{ steps.verify.outputs.next_version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- id: verify
|
||||
name: Verify prerequisites
|
||||
run: |
|
||||
if [[ $GITHUB_REF_NAME != main ]]; then
|
||||
echo this workflow should only be run against main
|
||||
exit 1
|
||||
fi
|
||||
|
||||
path=./$(./scripts/eachdist.py find-package --package ${{ inputs.package }})
|
||||
changelog=$path/CHANGELOG.md
|
||||
|
||||
if [ ! -f $changelog ]; then
|
||||
echo "missing $changelog file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep --quiet "^## Unreleased$" $changelog; then
|
||||
echo the $changelog is missing an \"Unreleased\" section
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version_dev=$(./scripts/eachdist.py version --package ${{ inputs.package }})
|
||||
|
||||
if [[ ! $version_dev =~ ^([0-9]+)\.([0-9]+)[\.|b]{1}([0-9]+).*.dev$ ]]; then
|
||||
echo "unexpected version: $version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version=${version_dev%.dev}
|
||||
|
||||
version_file=$(find $path -type f -path "*version*.py")
|
||||
file_count=$(echo "$version_file" | wc -l)
|
||||
|
||||
if [ "$file_count" -ne 1 ]; then
|
||||
echo "Error: expected one version file, found $file_count"
|
||||
echo "$version_file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
|
||||
# 1.2.3 or 1.2.3rc1
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
release_branch_name="package-release/${{ inputs.package }}/v$major.$minor.x"
|
||||
next_version="$major.$((minor + 1)).0"
|
||||
elif [[ $version =~ ^([0-9]+)\.([0-9]+)b([0-9]+)$ ]]; then
|
||||
# 0.1b1
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
release_branch_name="package-release/${{ inputs.package }}/v$major.${minor}bx"
|
||||
next_version="$major.$((minor + 1))b0"
|
||||
else
|
||||
echo "unexpected version: '$version'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
echo "changelog=$changelog" >> $GITHUB_OUTPUT
|
||||
echo "version_file=$version_file" >> $GITHUB_OUTPUT
|
||||
echo "release_branch_name=$release_branch_name" >> $GITHUB_OUTPUT
|
||||
echo "next_version=$next_version" >> $GITHUB_OUTPUT
|
||||
|
||||
create-pull-request-against-release-branch:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prereqs
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
echo "RELEASE_BRANCH_NAME=${{ needs.prereqs.outputs.release_branch_name }}" >> $GITHUB_ENV
|
||||
echo "VERSION=${{ needs.prereqs.outputs.version }}" >> $GITHUB_ENV
|
||||
echo "CHANGELOG=${{ needs.prereqs.outputs.changelog }}" >> $GITHUB_ENV
|
||||
echo "VERSION_FILE=${{ needs.prereqs.outputs.version_file }}" >> $GITHUB_ENV
|
||||
echo "PACKAGE_NAME=${{ github.event.inputs.package }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Create package release branch
|
||||
run: |
|
||||
git push origin HEAD:$RELEASE_BRANCH_NAME
|
||||
|
||||
- name: Update package version
|
||||
run: |
|
||||
# replace the version in the version file (1.2.3dev -> 1.2.3)
|
||||
sed -i -E "s/__version__\s*=\s*\"${VERSION}\.dev\"/__version__ = \"${VERSION}\"/g" $VERSION_FILE
|
||||
|
||||
- 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 tox
|
||||
run: tox -e generate
|
||||
|
||||
- name: Update the change log with the approximate release date
|
||||
run: |
|
||||
date=$(date "+%Y-%m-%d")
|
||||
sed -Ei "s/^## Unreleased$/## Version ${VERSION} ($date)/" ${CHANGELOG}
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- name: Create pull request against the release branch
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
|
||||
run: |
|
||||
message="Prepare release for ${PACKAGE_NAME} v${VERSION}"
|
||||
branch="opentelemetrybot/prepare-${RELEASE_BRANCH_NAME}"
|
||||
|
||||
git commit -a -m "$message"
|
||||
git push origin HEAD:$branch
|
||||
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
|
||||
--body "$message." \
|
||||
--head $branch \
|
||||
--base $RELEASE_BRANCH_NAME
|
||||
|
||||
create-pull-request-against-main:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prereqs
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
echo "PACKAGE_NAME=${{ github.event.inputs.package }}" >> $GITHUB_ENV
|
||||
echo "VERSION=${{ needs.prereqs.outputs.version }}" >> $GITHUB_ENV
|
||||
echo "VERSION_FILE=${{ needs.prereqs.outputs.version_file }}" >> $GITHUB_ENV
|
||||
echo "NEXT_VERSION=${{ needs.prereqs.outputs.next_version }}" >> $GITHUB_ENV
|
||||
echo "CHANGELOG=${{ needs.prereqs.outputs.changelog }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Update version
|
||||
run: |
|
||||
# replace the version in the version file (1.2.3dev -> 1.3.3.dev)
|
||||
sed -i -E "s/__version__\s*=\s*\"${VERSION}\.dev\"/__version__ = \"${NEXT_VERSION}.dev\"/g" $VERSION_FILE
|
||||
|
||||
- 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 tox
|
||||
run: tox -e generate
|
||||
|
||||
- name: Update the change log on main
|
||||
run: |
|
||||
# the actual release date on main will be updated at the end of the release workflow
|
||||
date=$(date "+%Y-%m-%d")
|
||||
sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version ${VERSION} ($date)/" ${CHANGELOG}
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- name: Create pull request against main
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
|
||||
run: |
|
||||
message="Update ${PACKAGE_NAME} version to v${NEXT_VERSION}"
|
||||
body="Update \`${PACKAGE_NAME}\` version to v\`${NEXT_VERSION}\`."
|
||||
branch="opentelemetrybot/update-${PACKAGE_NAME}-version-to-v${NEXT_VERSION}"
|
||||
|
||||
git commit -a -m "$message"
|
||||
git push origin HEAD:$branch
|
||||
gh pr create --title "$message" \
|
||||
--body "$body" \
|
||||
--head $branch \
|
||||
--base main
|
|
@ -0,0 +1,160 @@
|
|||
name: "[Package] Release"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package:
|
||||
type: choice
|
||||
options:
|
||||
- opentelemetry-propagator-aws-xray
|
||||
- opentelemetry-resource-detector-azure
|
||||
- opentelemetry-sdk-extension-aws
|
||||
- opentelemetry-instrumentation-openai-v2
|
||||
- opentelemetry-instrumentation-vertexai
|
||||
- opentelemetry-instrumentation-google-genai
|
||||
description: 'Package to be released'
|
||||
required: true
|
||||
run-name: "[Package][${{ inputs.package }}] Release"
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
if [[ $GITHUB_REF_NAME != package-release/${{ inputs.package }}* ]]; then
|
||||
echo this workflow should only be run against package-release/${{ inputs.package }}* branches
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
version=$(./scripts/eachdist.py version --package ${{ inputs.package }})
|
||||
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
patch="${BASH_REMATCH[3]}"
|
||||
if [[ $patch != 0 ]]; then
|
||||
prior_version_when_patch="${major}.${minor}.$((patch - 1))"
|
||||
fi
|
||||
elif [[ $version =~ ^([0-9]+)\.([0-9]+)b([0-9]+)$ ]]; then
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
patch="${BASH_REMATCH[3]}"
|
||||
|
||||
if [[ $patch != 0 ]]; then
|
||||
prior_version_when_patch="${major}.${minor}b$((patch - 1))"
|
||||
fi
|
||||
else
|
||||
echo "unexpected version: $version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
path=$(./scripts/eachdist.py find-package --package ${{ inputs.package }})
|
||||
echo "CHANGELOG=./$path/CHANGELOG.md" >> $GITHUB_ENV
|
||||
echo "PACKAGE_NAME=${{ inputs.package }}" >> $GITHUB_ENV
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
echo "RELEASE_TAG=${{ inputs.package }}==$version" >> $GITHUB_ENV
|
||||
echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV
|
||||
|
||||
# check out main branch to verify there won't be problems with merging the change log
|
||||
# at the end of this workflow
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Check that change log update was merged to main
|
||||
run: |
|
||||
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
|
||||
# not making a patch release
|
||||
if ! grep --quiet "^## Version ${VERSION}" ${CHANGELOG}; then
|
||||
echo the pull request generated by prepare-release-branch.yml needs to be merged first
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# back to the release branch
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# next few steps publish to pypi
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Build wheels
|
||||
run: ./scripts/build_a_package.sh
|
||||
|
||||
- name: Install twine
|
||||
run: |
|
||||
pip install twine
|
||||
|
||||
# The step below publishes to testpypi in order to catch any issues
|
||||
# with the package configuration that would cause a failure to upload
|
||||
# to pypi. One example of such a failure is if a classifier is
|
||||
# rejected by pypi (e.g "3 - Beta"). This would cause a failure during the
|
||||
# middle of the package upload causing the action to fail, and certain packages
|
||||
# might have already been updated, this would be bad.
|
||||
# EDIT: 5/31/2024 - TestPypi now requires a verified email. Commenting out as a temporary measure
|
||||
# until we found TestPypi credentials.
|
||||
# - name: Publish to TestPyPI
|
||||
# env:
|
||||
# TWINE_USERNAME: '__token__'
|
||||
# TWINE_PASSWORD: ${{ secrets.test_pypi_token }}
|
||||
# run: |
|
||||
# twine upload --repository testpypi --skip-existing --verbose dist/*
|
||||
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
TWINE_USERNAME: '__token__'
|
||||
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
||||
run: |
|
||||
twine upload --skip-existing --verbose dist/*
|
||||
|
||||
- name: Generate release notes
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./scripts/generate_release_notes.sh
|
||||
|
||||
- name: Create GitHub release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create --target $GITHUB_REF_NAME \
|
||||
--title "${PACKAGE_NAME} ${VERSION}" \
|
||||
--notes-file /tmp/release-notes.txt \
|
||||
--discussion-category announcements \
|
||||
$RELEASE_TAG
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Copy change log updates to main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./scripts/merge_changelog_to_main.sh
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- name: Create pull request against main
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
|
||||
run: |
|
||||
message="Copy changelog updates from $GITHUB_REF_NAME"
|
||||
body="Copy changelog updates from \`$GITHUB_REF_NAME\`."
|
||||
branch="opentelemetrybot/changelog-${GITHUB_REF_NAME//\//-}"
|
||||
|
||||
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
|
||||
if git diff --quiet; then
|
||||
echo there are no updates needed to the change log on main, not creating pull request
|
||||
exit 0 # success
|
||||
fi
|
||||
fi
|
||||
|
||||
git commit -a -m "$message"
|
||||
git push origin HEAD:$branch
|
||||
gh pr create --title "$message" \
|
||||
--body "$body" \
|
||||
--head $branch \
|
||||
--base main
|
|
@ -6,7 +6,7 @@ jobs:
|
|||
prepare-patch-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: |
|
||||
if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x-0\.[0-9]+bx$ ]]; then
|
||||
|
@ -40,17 +40,21 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
stable_version_prev="$stable_major_minor.$((stable_patch))"
|
||||
unstable_version_prev="0.${unstable_minor}b$((unstable_patch))"
|
||||
stable_version="$stable_major_minor.$((stable_patch + 1))"
|
||||
unstable_version="0.${unstable_minor}b$((unstable_patch + 1))"
|
||||
|
||||
echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV
|
||||
echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV
|
||||
echo "STABLE_VERSION_PREV=$stable_version_prev" >> $GITHUB_ENV
|
||||
echo "UNSTABLE_VERSION_PREV=$unstable_version_prev" >> $GITHUB_ENV
|
||||
|
||||
- name: Update version
|
||||
run: .github/scripts/update-version.sh $STABLE_VERSION $UNSTABLE_VERSION
|
||||
run: .github/scripts/update-version-patch.sh $STABLE_VERSION $UNSTABLE_VERSION $STABLE_VERSION_PREV $UNSTABLE_VERSION_PREV
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install tox
|
||||
|
@ -67,6 +71,7 @@ jobs:
|
|||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- name: Create pull request
|
||||
id: create_pr
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
|
||||
|
@ -76,7 +81,15 @@ jobs:
|
|||
|
||||
git commit -a -m "$message"
|
||||
git push origin HEAD:$branch
|
||||
gh pr create --title "[$GITHUB_REF_NAME] $message" \
|
||||
pr_url=$(gh pr create --title "[$GITHUB_REF_NAME] $message" \
|
||||
--body "$message." \
|
||||
--head $branch \
|
||||
--base $GITHUB_REF_NAME
|
||||
--base $GITHUB_REF_NAME)
|
||||
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Add prepare-release label to PR
|
||||
if: steps.create_pr.outputs.pr_url != ''
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh pr edit ${{ steps.create_pr.outputs.pr_url }} --add-label "prepare-release"
|
||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
prereqs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Verify prerequisites
|
||||
env:
|
||||
|
@ -39,7 +39,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs: prereqs
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create release branch
|
||||
env:
|
||||
|
@ -77,7 +77,7 @@ jobs:
|
|||
run: .github/scripts/update-version.sh $STABLE_VERSION $UNSTABLE_VERSION
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install tox
|
||||
|
@ -94,6 +94,7 @@ jobs:
|
|||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- name: Create pull request against the release branch
|
||||
id: create_release_branch_pr
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
|
||||
|
@ -103,16 +104,24 @@ jobs:
|
|||
|
||||
git commit -a -m "$message"
|
||||
git push origin HEAD:$branch
|
||||
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
|
||||
pr_url=$(gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
|
||||
--body "$message." \
|
||||
--head $branch \
|
||||
--base $RELEASE_BRANCH_NAME
|
||||
--base $RELEASE_BRANCH_NAME)
|
||||
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Add prepare-release label to PR
|
||||
if: steps.create_release_branch_pr.outputs.pr_url != ''
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh pr edit ${{ steps.create_release_branch_pr.outputs.pr_url }} --add-label "prepare-release"
|
||||
|
||||
create-pull-request-against-main:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prereqs
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set environment variables
|
||||
env:
|
||||
|
@ -161,7 +170,7 @@ jobs:
|
|||
run: .github/scripts/update-version.sh $STABLE_NEXT_VERSION $UNSTABLE_NEXT_VERSION
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install tox
|
||||
|
@ -179,6 +188,7 @@ jobs:
|
|||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- name: Create pull request against main
|
||||
id: create_main_pr
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
|
||||
|
@ -189,7 +199,15 @@ jobs:
|
|||
|
||||
git commit -a -m "$message"
|
||||
git push origin HEAD:$branch
|
||||
gh pr create --title "$message" \
|
||||
pr_url=$(gh pr create --title "$message" \
|
||||
--body "$body" \
|
||||
--head $branch \
|
||||
--base main
|
||||
--base main)
|
||||
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Add prepare-release label to PR
|
||||
if: steps.create_main_pr.outputs.pr_url != ''
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh pr edit ${{ steps.create_main_pr.outputs.pr_url }} --add-label "prepare-release"
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
name: Publish a Package from Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'opentelemetry-*==[1-9]*.*'
|
||||
|
||||
jobs:
|
||||
publish-a-package:
|
||||
name: Publish package from tag
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- name: Log tag that triggered publish workflow
|
||||
run: echo "Attempting to publish package from tag $GITHUB_REF"
|
||||
- name: Build wheel for tag
|
||||
run: ./scripts/build_a_package.sh
|
||||
- name: Install twine
|
||||
run: |
|
||||
pip install twine
|
||||
# We don't need to publish to TestPyPI because we only publish 1 package.
|
||||
# If it fails no other work needs to be reversed.
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
TWINE_USERNAME: '__token__'
|
||||
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
||||
run: |
|
||||
twine upload --skip-existing --verbose dist/*
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
|
@ -42,15 +42,9 @@ jobs:
|
|||
|
||||
echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV
|
||||
echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV
|
||||
|
||||
echo "CHANGELOG=CHANGELOG.md" >> $GITHUB_ENV
|
||||
echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV
|
||||
|
||||
# check out main branch to verify there won't be problems with merging the change log
|
||||
# at the end of this workflow
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- run: |
|
||||
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
|
||||
# not making a patch release
|
||||
|
@ -60,13 +54,19 @@ jobs:
|
|||
fi
|
||||
fi
|
||||
|
||||
# check out main branch to verify there won't be problems with merging the change log
|
||||
# at the end of this workflow
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
# back to the release branch
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# next few steps publish to pypi
|
||||
- uses: actions/setup-python@v1
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Build wheels
|
||||
run: ./scripts/build.sh
|
||||
|
@ -81,6 +81,7 @@ jobs:
|
|||
# rejected by pypi (e.g "3 - Beta"). This would cause a failure during the
|
||||
# middle of the package upload causing the action to fail, and certain packages
|
||||
# might have already been updated, this would be bad.
|
||||
|
||||
- name: Publish to TestPyPI
|
||||
env:
|
||||
TWINE_USERNAME: '__token__'
|
||||
|
@ -99,23 +100,8 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# conditional block not indented because of the heredoc
|
||||
if [[ ! -z $PRIOR_VERSION_WHEN_PATCH ]]; then
|
||||
cat > /tmp/release-notes.txt << EOF
|
||||
This is a patch release on the previous $PRIOR_VERSION_WHEN_PATCH release, fixing the issue(s) below.
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
# CHANGELOG_SECTION.md is also used at the end of the release workflow
|
||||
# for copying the change log updates to main
|
||||
sed -n "0,/^## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} /d;/^## Version /q;p" CHANGELOG.md \
|
||||
> /tmp/CHANGELOG_SECTION.md
|
||||
|
||||
# the complex perl regex is needed because markdown docs render newlines as soft wraps
|
||||
# while release notes render them as line breaks
|
||||
perl -0pe 's/(?<!\n)\n *(?!\n)(?![-*] )(?![1-9]+\. )/ /g' /tmp/CHANGELOG_SECTION.md \
|
||||
>> /tmp/release-notes.txt
|
||||
echo "VERSION=${STABLE_VERSION}\/${UNSTABLE_VERSION}" >> $GITHUB_ENV
|
||||
./scripts/generate_release_notes.sh
|
||||
|
||||
- name: Create GitHub release
|
||||
env:
|
||||
|
@ -127,79 +113,8 @@ jobs:
|
|||
--discussion-category announcements \
|
||||
v$UNSTABLE_VERSION
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# the step below is creating a pull request against main
|
||||
ref: main
|
||||
|
||||
- name: Copy change log updates to main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
|
||||
# this was not a patch release, so the version exists already in the CHANGELOG.md
|
||||
|
||||
# update the release date
|
||||
date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
|
||||
sed -Ei "s/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} .*/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md
|
||||
|
||||
# the entries are copied over from the release branch to support workflows
|
||||
# where change log entries may be updated after preparing the release branch
|
||||
|
||||
# copy the portion above the release, up to and including the heading
|
||||
sed -n "0,/^## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/p" CHANGELOG.md > /tmp/CHANGELOG.md
|
||||
|
||||
# copy the release notes
|
||||
cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md
|
||||
|
||||
# copy the portion below the release
|
||||
sed -n "0,/^## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} /d;0,/^## Version /{/^## Version/!d};p" CHANGELOG.md \
|
||||
>> /tmp/CHANGELOG.md
|
||||
|
||||
# update the real CHANGELOG.md
|
||||
cp /tmp/CHANGELOG.md CHANGELOG.md
|
||||
else
|
||||
# this was a patch release, so the version does not exist already in the CHANGELOG.md
|
||||
|
||||
# copy the portion above the top-most release, not including the heading
|
||||
sed -n "0,/^## Version /{ /^## Version /!p }" CHANGELOG.md > /tmp/CHANGELOG.md
|
||||
|
||||
# add the heading
|
||||
date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
|
||||
echo "## Version ${STABLE_VERSION}/${UNSTABLE_VERSION} ($date)" >> /tmp/CHANGELOG.md
|
||||
|
||||
# copy the release notes
|
||||
cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md
|
||||
|
||||
# copy the portion starting from the top-most release
|
||||
sed -n "/^## Version /,\$p" CHANGELOG.md >> /tmp/CHANGELOG.md
|
||||
|
||||
# update the real CHANGELOG.md
|
||||
cp /tmp/CHANGELOG.md CHANGELOG.md
|
||||
fi
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- name: Create pull request against main
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
|
||||
run: |
|
||||
message="Copy change log updates from $GITHUB_REF_NAME"
|
||||
body="Copy log updates from \`$GITHUB_REF_NAME\`."
|
||||
branch="opentelemetrybot/copy-change-log-updates-from-${GITHUB_REF_NAME//\//-}"
|
||||
|
||||
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
|
||||
if git diff --quiet; then
|
||||
echo there are no updates needed to the change log on main, not creating pull request
|
||||
exit 0 # success
|
||||
fi
|
||||
fi
|
||||
|
||||
git commit -a -m "$message"
|
||||
git push origin HEAD:$branch
|
||||
gh pr create --title "$message" \
|
||||
--body "$body" \
|
||||
--head $branch \
|
||||
--base main
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
name: Contrib Repo Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
env:
|
||||
CORE_REPO_SHA: e98af82ff0ebe7e687fda265093aa576cd9ba80f
|
||||
|
||||
jobs:
|
||||
misc:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
tox-environment: [ "docker-tests", "spellcheck", "lint", "docs", "generate" ]
|
||||
name: ${{ matrix.tox-environment }}
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install tox
|
||||
run: pip install tox
|
||||
- name: Install libsnappy-dev
|
||||
if: ${{ matrix.tox-environment == 'lint' }}
|
||||
run: sudo apt-get install -y libsnappy-dev
|
||||
- name: Cache tox environment
|
||||
# Preserves .tox directory between runs for faster installs
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: |
|
||||
.tox
|
||||
~/.cache/pip
|
||||
key: v7-misc-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt', 'gen-requirements.txt', 'docs-requirements.txt') }}
|
||||
- name: run tox
|
||||
run: tox -e ${{ matrix.tox-environment }}
|
||||
- name: Ensure generated code is up to date
|
||||
if: matrix.tox-environment == 'generate'
|
||||
run: git diff --exit-code || (echo 'Generated code is out of date, please run "tox -e generate" and commit the changes in this PR.' && exit 1)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,960 @@
|
|||
# Do not edit this file.
|
||||
# This file is generated automatically by executing tox -e generate-workflows
|
||||
|
||||
name: Test 2
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||
# For PRs you can change the inner fallback ('main')
|
||||
# For pushes you change the outer fallback ('main')
|
||||
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
|
||||
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||
'main'
|
||||
) || 'main' }}
|
||||
CONTRIB_REPO_SHA: main
|
||||
PIP_EXISTS_ACTION: w
|
||||
|
||||
jobs:
|
||||
|
||||
py312-test-instrumentation-aio-pika-1_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-1 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-instrumentation-aio-pika-1 -- -ra
|
||||
|
||||
py312-test-instrumentation-aio-pika-2_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-2 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-instrumentation-aio-pika-2 -- -ra
|
||||
|
||||
py312-test-instrumentation-aio-pika-3_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-3 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-instrumentation-aio-pika-3 -- -ra
|
||||
|
||||
py313-test-instrumentation-aio-pika-0_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-0 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-aio-pika-0 -- -ra
|
||||
|
||||
py313-test-instrumentation-aio-pika-1_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-1 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-aio-pika-1 -- -ra
|
||||
|
||||
py313-test-instrumentation-aio-pika-2_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-2 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-aio-pika-2 -- -ra
|
||||
|
||||
py313-test-instrumentation-aio-pika-3_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-3 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-aio-pika-3 -- -ra
|
||||
|
||||
pypy3-test-instrumentation-aio-pika-0_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-0 pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-instrumentation-aio-pika-0 -- -ra
|
||||
|
||||
pypy3-test-instrumentation-aio-pika-1_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-1 pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-instrumentation-aio-pika-1 -- -ra
|
||||
|
||||
pypy3-test-instrumentation-aio-pika-2_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-2 pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-instrumentation-aio-pika-2 -- -ra
|
||||
|
||||
pypy3-test-instrumentation-aio-pika-3_ubuntu-latest:
|
||||
name: instrumentation-aio-pika-3 pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-instrumentation-aio-pika-3 -- -ra
|
||||
|
||||
py39-test-instrumentation-aiokafka_ubuntu-latest:
|
||||
name: instrumentation-aiokafka 3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py39-test-instrumentation-aiokafka -- -ra
|
||||
|
||||
py310-test-instrumentation-aiokafka_ubuntu-latest:
|
||||
name: instrumentation-aiokafka 3.10 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py310-test-instrumentation-aiokafka -- -ra
|
||||
|
||||
py311-test-instrumentation-aiokafka_ubuntu-latest:
|
||||
name: instrumentation-aiokafka 3.11 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py311-test-instrumentation-aiokafka -- -ra
|
||||
|
||||
py312-test-instrumentation-aiokafka_ubuntu-latest:
|
||||
name: instrumentation-aiokafka 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-instrumentation-aiokafka -- -ra
|
||||
|
||||
py313-test-instrumentation-aiokafka_ubuntu-latest:
|
||||
name: instrumentation-aiokafka 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-aiokafka -- -ra
|
||||
|
||||
pypy3-test-instrumentation-aiokafka_ubuntu-latest:
|
||||
name: instrumentation-aiokafka pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-instrumentation-aiokafka -- -ra
|
||||
|
||||
py39-test-instrumentation-kafka-python_ubuntu-latest:
|
||||
name: instrumentation-kafka-python 3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py39-test-instrumentation-kafka-python -- -ra
|
||||
|
||||
py310-test-instrumentation-kafka-python_ubuntu-latest:
|
||||
name: instrumentation-kafka-python 3.10 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py310-test-instrumentation-kafka-python -- -ra
|
||||
|
||||
py311-test-instrumentation-kafka-python_ubuntu-latest:
|
||||
name: instrumentation-kafka-python 3.11 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py311-test-instrumentation-kafka-python -- -ra
|
||||
|
||||
py39-test-instrumentation-kafka-pythonng_ubuntu-latest:
|
||||
name: instrumentation-kafka-pythonng 3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py39-test-instrumentation-kafka-pythonng -- -ra
|
||||
|
||||
py310-test-instrumentation-kafka-pythonng_ubuntu-latest:
|
||||
name: instrumentation-kafka-pythonng 3.10 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py310-test-instrumentation-kafka-pythonng -- -ra
|
||||
|
||||
py311-test-instrumentation-kafka-pythonng_ubuntu-latest:
|
||||
name: instrumentation-kafka-pythonng 3.11 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py311-test-instrumentation-kafka-pythonng -- -ra
|
||||
|
||||
py312-test-instrumentation-kafka-pythonng_ubuntu-latest:
|
||||
name: instrumentation-kafka-pythonng 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-instrumentation-kafka-pythonng -- -ra
|
||||
|
||||
py313-test-instrumentation-kafka-pythonng_ubuntu-latest:
|
||||
name: instrumentation-kafka-pythonng 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-kafka-pythonng -- -ra
|
||||
|
||||
pypy3-test-instrumentation-kafka-python_ubuntu-latest:
|
||||
name: instrumentation-kafka-python pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-instrumentation-kafka-python -- -ra
|
||||
|
||||
pypy3-test-instrumentation-kafka-pythonng_ubuntu-latest:
|
||||
name: instrumentation-kafka-pythonng pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-instrumentation-kafka-pythonng -- -ra
|
||||
|
||||
py39-test-instrumentation-confluent-kafka_ubuntu-latest:
|
||||
name: instrumentation-confluent-kafka 3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py39-test-instrumentation-confluent-kafka -- -ra
|
||||
|
||||
py310-test-instrumentation-confluent-kafka_ubuntu-latest:
|
||||
name: instrumentation-confluent-kafka 3.10 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py310-test-instrumentation-confluent-kafka -- -ra
|
||||
|
||||
py311-test-instrumentation-confluent-kafka_ubuntu-latest:
|
||||
name: instrumentation-confluent-kafka 3.11 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py311-test-instrumentation-confluent-kafka -- -ra
|
||||
|
||||
py312-test-instrumentation-confluent-kafka_ubuntu-latest:
|
||||
name: instrumentation-confluent-kafka 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-instrumentation-confluent-kafka -- -ra
|
||||
|
||||
py313-test-instrumentation-confluent-kafka_ubuntu-latest:
|
||||
name: instrumentation-confluent-kafka 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-confluent-kafka -- -ra
|
||||
|
||||
py39-test-instrumentation-asyncio_ubuntu-latest:
|
||||
name: instrumentation-asyncio 3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py39-test-instrumentation-asyncio -- -ra
|
||||
|
||||
py310-test-instrumentation-asyncio_ubuntu-latest:
|
||||
name: instrumentation-asyncio 3.10 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py310-test-instrumentation-asyncio -- -ra
|
||||
|
||||
py311-test-instrumentation-asyncio_ubuntu-latest:
|
||||
name: instrumentation-asyncio 3.11 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py311-test-instrumentation-asyncio -- -ra
|
||||
|
||||
py312-test-instrumentation-asyncio_ubuntu-latest:
|
||||
name: instrumentation-asyncio 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-instrumentation-asyncio -- -ra
|
||||
|
||||
py313-test-instrumentation-asyncio_ubuntu-latest:
|
||||
name: instrumentation-asyncio 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-asyncio -- -ra
|
||||
|
||||
py39-test-instrumentation-cassandra_ubuntu-latest:
|
||||
name: instrumentation-cassandra 3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py39-test-instrumentation-cassandra -- -ra
|
||||
|
||||
py310-test-instrumentation-cassandra_ubuntu-latest:
|
||||
name: instrumentation-cassandra 3.10 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py310-test-instrumentation-cassandra -- -ra
|
||||
|
||||
py311-test-instrumentation-cassandra_ubuntu-latest:
|
||||
name: instrumentation-cassandra 3.11 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py311-test-instrumentation-cassandra -- -ra
|
||||
|
||||
py312-test-instrumentation-cassandra_ubuntu-latest:
|
||||
name: instrumentation-cassandra 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-instrumentation-cassandra -- -ra
|
||||
|
||||
py313-test-instrumentation-cassandra_ubuntu-latest:
|
||||
name: instrumentation-cassandra 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-instrumentation-cassandra -- -ra
|
||||
|
||||
pypy3-test-instrumentation-cassandra_ubuntu-latest:
|
||||
name: instrumentation-cassandra pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-instrumentation-cassandra -- -ra
|
||||
|
||||
py39-test-processor-baggage_ubuntu-latest:
|
||||
name: processor-baggage 3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py39-test-processor-baggage -- -ra
|
||||
|
||||
py310-test-processor-baggage_ubuntu-latest:
|
||||
name: processor-baggage 3.10 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py310-test-processor-baggage -- -ra
|
||||
|
||||
py311-test-processor-baggage_ubuntu-latest:
|
||||
name: processor-baggage 3.11 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py311-test-processor-baggage -- -ra
|
||||
|
||||
py312-test-processor-baggage_ubuntu-latest:
|
||||
name: processor-baggage 3.12 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
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-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py312-test-processor-baggage -- -ra
|
||||
|
||||
py313-test-processor-baggage_ubuntu-latest:
|
||||
name: processor-baggage 3.13 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.13
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e py313-test-processor-baggage -- -ra
|
||||
|
||||
pypy3-test-processor-baggage_ubuntu-latest:
|
||||
name: processor-baggage pypy-3.9 Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repo @ SHA - ${{ github.sha }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python pypy-3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "pypy-3.9"
|
||||
|
||||
- name: Install tox
|
||||
run: pip install tox-uv
|
||||
|
||||
- name: Run tests
|
||||
run: tox -e pypy3-test-processor-baggage -- -ra
|
|
@ -58,3 +58,6 @@ _build/
|
|||
# mypy
|
||||
.mypy_cache/
|
||||
target
|
||||
|
||||
# Benchmark result files
|
||||
*-benchmark.json
|
||||
|
|
19
.isort.cfg
19
.isort.cfg
|
@ -1,19 +0,0 @@
|
|||
[settings]
|
||||
include_trailing_comma=True
|
||||
force_grid_wrap=0
|
||||
use_parentheses=True
|
||||
line_length=79
|
||||
profile=black
|
||||
|
||||
; 3 stands for Vertical Hanging Indent, e.g.
|
||||
; from third_party import (
|
||||
; lib1,
|
||||
; lib2,
|
||||
; lib3,
|
||||
; )
|
||||
; docs: https://github.com/timothycrosley/isort#multi-line-output-modes
|
||||
multi_line_output=3
|
||||
skip=target
|
||||
skip_glob=**/gen/*,.venv*/*,venv*/*,.tox/*
|
||||
known_first_party=opentelemetry
|
||||
known_third_party=psutil,pytest,redis,redis_opentracing
|
|
@ -0,0 +1,15 @@
|
|||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.6.9
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff
|
||||
args: ["--fix", "--show-fixes"]
|
||||
# Run the formatter.
|
||||
- id: ruff-format
|
||||
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||
# uv version.
|
||||
rev: 0.6.0
|
||||
hooks:
|
||||
- id: uv-lock
|
|
@ -7,7 +7,7 @@ extension-pkg-whitelist=cassandra
|
|||
|
||||
# Add list of files or directories to be excluded. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS,gen,Dockerfile,docker-compose.yml,README.md,requirements.txt,docs
|
||||
ignore=CVS,gen,Dockerfile,docker-compose.yml,README.md,requirements.txt,docs,.venv,site-packages,.tox
|
||||
|
||||
# Add files or directories matching the regex patterns to be excluded. The
|
||||
# regex matches against base names, not paths.
|
||||
|
@ -45,6 +45,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.9
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
|
@ -81,6 +84,7 @@ disable=missing-docstring,
|
|||
missing-module-docstring, # temp-pylint-upgrade
|
||||
import-error, # needed as a workaround as reported here: https://github.com/open-telemetry/opentelemetry-python-contrib/issues/290
|
||||
cyclic-import,
|
||||
not-context-manager
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
|
@ -491,4 +495,4 @@ min-public-methods=2
|
|||
|
||||
# Exceptions that will emit a warning when being caught. Defaults to
|
||||
# "Exception".
|
||||
overgeneral-exceptions=Exception
|
||||
overgeneral-exceptions=builtins.Exception
|
||||
|
|
|
@ -6,9 +6,10 @@ sphinx:
|
|||
configuration: docs/conf.py
|
||||
|
||||
build:
|
||||
image: latest
|
||||
os: "ubuntu-24.04"
|
||||
tools:
|
||||
python: "3.11"
|
||||
|
||||
python:
|
||||
version: 3.8
|
||||
install:
|
||||
- requirements: docs-requirements.txt
|
||||
- requirements: rtd-requirements.txt
|
||||
|
|
672
CHANGELOG.md
672
CHANGELOG.md
|
@ -5,25 +5,623 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
> [!NOTE]
|
||||
> The following components are released independently and maintain individual CHANGELOG files.
|
||||
> Use [this search for a list of all CHANGELOG.md files in this repo](https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-python-contrib+path%3A**%2FCHANGELOG.md&type=code).
|
||||
|
||||
## Unreleased
|
||||
|
||||
## Version 1.35.0/0.56b0 (2025-07-11)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-pika` Added instrumentation for All `SelectConnection` adapters
|
||||
([#3584](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3584))
|
||||
- `opentelemetry-instrumentation-tornado` Add support for `WebSocketHandler` instrumentation
|
||||
([#3498](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3498))
|
||||
- `opentelemetry-util-http` Added support for redacting specific url query string values and url credentials in instrumentations
|
||||
([#3508](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3508))
|
||||
- `opentelemetry-instrumentation-pymongo` `aggregate` and `getMore` capture statements support
|
||||
([#3601](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3601))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-asgi`: fix excluded_urls in instrumentation-asgi
|
||||
([#3567](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3567))
|
||||
- `opentelemetry-resource-detector-containerid`: make it more quiet on platforms without cgroups
|
||||
([#3579](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3579))
|
||||
|
||||
## Version 1.34.0/0.55b0 (2025-06-04)
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-system-metrics`: fix loading on Google Cloud Run
|
||||
([#3533](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3533))
|
||||
- `opentelemetry-instrumentation-fastapi`: fix wrapping of middlewares
|
||||
([#3012](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3012))
|
||||
- `opentelemetry-instrumentation-starlette` Remove max version constraint on starlette
|
||||
([#3456](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3456))
|
||||
- `opentelemetry-instrumentation-starlette` Fix memory leak and double middleware
|
||||
([#3529](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3529))
|
||||
- `opentelemetry-instrumentation-urllib3`: proper bucket boundaries in stable semconv http duration metrics
|
||||
([#3518](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3518))
|
||||
- `opentelemetry-instrumentation-urllib`: proper bucket boundaries in stable semconv http duration metrics
|
||||
([#3519](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3519))
|
||||
- `opentelemetry-instrumentation-falcon`: proper bucket boundaries in stable semconv http duration
|
||||
([#3525](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3525))
|
||||
- `opentelemetry-instrumentation-wsgi`: add explicit http duration buckets for stable semconv
|
||||
([#3527](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3527))
|
||||
- `opentelemetry-instrumentation-asgi`: add explicit http duration buckets for stable semconv
|
||||
([#3526](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3526))
|
||||
- `opentelemetry-instrumentation-flask`: proper bucket boundaries in stable semconv http duration
|
||||
([#3523](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3523))
|
||||
- `opentelemetry-instrumentation-django`: proper bucket boundaries in stable semconv http duration
|
||||
([#3524](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3524))
|
||||
- `opentelemetry-instrumentation-grpc`: support non-list interceptors
|
||||
([#3520](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3520))
|
||||
- `opentelemetry-instrumentation-botocore` Ensure spans end on early stream closure for Bedrock Streaming APIs
|
||||
([#3481](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3481))
|
||||
- `opentelemetry-instrumentation-sqlalchemy` Respect suppress_instrumentation functionality
|
||||
([#3477](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3477))
|
||||
- `opentelemetry-instrumentation-botocore`: fix handling of tool input in Bedrock ConverseStream
|
||||
([#3544](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3544))
|
||||
- `opentelemetry-instrumentation-botocore` Add type check when extracting tool use from Bedrock request message content
|
||||
([#3548](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3548))
|
||||
- `opentelemetry-instrumentation-dbapi` Respect suppress_instrumentation functionality ([#3460](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3460))
|
||||
- `opentelemetry-resource-detector-container` Correctly parse container id when using systemd and cgroupsv1
|
||||
([#3429](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3429))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- `opentelemetry-instrumentation-botocore` Use `cloud.region` instead of `aws.region` span attribute as per semantic conventions.
|
||||
([#3474](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3474))
|
||||
- `opentelemetry-instrumentation-fastapi`: Drop support for FastAPI versions earlier than `0.92`
|
||||
([#3012](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3012))
|
||||
- `opentelemetry-resource-detector-container`: rename package name to `opentelemetry-resource-detector-containerid`
|
||||
([#3536](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3536))
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-aiohttp-client` Add support for HTTP metrics
|
||||
([#3517](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3517))
|
||||
- `opentelemetry-instrumentation-httpx` Add support for HTTP metrics
|
||||
([#3513](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3513))
|
||||
- `opentelemetry-instrumentation` Allow re-raising exception when instrumentation fails
|
||||
([#3545](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3545))
|
||||
- `opentelemetry-instrumentation-aiokafka` Add instrumentation of `consumer.getmany` (batch)
|
||||
([#3257](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3257))
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Drop support for Python 3.8, bump baseline to Python 3.9.
|
||||
([#3399](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3399))
|
||||
|
||||
## Version 1.33.0/0.54b0 (2025-05-09)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-requests` Support explicit_bucket_boundaries_advisory in duration metrics
|
||||
([#3464](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3464))
|
||||
- `opentelemetry-instrumentation-redis` Add support for redis client-specific instrumentation.
|
||||
([#3143](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3143))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation` Catch `ModuleNotFoundError` when the library is not installed
|
||||
and log as debug instead of exception
|
||||
([#3423](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3423))
|
||||
- `opentelemetry-instrumentation-asyncio` Fix duplicate instrumentation
|
||||
([#3383](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/3383))
|
||||
- `opentelemetry-instrumentation-botocore` Add GenAI instrumentation for additional Bedrock models for InvokeModel API
|
||||
([#3419](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3419))
|
||||
- `opentelemetry-instrumentation` don't print duplicated conflict log error message
|
||||
([#3432](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3432))
|
||||
- `opentelemetry-instrumentation-grpc` Check for None result in gRPC
|
||||
([#3380](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3381))
|
||||
- `opentelemetry-instrumentation-[asynclick/click]` Add missing opentelemetry-instrumentation dep
|
||||
([#3447](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3447))
|
||||
- `opentelemetry-instrumentation-botocore` Capture server attributes for botocore API calls
|
||||
([#3448](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3448))
|
||||
|
||||
## Version 1.32.0/0.53b0 (2025-04-10)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-asyncclick`: new instrumentation to trace asyncclick commands
|
||||
([#3319](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3319))
|
||||
- `opentelemetry-instrumentation-botocore` Add support for GenAI tool events using Amazon Nova models and `InvokeModel*` APIs
|
||||
([#3385](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3385))
|
||||
- `opentelemetry-instrumentation` Make auto instrumentation use the same dependency resolver as manual instrumentation does
|
||||
([#3202](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3202))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation` Fix client address is set to server address in new semconv
|
||||
([#3354](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3354))
|
||||
- `opentelemetry-instrumentation-dbapi`, `opentelemetry-instrumentation-django`,
|
||||
`opentelemetry-instrumentation-sqlalchemy`: Fix sqlcomment for non string query and composable object.
|
||||
([#3113](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3113))
|
||||
- `opentelemetry-instrumentation-grpc` Fix error when using gprc versions <= 1.50.0 with unix sockets.
|
||||
([[#3393](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/3393)])
|
||||
- `opentelemetry-instrumentation-asyncio` Fix duplicate instrumentation.
|
||||
([[#3383](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/3383)])
|
||||
- `opentelemetry-instrumentation-aiokafka` Fix send_and_wait method no headers kwargs error.
|
||||
([[#3332](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3332)])
|
||||
|
||||
## Version 1.31.0/0.52b0 (2025-03-12)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-openai-v2` Update doc for OpenAI Instrumentation to support OpenAI Compatible Platforms
|
||||
([#3279](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3279))
|
||||
- `opentelemetry-instrumentation-system-metrics` Add `process` metrics and deprecated `process.runtime` prefixed ones
|
||||
([#3250](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3250))
|
||||
- `opentelemetry-instrumentation-botocore` Add support for GenAI user events and lazy initialize tracer
|
||||
([#3258](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3258))
|
||||
- `opentelemetry-instrumentation-botocore` Add support for GenAI system events
|
||||
([#3266](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3266))
|
||||
- `opentelemetry-instrumentation-botocore` Add support for GenAI choice events
|
||||
([#3275](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3275))
|
||||
- `opentelemetry-instrumentation-botocore` Add support for GenAI tool events
|
||||
([#3302](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3302))
|
||||
- `opentelemetry-instrumentation-botocore` Add support for GenAI metrics
|
||||
([#3326](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3326))
|
||||
- `opentelemetry-instrumentation` make it simpler to initialize auto-instrumentation programmatically
|
||||
([#3273](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3273))
|
||||
- Add `opentelemetry-instrumentation-vertexai>=2.0b0` to `opentelemetry-bootstrap`
|
||||
([#3307](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3307))
|
||||
- Loosen `opentelemetry-instrumentation-starlette[instruments]` specifier
|
||||
([#3304](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3304))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-redis` Add missing entry in doc string for `def _instrument`
|
||||
([#3247](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3247))
|
||||
- `opentelemetry-instrumentation-botocore` sns-extension: Change destination name attribute
|
||||
to match topic ARN and redact phone number from attributes
|
||||
([#3249](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3249))
|
||||
- `opentelemetry-instrumentation-asyncpg` Fix fallback for empty queries.
|
||||
([#3253](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3253))
|
||||
- `opentelemetry-instrumentation` Fix a traceback in sqlcommenter when psycopg connection pooling is enabled.
|
||||
([#3309](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3309))
|
||||
- `opentelemetry-instrumentation-threading` Fix broken context typehints
|
||||
([#3322](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3322))
|
||||
- `opentelemetry-instrumentation-requests` always record span status code in duration metric
|
||||
([#3323](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3323))
|
||||
|
||||
## Version 1.30.0/0.51b0 (2025-02-03)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-confluent-kafka` Add support for confluent-kafka <=2.7.0
|
||||
([#3100](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3100))
|
||||
- Add support to database stability opt-in in `_semconv` utilities and add tests
|
||||
([#3111](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3111))
|
||||
- `opentelemetry-instrumentation-urllib` Add `py.typed` file to enable PEP 561
|
||||
([#3131](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3131))
|
||||
- `opentelemetry-opentelemetry-pymongo` Add `py.typed` file to enable PEP 561
|
||||
([#3136](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3136))
|
||||
- `opentelemetry-opentelemetry-requests` Add `py.typed` file to enable PEP 561
|
||||
([#3135](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3135))
|
||||
- `opentelemetry-instrumentation-system-metrics` Add `py.typed` file to enable PEP 561
|
||||
([#3132](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3132))
|
||||
- `opentelemetry-opentelemetry-sqlite3` Add `py.typed` file to enable PEP 561
|
||||
([#3133](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3133))
|
||||
- `opentelemetry-instrumentation-falcon` add support version to v4
|
||||
([#3086](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3086))
|
||||
- `opentelemetry-instrumentation-falcon` Implement new HTTP semantic convention opt-in for Falcon
|
||||
([#2790](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2790))
|
||||
- `opentelemetry-instrumentation-wsgi` always record span status code to have it available in metrics
|
||||
([#3148](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3148))
|
||||
- add support to Python 3.13
|
||||
([#3134](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3134))
|
||||
- `opentelemetry-opentelemetry-wsgi` Add `py.typed` file to enable PEP 561
|
||||
([#3129](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3129))
|
||||
- `opentelemetry-util-http` Add `py.typed` file to enable PEP 561
|
||||
([#3127](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3127))
|
||||
- `opentelemetry-instrumentation-psycopg2` Add support for psycopg2-binary
|
||||
([#3186](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3186))
|
||||
- `opentelemetry-opentelemetry-botocore` Add basic support for GenAI attributes for AWS Bedrock Converse API
|
||||
([#3161](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3161))
|
||||
- `opentelemetry-opentelemetry-botocore` Add basic support for GenAI attributes for AWS Bedrock InvokeModel API
|
||||
([#3200](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3200))
|
||||
- `opentelemetry-opentelemetry-botocore` Add basic support for GenAI attributes for AWS Bedrock ConverseStream API
|
||||
([#3204](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3204))
|
||||
- `opentelemetry-opentelemetry-botocore` Add basic support for GenAI attributes for AWS Bedrock InvokeModelWithStreamResponse API
|
||||
([#3206](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3206))
|
||||
- `opentelemetry-instrumentation-pymssql` Add pymssql instrumentation
|
||||
([#394](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/394))
|
||||
- `opentelemetry-instrumentation-mysql` Add sqlcommenter support
|
||||
([#3163](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3163))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-httpx` Fix `RequestInfo`/`ResponseInfo` type hints
|
||||
([#3105](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3105))
|
||||
- `opentelemetry-instrumentation-dbapi` Move `TracedCursorProxy` and `TracedConnectionProxy` to the module level
|
||||
([#3068](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3068))
|
||||
- `opentelemetry-instrumentation-click` Disable tracing of well-known server click commands
|
||||
([#3174](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3174))
|
||||
- `opentelemetry-instrumentation` Fix `get_dist_dependency_conflicts` if no distribution requires
|
||||
([#3168](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3168))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- `opentelemetry-exporter-prometheus-remote-write` updated protobuf required version from 4.21 to 5.26 and regenerated protobufs
|
||||
([#3219](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3219))
|
||||
- `opentelemetry-instrumentation-sqlalchemy` including sqlcomment in `db.statement` span attribute value is now opt-in
|
||||
([#3112](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3112))
|
||||
- `opentelemetry-instrumentation-dbapi` including sqlcomment in `db.statement` span attribute value is now opt-in
|
||||
([#3115](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3115))
|
||||
- `opentelemetry-instrumentation-psycopg2`, `opentelemetry-instrumentation-psycopg`, `opentelemetry-instrumentation-mysqlclient`, `opentelemetry-instrumentation-pymysql`: including sqlcomment in `db.statement` span attribute value is now opt-in
|
||||
([#3121](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3121))
|
||||
|
||||
## Version 1.29.0/0.50b0 (2024-12-11)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-starlette` Add type hints to the instrumentation
|
||||
([#3045](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3045))
|
||||
- `opentelemetry-distro` default to OTLP log exporter.
|
||||
([#3042](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3042))
|
||||
- `opentelemetry-instrumentation-sqlalchemy` Update unit tests to run with SQLALchemy 2
|
||||
([#2976](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2976))
|
||||
- Add `opentelemetry-instrumentation-openai-v2` to `opentelemetry-bootstrap`
|
||||
([#2996](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2996))
|
||||
- `opentelemetry-instrumentation-sqlalchemy` Add sqlcomment to `db.statement` attribute
|
||||
([#2937](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2937))
|
||||
- `opentelemetry-instrumentation-dbapi` Add sqlcomment to `db.statement` attribute
|
||||
([#2935](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2935))
|
||||
- `opentelemetry-instrumentation-dbapi` instrument_connection accepts optional connect_module
|
||||
([#3027](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3027))
|
||||
- `opentelemetry-instrumentation-mysqlclient` Add sqlcommenter support
|
||||
([#2941](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2941))
|
||||
- `opentelemetry-instrumentation-pymysql` Add sqlcommenter support
|
||||
([#2942](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2942))
|
||||
- `opentelemetry-instrumentation-click`: new instrumentation to trace click commands
|
||||
([#2994](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2994))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-starlette`: Retrieve `meter_provider` key instead of `_meter_provider` on `_instrument`
|
||||
([#3048](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3048))
|
||||
- `opentelemetry-instrumentation-httpx`: instrument_client is a static method again
|
||||
([#3003](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3003))
|
||||
- `opentelemetry-instrumentation-system_metrics`: fix callbacks reading wrong config
|
||||
([#3025](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3025))
|
||||
- `opentelemetry-instrumentation-httpx`: Check if mount transport is none before wrap it
|
||||
([#3022](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3022))
|
||||
- Replace all instrumentor unit test `assertEqualSpanInstrumentationInfo` calls with `assertEqualSpanInstrumentationScope` calls
|
||||
([#3037](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3037))
|
||||
- `opentelemetry-instrumentation-sqlalchemy` Fixes engines from `sqlalchemy.engine_from_config` not being fully instrumented
|
||||
([#2816](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2816))
|
||||
- `opentelemetry-instrumentation-sqlalchemy`: Fix a remaining memory leak in EngineTracer
|
||||
([#3053](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3053))
|
||||
- `opentelemetry-instrumentation-sqlite3`: Update documentation on explicit cursor support of tracing
|
||||
([#3088](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3088))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- `opentelemetry-instrumentation-sqlalchemy` teach instruments version
|
||||
([#2971](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2971))
|
||||
- Drop `opentelemetry-instrumentation-test` package from default instrumentation list
|
||||
([#2969](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2969))
|
||||
- `opentelemetry-instrumentation-httpx`: remove private unused `_InstrumentedClient` and `_InstrumentedAsyncClient` classes
|
||||
([#3036](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3036))
|
||||
|
||||
## Version 1.28.0/0.49b0 (2024-11-05)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-openai-v2` Instrumentation for OpenAI >= 0.27.0
|
||||
([#2759](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2759))
|
||||
- `opentelemetry-instrumentation-fastapi` Add autoinstrumentation mechanism tests.
|
||||
([#2860](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2860))
|
||||
- `opentelemetry-instrumentation-aiokafka` Add instrumentor and auto instrumentation support for aiokafka
|
||||
([#2082](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2082))
|
||||
- `opentelemetry-instrumentation-redis` Add additional attributes for methods create_index and search, rename those spans
|
||||
([#2635](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2635))
|
||||
- `opentelemetry-instrumentation` Add support for string based dotted module paths in unwrap
|
||||
([#2919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2919))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-aiokafka` Wrap `AIOKafkaConsumer.getone()` instead of `AIOKafkaConsumer.__anext__`
|
||||
([#2874](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2874))
|
||||
- `opentelemetry-instrumentation-confluent-kafka` Fix to allow `topic` to be extracted from `kwargs` in `produce()`
|
||||
([#2901])(https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2901)
|
||||
- `opentelemetry-instrumentation-system-metrics` Update metric units to conform to UCUM conventions.
|
||||
([#2922](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2922))
|
||||
- `opentelemetry-instrumentation-celery` Don't detach context without a None token
|
||||
([#2927](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2927))
|
||||
- `opentelemetry-exporter-prometheus-remote-write`: sort labels before exporting
|
||||
([#2940](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2940))
|
||||
- `opentelemetry-instrumentation-dbapi` sqlcommenter key values created from PostgreSQL, MySQL systems
|
||||
([#2897](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2897))
|
||||
- `opentelemetry-instrumentation-system-metrics`: don't report open file descriptors on Windows
|
||||
([#2946](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2946))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- Deprecation of pkg_resource in favor of importlib.metadata
|
||||
([#2871](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2871))
|
||||
- `opentelemetry-instrumentation` Don't fail distro loading if instrumentor raises ImportError, instead skip them
|
||||
([#2923](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2923))
|
||||
- `opentelemetry-instrumentation-httpx` Rewrote instrumentation to use wrapt instead of subclassing
|
||||
([#2909](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2909))
|
||||
|
||||
## Version 1.27.0/0.48b0 (2024-08-28)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-kafka-python` Instrument temporary fork, kafka-python-ng inside kafka-python's instrumentation
|
||||
([#2537](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2537))
|
||||
- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi` Add ability to disable internal HTTP send and receive spans
|
||||
([#2802](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2802))
|
||||
- `opentelemetry-instrumentation-asgi` Add fallback decoding for ASGI headers
|
||||
([#2837](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2837))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- `opentelemetry-bootstrap` Remove `opentelemetry-instrumentation-aws-lambda` from the defaults instrumentations
|
||||
([#2786](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2786))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-httpx` fix handling of async hooks
|
||||
([#2823](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2823))
|
||||
- `opentelemetry-instrumentation-system-metrics` fix `process.runtime.cpu.utilization` values to be shown in range of 0 to 1
|
||||
([#2812](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2812))
|
||||
- `opentelemetry-instrumentation-fastapi` fix `fastapi` auto-instrumentation by removing `fastapi-slim` support, `fastapi-slim` itself is discontinued from maintainers
|
||||
([#2783](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2783))
|
||||
- `opentelemetry-instrumentation-aws-lambda` Avoid exception when a handler is not present.
|
||||
([#2750](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2750))
|
||||
- `opentelemetry-instrumentation-django` Fix regression - `http.target` re-added back to old semconv duration metrics
|
||||
([#2746](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2746))
|
||||
- `opentelemetry-instrumentation-asgi` do not set `url.full` attribute for server spans
|
||||
([#2735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2735))
|
||||
- `opentelemetry-instrumentation-grpc` Fixes the issue with the gRPC instrumentation not working with the 1.63.0 and higher version of gRPC
|
||||
([#2483](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2484))
|
||||
- `opentelemetry-instrumentation-aws-lambda` Fixing w3c baggage support
|
||||
([#2589](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2589))
|
||||
- `opentelemetry-instrumentation-celery` propagates baggage
|
||||
([#2385](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2385))
|
||||
- `opentelemetry-instrumentation-asyncio` Fixes async generator coroutines not being awaited
|
||||
([#2792](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2792))
|
||||
- `opentelemetry-instrumentation-tornado` Handle http client exception and record exception info into span
|
||||
([#2563](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2563))
|
||||
- `opentelemetry-instrumentation` fix `http.host` new http semantic convention mapping to depend on `kind` of span
|
||||
([#2814](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2814))
|
||||
- `opentelemetry-instrumentation` Fix the description of `http.server.duration` and `http.server.request.duration`
|
||||
([#2753](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2753))
|
||||
- `opentelemetry-instrumentation-grpc` Fix grpc supported version
|
||||
([#2845](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2845))
|
||||
- `opentelemetry-instrumentation-asyncio` fix `AttributeError` in
|
||||
`AsyncioInstrumentor.trace_to_thread` when `func` is a `functools.partial` instance
|
||||
([#2911](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2911))
|
||||
|
||||
## Version 1.26.0/0.47b0 (2024-07-23)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-flask` Add `http.route` and `http.target` to metric attributes
|
||||
([#2621](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2621))
|
||||
- `opentelemetry-instrumentation-aws-lambda` Enable global propagator for AWS instrumentation
|
||||
([#2708](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2708))
|
||||
- `opentelemetry-instrumentation-sklearn` Deprecated the sklearn instrumentation
|
||||
([#2708](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2708))
|
||||
- `opentelemetry-instrumentation-pyramid` Record exceptions raised when serving a request
|
||||
([#2622](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2622))
|
||||
- `opentelemetry-sdk-extension-aws` Add AwsXrayLambdaPropagator
|
||||
([#2573](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2573))
|
||||
- `opentelemetry-instrumentation-confluent-kafka` Add support for version 2.4.0 of confluent_kafka
|
||||
([#2616](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2616))
|
||||
- `opentelemetry-instrumentation-asyncpg` Add instrumentation to cursor based queries
|
||||
([#2501](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2501))
|
||||
- `opentelemetry-instrumentation-confluent-kafka` Add support for produce purge
|
||||
([#2638](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2638))
|
||||
- `opentelemetry-instrumentation-asgi` Implement new semantic convention opt-in with stable http semantic conventions
|
||||
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
|
||||
- `opentelemetry-instrumentation-fastapi` Implement new semantic convention opt-in with stable http semantic conventions
|
||||
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
|
||||
- `opentelemetry-instrumentation-httpx` Implement new semantic convention opt-in migration with stable http semantic conventions
|
||||
([#2631](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2631))
|
||||
- `opentelemetry-instrumentation-system-metrics` Permit to use psutil 6.0+.
|
||||
([#2630](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2630))
|
||||
- `opentelemetry-instrumentation-system-metrics` Add support for capture open file descriptors
|
||||
([#2652](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2652))
|
||||
- `opentelemetry-instrumentation-httpx` Add support for instrument client with proxy
|
||||
([#2664](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2664))
|
||||
- `opentelemetry-instrumentation-aiohttp-client` Implement new semantic convention opt-in migration
|
||||
([#2673](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2673))
|
||||
- `opentelemetry-instrumentation-django` Add `http.target` to Django duration metric attributes
|
||||
([#2624](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2624))
|
||||
- `opentelemetry-instrumentation-urllib3` Implement new semantic convention opt-in migration
|
||||
([#2715](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2715))
|
||||
- `opentelemetry-instrumentation-django` Implement new semantic convention opt-in with stable http semantic conventions
|
||||
([#2714](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2714))
|
||||
- `opentelemetry-instrumentation-urllib` Implement new semantic convention opt-in migration
|
||||
([#2736](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2736))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi`, `opentelemetry-instrumentation-starlette` Use `tracer` and `meter` of originating components instead of one from `asgi` middleware
|
||||
([#2580](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2580))
|
||||
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `asgi` middleware
|
||||
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
|
||||
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `fastapi` middleware
|
||||
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
|
||||
- `opentelemetry-instrumentation-urllib3` Populate `{method}` as `HTTP` on `_OTHER` methods for span name
|
||||
([#2715](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2715))
|
||||
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `fastapi` instrumentation
|
||||
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
|
||||
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `django` middleware
|
||||
([#2714](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2714))
|
||||
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `urllib` instrumentation
|
||||
([#2736](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2736))
|
||||
- `opentelemetry-instrumentation-httpx`, `opentelemetry-instrumentation-aiohttp-client`,
|
||||
`opentelemetry-instrumentation-requests` Populate `{method}` as `HTTP` on `_OTHER` methods
|
||||
([#2726](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2726))
|
||||
- `opentelemetry-instrumentation-fastapi` Add dependency support for fastapi-slim
|
||||
([#2702](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2702))
|
||||
- `opentelemetry-instrumentation-urllib3` improve request_hook, replacing `headers` and `body` parameters with a single `request_info: RequestInfo` parameter that now contains the `method` and `url` ([#2711](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2711))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Handle `redis.exceptions.WatchError` as a non-error event in redis instrumentation
|
||||
([#2668](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2668))
|
||||
- `opentelemetry-instrumentation-httpx` Ensure httpx.get or httpx.request like methods are instrumented
|
||||
([#2538](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2538))
|
||||
- Add Python 3.12 support
|
||||
([#2572](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2572))
|
||||
- `opentelemetry-instrumentation-aiohttp-server`, `opentelemetry-instrumentation-httpx` Ensure consistently use of suppress_instrumentation utils
|
||||
([#2590](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2590))
|
||||
- Reference symbols from generated semantic conventions
|
||||
([#2611](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2611))
|
||||
- `opentelemetry-instrumentation-psycopg` Bugfix: Handle empty statement.
|
||||
([#2644](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2644))
|
||||
- `opentelemetry-instrumentation-confluent-kafka` Confluent Kafka: Ensure consume span is ended when consumer is closed
|
||||
([#2640](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2640))
|
||||
- `opentelemetry-instrumentation-asgi` Fix generation of `http.target` and `http.url` attributes for ASGI apps
|
||||
using sub apps
|
||||
([#2477](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2477))
|
||||
- `opentelemetry-instrumentation-aws-lambda` Bugfix: AWS Lambda event source key incorrect for SNS in instrumentation library.
|
||||
([#2612](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2612))
|
||||
- `opentelemetry-instrumentation-asyncio` instrumented `asyncio.wait_for` properly raises `asyncio.TimeoutError` as expected
|
||||
([#2637](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2637))
|
||||
- `opentelemetry-instrumentation-django` Handle exceptions from request/response hooks
|
||||
([#2153](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2153))
|
||||
- `opentelemetry-instrumentation-asgi` Removed `NET_HOST_NAME` AND `NET_HOST_PORT` from active requests count attribute
|
||||
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
|
||||
- `opentelemetry-instrumentation-asgi` Bugfix: Middleware did not set status code attribute on duration metrics for non-recording spans.
|
||||
([#2627](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2627))
|
||||
- `opentelemetry-instrumentation-mysql` Add support for `mysql-connector-python` v9
|
||||
([#2751](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2751))
|
||||
|
||||
## Version 1.25.0/0.46b0 (2024-05-31)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- Add return statement to Confluent kafka Producer poll() and flush() calls when instrumented by ConfluentKafkaInstrumentor().instrument_producer() ([#2527](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2527))
|
||||
- Rename `type` attribute to `asgi.event.type` in `opentelemetry-instrumentation-asgi`
|
||||
([#2300](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2300))
|
||||
- Rename AwsLambdaInstrumentor span attributes `faas.id` to `cloud.resource_id`, `faas.execution` to `faas.invocation_id`
|
||||
([#2372](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2372))
|
||||
- Drop support for instrumenting elasticsearch client < 6
|
||||
([#2422](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2422))
|
||||
- `opentelemetry-instrumentation-wsgi` Add `http.method` to `span.name`
|
||||
([#2425](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2425))
|
||||
- `opentelemetry-instrumentation-flask` Add `http.method` to `span.name`
|
||||
([#2454](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2454))
|
||||
- Record repeated HTTP headers in lists, rather than a comma separate strings for ASGI based web frameworks
|
||||
([#2361](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2361))
|
||||
- ASGI, FastAPI, Starlette: provide both send and receive hooks with `scope` and `message` for internal spans
|
||||
- ([#2546](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2546))
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-sdk-extension-aws` Register AWS resource detectors under the
|
||||
`opentelemetry_resource_detector` entry point
|
||||
([#2382](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2382))
|
||||
- `opentelemetry-instrumentation-wsgi` Implement new semantic convention opt-in with stable http semantic conventions
|
||||
([#2425](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2425))
|
||||
- `opentelemetry-instrumentation-flask` Implement new semantic convention opt-in with stable http semantic conventions
|
||||
([#2454](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2454))
|
||||
- `opentelemetry-instrumentation-threading` Initial release for threading
|
||||
([#2253](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2253))
|
||||
- `opentelemetry-instrumentation-pika` Instrumentation for `channel.consume()` (supported
|
||||
only for global, non channel specific instrumentation)
|
||||
([#2397](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2397))
|
||||
- `opentelemetry-processor-baggage` Initial release
|
||||
([#2436](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2436))
|
||||
- `opentelemetry-processor-baggage` Add baggage key predicate
|
||||
([#2535](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2535))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-dbapi` Fix compatibility with Psycopg3 to extract libpq build version
|
||||
([#2500](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2500))
|
||||
- `opentelemetry-instrumentation-grpc` AioClientInterceptor should propagate with a Metadata object
|
||||
([#2363](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2363))
|
||||
- `opentelemetry-instrumentation-boto3sqs` Instrument Session and resource
|
||||
([#2161](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2161))
|
||||
- `opentelemetry-instrumentation-aws-lambda` Fix exception handling for events with requestContext
|
||||
([#2418](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2418))
|
||||
- Use sqlalchemy version in sqlalchemy commenter instead of opentelemetry library version
|
||||
([#2404](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2404))
|
||||
- `opentelemetry-instrumentation-asyncio` Check for cancelledException in the future
|
||||
([#2461](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2461))
|
||||
- Remove SDK dependency from opentelemetry-instrumentation-grpc
|
||||
([#2474](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2474))
|
||||
- `opentelemetry-instrumentation-elasticsearch` Improved support for version 8
|
||||
([#2420](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2420))
|
||||
- `opentelemetry-instrumentation-elasticsearch` Disabling instrumentation with native OTel support enabled
|
||||
([#2524](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2524))
|
||||
- `opentelemetry-instrumentation-asyncio` Check for **name** attribute in the coroutine
|
||||
([#2521](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2521))
|
||||
- `opentelemetry-instrumentation-requests` Fix wrong time unit for duration histogram
|
||||
([#2553](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2553))
|
||||
- `opentelemetry-util-http` Preserve brackets around literal IPv6 hosts ([#2552](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2552))
|
||||
- `opentelemetry-util-redis` Fix net peer attribute for unix socket connection ([#2493](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2493))
|
||||
|
||||
## Version 1.24.0/0.45b0 (2024-03-28)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-psycopg` Async Instrumentation for psycopg 3.x
|
||||
([#2146](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2146))
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-celery` Allow Celery instrumentation to be installed multiple times
|
||||
([#2342](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2342))
|
||||
- Align gRPC span status codes to OTEL specification
|
||||
([#1756](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1756))
|
||||
- `opentelemetry-instrumentation-flask` Add importlib metadata default for deprecation warning flask version
|
||||
([#2297](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2297))
|
||||
- Ensure all http.server.duration metrics have the same description
|
||||
([#2151](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2298))
|
||||
- Fix regression in httpx `request.url` not being of type `httpx.URL` after `0.44b0`
|
||||
([#2359](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2359))
|
||||
- Avoid losing repeated HTTP headers
|
||||
([#2266](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2266))
|
||||
- `opentelemetry-instrumentation-elasticsearch` Don't send bulk request body as db statement
|
||||
([#2355](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2355))
|
||||
- AwsLambdaInstrumentor sets `cloud.account.id` span attribute
|
||||
([#2367](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2367))
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-fastapi` Add support for configuring header extraction via runtime constructor parameters
|
||||
([#2241](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2241))
|
||||
|
||||
## Version 1.23.0/0.44b0 (2024-02-23)
|
||||
|
||||
- Drop support for 3.7
|
||||
([#2151](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2151))
|
||||
- `opentelemetry-resource-detector-azure` Added 10s timeout to VM Resource Detector
|
||||
([#2119](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2119))
|
||||
- `opentelemetry-instrumentation-asyncpg` Allow AsyncPGInstrumentor to be instantiated multiple times
|
||||
([#1791](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1791))
|
||||
([#1791](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1791))
|
||||
- `opentelemetry-instrumentation-confluent-kafka` Add support for higher versions until 2.3.0 of confluent_kafka
|
||||
([#2132](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2132))
|
||||
- `opentelemetry-resource-detector-azure` Changed timeout to 4 seconds due to [timeout bug](https://github.com/open-telemetry/opentelemetry-python/issues/3644)
|
||||
([#2136](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2136))
|
||||
- `opentelemetry-resource-detector-azure` Suppress instrumentation for `urllib` call
|
||||
([#2178](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2178))
|
||||
- AwsLambdaInstrumentor handles and re-raises function exception ([#2245](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2245))
|
||||
- AwsLambdaInstrumentor handles and re-raises function exception
|
||||
([#2245](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2245))
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-psycopg` Initial release for psycopg 3.x
|
||||
- `opentelemetry-instrumentation-asgi` Add support for configuring ASGI middleware header extraction via runtime constructor parameters
|
||||
([#2026](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2026))
|
||||
|
||||
## Version 1.22.0/0.43b0 (2023-12-14)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-asyncio` Add support for asyncio
|
||||
([#1919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1943))
|
||||
- `opentelemetry-instrumentation` Added Otel semantic convention opt-in mechanism
|
||||
|
@ -45,7 +643,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#1959](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1959))
|
||||
- `opentelemetry-resource-detector-azure` Added dependency for Cloud Resource ID attribute
|
||||
([#2072](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2072))
|
||||
|
||||
|
||||
## Version 1.21.0/0.42b0 (2023-11-01)
|
||||
|
||||
### Added
|
||||
|
@ -58,8 +656,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#1948](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1948))
|
||||
- Added schema_url (`"https://opentelemetry.io/schemas/1.11.0"`) to all metrics and traces
|
||||
([#1977](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1977))
|
||||
- Add support for configuring ASGI middleware header extraction via runtime constructor parameters
|
||||
([#2026](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2026))
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -90,6 +686,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#152](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2013))
|
||||
|
||||
## Version 1.19.0/0.40b0 (2023-07-13)
|
||||
|
||||
- `opentelemetry-instrumentation-asgi` Add `http.server.request.size` metric
|
||||
([#1867](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1867))
|
||||
|
||||
|
@ -134,8 +731,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#1879](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1879))
|
||||
- Add optional distro and configurator selection for auto-instrumentation
|
||||
([#1823](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1823))
|
||||
- `opentelemetry-instrumentation-django` - Add option to add Opentelemetry middleware at specific position in middleware chain
|
||||
([#2912]https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2912)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-kafka-python` Add instrumentation to `consume` method
|
||||
([#1786](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1786))
|
||||
|
||||
|
@ -186,6 +786,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#1692](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1692))
|
||||
|
||||
### Changed
|
||||
|
||||
- Update HTTP server/client instrumentation span names to comply with spec
|
||||
([#1759](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1759))
|
||||
|
||||
|
@ -223,7 +824,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Added
|
||||
|
||||
- Support `aio_pika` 9.x (([#1670](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1670])
|
||||
- `opentelemetry-instrumentation-redis` Add `sanitize_query` config option to allow query sanitization. ([#1572](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1572))
|
||||
- `opentelemetry-instrumentation-redis` Add `sanitize_query` config option to allow query sanitization. ([#1572](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1572))
|
||||
- `opentelemetry-instrumentation-elasticsearch` Add optional db.statement query sanitization.
|
||||
([#1598](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1598))
|
||||
- `opentelemetry-instrumentation-celery` Record exceptions as events on the span.
|
||||
|
@ -247,7 +848,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#1575](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1575))
|
||||
- Fix SQLAlchemy uninstrumentation
|
||||
([#1581](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1581))
|
||||
- `opentelemetry-instrumentation-grpc` Fix code()/details() of _OpentelemetryServicerContext.
|
||||
- `opentelemetry-instrumentation-grpc` Fix code()/details() of \_OpentelemetryServicerContext.
|
||||
([#1578](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1578))
|
||||
- Fix aiopg instrumentation to work with aiopg < 2.0.0
|
||||
([#1473](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1473))
|
||||
|
@ -299,7 +900,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#1430](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1430))
|
||||
- `opentelemetry-instrumentation-aiohttp-client` Allow overriding of status in response hook.
|
||||
([#1394](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1394))
|
||||
- `opentelemetry-instrumentation-pymysql` Fix dbapi connection instrument wrapper has no _sock member.
|
||||
- `opentelemetry-instrumentation-pymysql` Fix dbapi connection instrument wrapper has no \_sock member.
|
||||
([#1424](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424))
|
||||
- `opentelemetry-instrumentation-dbapi` Fix the check for the connection already being instrumented in instrument_connection().
|
||||
([#1424](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424))
|
||||
|
@ -384,7 +985,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Add metric instrumentation in starlette
|
||||
([#1327](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1327))
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-kafka-python`: wait for metadata
|
||||
|
@ -397,7 +997,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#1208](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1208))
|
||||
- `opentelemetry-instrumentation-aiohttp-client` Fix producing additional spans with each newly created ClientSession
|
||||
- ([#1246](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1246))
|
||||
- Add _is_opentelemetry_instrumented check in _InstrumentedFastAPI class
|
||||
- Add \_is_opentelemetry_instrumented check in \_InstrumentedFastAPI class
|
||||
([#1313](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1313))
|
||||
- Fix uninstrumentation of existing app instances in FastAPI
|
||||
([#1258](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1258))
|
||||
|
@ -416,6 +1016,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#1203](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1203))
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-redis` add support to instrument RedisCluster clients
|
||||
([#1177](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1177))
|
||||
- `opentelemetry-instrumentation-sqlalchemy` Added span for the connection phase ([#1133](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1133))
|
||||
|
@ -428,11 +1029,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [1.12.0rc2-0.32b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.12.0rc2-0.32b0) - 2022-07-01
|
||||
|
||||
|
||||
- Pyramid: Only categorize 500s server exceptions as errors
|
||||
([#1037](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1037))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix bug in system metrics by checking their configuration
|
||||
([#1129](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1129))
|
||||
- Adding escape call to fix [auto-instrumentation not producing spans on Windows](https://github.com/open-telemetry/opentelemetry-python/issues/2703).
|
||||
|
@ -445,8 +1046,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- fixed typo in `system.network.io` metric configuration
|
||||
([#1135](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1135))
|
||||
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-aiohttp-client` Add support for optional custom trace_configs argument.
|
||||
([1079](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1079))
|
||||
- `opentelemetry-instrumentation-sqlalchemy` add support to instrument multiple engines
|
||||
|
@ -470,10 +1071,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Integrated sqlcommenter plugin into opentelemetry-instrumentation-django
|
||||
([#896](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/896))
|
||||
|
||||
|
||||
## Version 1.12.0rc1/0.31b0 (2022-05-17)
|
||||
|
||||
### Fixed
|
||||
|
||||
- `opentelemetry-instrumentation-aiohttp-client` make span attributes available to sampler
|
||||
([#1072](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1072))
|
||||
- `opentelemetry-instrumentation-aws-lambda` Fixed an issue - in some rare cases (API GW proxy integration test)
|
||||
|
@ -486,6 +1087,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `opentelemetry-sdk-extension-aws` change timeout for AWS EC2 and EKS metadata requests from 1000 seconds and 2000 seconds to 1 second
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrument` and `opentelemetry-bootstrap` now include a `--version` flag
|
||||
([#1065](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1065))
|
||||
- `opentelemetry-instrumentation-redis` now instruments asynchronous Redis clients, if the installed redis-py includes async support (>=4.2.0).
|
||||
|
@ -493,22 +1095,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `opentelemetry-instrumentation-boto3sqs` added AWS's SQS instrumentation.
|
||||
([#1081](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1081))
|
||||
|
||||
|
||||
## Version 1.11.1/0.30b1 (2022-04-21)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-starlette` Capture custom request/response headers in span attributes
|
||||
([#1046](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1046))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Prune autoinstrumentation sitecustomize module directory from PYTHONPATH immediately
|
||||
([#1066](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1066))
|
||||
|
||||
|
||||
## Version 1.11.0/0.30b0 (2022-04-18)
|
||||
|
||||
### Fixed
|
||||
- `opentelemetry-instrumentation-pyramid` Fixed which package is the correct caller in _traced_init.
|
||||
|
||||
- `opentelemetry-instrumentation-pyramid` Fixed which package is the correct caller in \_traced_init.
|
||||
([#830](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/830))
|
||||
- `opentelemetry-instrumentation-tornado` Fix Tornado errors mapping to 500
|
||||
([#1048](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1048))
|
||||
|
@ -542,7 +1145,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `opentelemetry-instrumentation-pyramid` Pyramid: Capture custom request/response headers in span attributes
|
||||
([#1022](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1022))
|
||||
|
||||
|
||||
## Version 1.10.0/0.29b0 (2022-03-10)
|
||||
|
||||
- `opentelemetry-instrumentation-wsgi` Capture custom request/response headers in span attributes
|
||||
|
@ -556,7 +1158,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- `opentelemetry-instrumentation-aws-lambda` `SpanKind.SERVER` by default, add more cases for `SpanKind.CONSUMER` services. ([#926](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/926))
|
||||
- `opentelemetry-instrumentation-sqlalchemy` added experimental sql commenter capability
|
||||
([#924](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/924))
|
||||
([#924](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/924))
|
||||
- `opentelemetry-contrib-instrumentations` added new meta-package that installs all contrib instrumentations.
|
||||
([#681](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/681))
|
||||
- `opentelemetry-instrumentation-dbapi` add experimental sql commenter capability
|
||||
|
@ -595,12 +1197,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Version 1.9.0/0.28b0 (2022-01-26)
|
||||
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-pyramid` Pyramid: Conditionally create SERVER spans
|
||||
([#869](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/869))
|
||||
- `opentelemetry-instrumentation-grpc` added `trailing_metadata` to _OpenTelemetryServicerContext.
|
||||
- `opentelemetry-instrumentation-grpc` added `trailing_metadata` to \_OpenTelemetryServicerContext.
|
||||
([#871](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/871))
|
||||
- `opentelemetry-instrumentation-asgi` now returns a `traceresponse` response header.
|
||||
([#817](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/817))
|
||||
|
@ -634,12 +1235,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `opentelemetry-instrumentation-aiohttp-client` aiohttp: Remove `span_name` from docs
|
||||
([#857](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/857))
|
||||
|
||||
|
||||
## Version 1.8.0/0.27b0 (2021-12-17)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-aws-lambda` Adds support for configurable flush timeout via `OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT` property. ([#825](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/825))
|
||||
- `opentelemetry-instrumentation-aws-lambda` Adds support for configurable flush timeout via `OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT` property. ([#825](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/825))
|
||||
- `opentelemetry-instrumentation-pika` Adds support for versions between `0.12.0` to `1.0.0`. ([#837](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/837))
|
||||
|
||||
### Fixed
|
||||
|
@ -709,13 +1309,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#755](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/755))
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-pika` Add `publish_hook` and `consume_hook` callbacks passed as arguments to the instrument method
|
||||
([#763](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/763))
|
||||
|
||||
|
||||
## Version 1.6.1/0.25b1 (2021-10-18)
|
||||
|
||||
### Changed
|
||||
|
||||
- `opentelemetry-util-http` no longer contains an instrumentation entrypoint and will not be loaded
|
||||
automatically by the auto instrumentor.
|
||||
([#745](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/745))
|
||||
|
@ -729,7 +1330,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#760](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/760))
|
||||
|
||||
## Version 1.6.0/0.25b0 (2021-10-13)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-sdk-extension-aws` Release AWS Python SDK Extension as 1.0.0
|
||||
([#667](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/667))
|
||||
- `opentelemetry-instrumentation-urllib3`, `opentelemetry-instrumentation-requests`
|
||||
|
@ -756,6 +1359,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#391](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/391))
|
||||
|
||||
### Changed
|
||||
|
||||
- `opentelemetry-instrumentation-flask` Fix `RuntimeError: Working outside of request context`
|
||||
([#734](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/734))
|
||||
- `opentelemetry-propagators-aws-xray` Rename `AwsXRayFormat` to `AwsXRayPropagator`
|
||||
|
@ -786,6 +1390,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
## Version 1.5.0/0.24b0 (2021-08-26)
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-sdk-extension-aws` Add AWS resource detectors to extension package
|
||||
([#586](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/586))
|
||||
- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-aiohttp-client`, `openetelemetry-instrumentation-fastapi`,
|
||||
|
@ -804,10 +1409,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
## Version 1.4.0/0.23b0 (2021-07-21)
|
||||
|
||||
### Removed
|
||||
|
||||
- Move `opentelemetry-instrumentation` to the core repo.
|
||||
([#595](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/595))
|
||||
|
||||
### Changed
|
||||
|
||||
- `opentelemetry-instrumentation-falcon` added support for Falcon 3.
|
||||
([#607](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/607))
|
||||
- `opentelemetry-instrumentation-tornado` properly instrument work done in tornado on_finish method.
|
||||
|
@ -855,12 +1462,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#568](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/568))
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-httpx` Add `httpx` instrumentation
|
||||
([#461](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/461))
|
||||
|
||||
## Version 1.3.0/0.22b0 (2021-06-01)
|
||||
|
||||
### Changed
|
||||
|
||||
- `opentelemetry-bootstrap` not longer forcibly removes and re-installs libraries and their instrumentations.
|
||||
This means running bootstrap will not auto-upgrade existing dependencies and as a result not cause dependency
|
||||
conflicts.
|
||||
|
@ -877,6 +1486,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
([#488](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/488))
|
||||
|
||||
### Added
|
||||
|
||||
- `opentelemetry-instrumentation-botocore` now supports
|
||||
context propagation for lambda invoke via Payload embedded headers.
|
||||
([#458](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/458))
|
||||
|
@ -886,6 +1496,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
## Version 1.2.0/0.21b0 (2021-05-11)
|
||||
|
||||
### Changed
|
||||
|
||||
- Instrumentation packages don't specify the libraries they instrument as dependencies
|
||||
anymore. Instead, they verify the correct version of libraries are installed at runtime.
|
||||
([#475](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/475))
|
||||
|
@ -1437,6 +2048,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `opentelemetry-ext-http-requests` Updates for core library changes
|
||||
|
||||
- `Added support for PyPy3` Initial release
|
||||
|
||||
## [#1033](https://github.com/open-telemetryopentelemetry-python-contrib/issues/1033)
|
||||
|
||||
## Version 0.1a0 (2019-09-30)
|
||||
|
@ -1445,3 +2057,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- `opentelemetry-ext-wsgi` Initial release
|
||||
- `opentelemetry-ext-http-requests` Initial release
|
||||
|
||||
- Drop support for 3.7
|
||||
([#2151](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2151))
|
||||
- `opentelemetry-resource-detector-azure` Added 10s timeout to VM Resource Detector
|
||||
([#2119](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2119))
|
||||
- `opentelemetry-instrumentation-asyncpg` Allow AsyncPGInstrumentor to be instantiated multiple times
|
||||
([#1791](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1791))
|
||||
- `opentelemetry-instrumentation-confluent-kafka` Add support for higher versions until 2.3.0 of confluent_kafka
|
||||
([#2132](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2132))
|
||||
- `opentelemetry-resource-detector-azure` Changed timeout to 4 seconds due to [timeout bug](https://github.com/open-telemetry/opentelemetry-python/issues/3644)
|
||||
([#2136](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2136))
|
||||
- `opentelemetry-resource-detector-azure` Suppress instrumentation for `urllib` call
|
||||
([#2178](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2178))
|
||||
- AwsLambdaInstrumentor handles and re-raises function exception ([#2245](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2245))
|
||||
|
|
222
CONTRIBUTING.md
222
CONTRIBUTING.md
|
@ -13,7 +13,39 @@ on how to become a [**Member**](https://github.com/open-telemetry/community/blob
|
|||
[**Approver**](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
|
||||
and [**Maintainer**](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
|
||||
|
||||
## Find a Buddy and get Started Quickly!
|
||||
Before you can contribute, you will need to sign the [Contributor License Agreement](https://docs.linuxfoundation.org/lfx/easycla/contributors).
|
||||
|
||||
Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-telemetry/community/blob/main/guides/contributor/README.md).
|
||||
|
||||
## Index
|
||||
|
||||
- [Contributing to opentelemetry-python-contrib](#contributing-to-opentelemetry-python-contrib)
|
||||
- [Index](#index)
|
||||
- [Find a Buddy and get Started Quickly](#find-a-buddy-and-get-started-quickly)
|
||||
- [Development](#development)
|
||||
- [Virtual Environment](#virtual-environment)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
- [Benchmarks](#benchmarks)
|
||||
- [Pull Requests](#pull-requests)
|
||||
- [How to Send Pull Requests](#how-to-send-pull-requests)
|
||||
- [How to Receive Comments](#how-to-receive-comments)
|
||||
- [How to Get PRs Reviewed](#how-to-get-prs-reviewed)
|
||||
- [How to Get PRs Merged](#how-to-get-prs-merged)
|
||||
- [Design Choices](#design-choices)
|
||||
- [Focus on Capabilities, Not Structure Compliance](#focus-on-capabilities-not-structure-compliance)
|
||||
- [Running Tests Locally](#running-tests-locally)
|
||||
- [Testing against a different Core repo branch/commit](#testing-against-a-different-core-repo-branchcommit)
|
||||
- [Style Guide](#style-guide)
|
||||
- [Guideline for instrumentations](#guideline-for-instrumentations)
|
||||
- [Update supported instrumentation package versions](#update-supported-instrumentation-package-versions)
|
||||
- [Guideline for GenAI instrumentations](#guideline-for-genai-instrumentations)
|
||||
- [Get Involved](#get-involved)
|
||||
- [Expectations from contributors](#expectations-from-contributors)
|
||||
- [Updating supported Python versions](#updating-supported-python-versions)
|
||||
- [Bumping the Python baseline](#bumping-the-python-baseline)
|
||||
- [Adding support for a new Python release](#adding-support-for-a-new-python-release)
|
||||
|
||||
## Find a Buddy and get Started Quickly
|
||||
|
||||
If you are looking for someone to help you find a starting point and be a resource for your first contribution, join our
|
||||
Slack and find a buddy!
|
||||
|
@ -31,39 +63,67 @@ This project uses [tox](https://tox.readthedocs.io) to automate
|
|||
some aspects of development, including testing against multiple Python versions.
|
||||
To install `tox`, run:
|
||||
|
||||
```console
|
||||
$ pip install tox
|
||||
```sh
|
||||
pip install tox
|
||||
```
|
||||
|
||||
You can also run tox with `uv` support. By default [tox.ini](./tox.ini) will automatically create a provisioned tox environment with `tox-uv`, but you can install it at host level:
|
||||
|
||||
```sh
|
||||
pip install tox-uv
|
||||
```
|
||||
|
||||
You can run `tox` with the following arguments:
|
||||
|
||||
- `tox` to run all existing tox commands, including unit tests for all packages
|
||||
* `tox` to run all existing tox commands, including unit tests for all packages
|
||||
under multiple Python versions
|
||||
- `tox -e docs` to regenerate the API docs
|
||||
- `tox -e py311-test-instrumentation-aiopg` to e.g. run the aiopg instrumentation unit tests under a specific
|
||||
* `tox -e docs` to regenerate all docs
|
||||
* `tox -e py312-test-instrumentation-aiopg` to e.g. run the aiopg instrumentation unit tests under a specific
|
||||
Python version
|
||||
- `tox -e spellcheck` to run a spellcheck on all the code
|
||||
- `tox -e lint` to run lint checks on all code
|
||||
* `tox -e spellcheck` to run a spellcheck on all the code
|
||||
* `tox -e lint-some-package` to run lint checks on `some-package`
|
||||
* `tox -e generate-workflows` to run creation of new CI workflows if tox environments have been updated
|
||||
* `tox -e ruff` to run ruff linter and formatter checks against the entire codebase
|
||||
|
||||
`black` and `isort` are executed when `tox -e lint` is run. The reported errors can be tedious to fix manually.
|
||||
An easier way to do so is:
|
||||
`ruff check` and `ruff format` are executed when `tox -e ruff` is run. We strongly recommend you to configure [pre-commit](https://pre-commit.com/) locally to run `ruff` automatically before each commit by installing it as git hooks. You just need to [install pre-commit](https://pre-commit.com/#install) in your environment:
|
||||
|
||||
1. Run `.tox/lint/bin/black .`
|
||||
2. Run `.tox/lint/bin/isort .`
|
||||
```console
|
||||
pip install pre-commit -c dev-requirements.txt
|
||||
```
|
||||
|
||||
and run this command inside the git repository:
|
||||
|
||||
```console
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
See
|
||||
[`tox.ini`](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/tox.ini)
|
||||
for more detail on available tox commands.
|
||||
|
||||
### Virtual Environment
|
||||
|
||||
You can also create a single virtual environment to make it easier to run local tests.
|
||||
|
||||
For that, you'll need to install [`uv`](https://docs.astral.sh/uv/getting-started/installation/).
|
||||
|
||||
After installing `uv`, you can run the following command:
|
||||
|
||||
```sh
|
||||
uv sync
|
||||
```
|
||||
|
||||
This will create a virtual environment in the `.venv` directory and install all the necessary dependencies.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
- Some packages may require additional system wide dependencies to be installed. For example, you may need to install `libpq-dev` to run the postgresql client libraries instrumentation tests. or `libsnappy-dev` to run the prometheus exporter tests. If you encounter a build error, please check the installation instructions for the package you are trying to run tests for.
|
||||
Some packages may require additional system-wide dependencies to be installed. For example, you may need to install `libpq-dev` to run the postgresql client libraries instrumentation tests or `libsnappy-dev` to run the prometheus exporter tests. If you encounter a build error, please check the installation instructions for the package you are trying to run tests for.
|
||||
|
||||
For `docs` building, you may need to install `mysql-client` and other required dependencies as necessary. Ensure the Python version used in your local setup matches the version used in the [CI](./.github/workflows/) to maintain compatibility when building the documentation.
|
||||
|
||||
### Benchmarks
|
||||
|
||||
Performance progression of benchmarks for packages distributed by OpenTelemetry Python can be viewed as a [graph of throughput vs commit history](https://opentelemetry-python-contrib.readthedocs.io/en/latest/performance/benchmarks.html). From the linked page, you can download a JSON file with the performance results.
|
||||
|
||||
Running the `tox` tests also runs the performance tests if any are available. Benchmarking tests are done with `pytest-benchmark` and they output a table with results to the console.
|
||||
Some packages have benchmark tests. To run them, run `tox -f benchmark`. Benchmark tests use `pytest-benchmark` and they output a table with results to the console.
|
||||
|
||||
To write benchmarks, simply use the [pytest benchmark fixture](https://pytest-benchmark.readthedocs.io/en/latest/usage.html#usage) like the following:
|
||||
|
||||
|
@ -79,10 +139,10 @@ def test_simple_start_span(benchmark):
|
|||
benchmark(benchmark_start_as_current_span, "benchmarkedSpan", 42)
|
||||
```
|
||||
|
||||
Make sure the test file is under the `tests/performance/benchmarks/` folder of
|
||||
Make sure the test file is under the `benchmarks/` folder of
|
||||
the package it is benchmarking and further has a path that corresponds to the
|
||||
file in the package it is testing. Make sure that the file name begins with
|
||||
`test_benchmark_`. (e.g. `propagator/opentelemetry-propagator-aws-xray/tests/performance/benchmarks/trace/propagation/test_benchmark_aws_xray_propagator.py`)
|
||||
`test_benchmark_`. (e.g. `propagator/opentelemetry-propagator-aws-xray/benchmarks/trace/propagation/test_benchmark_aws_xray_propagator.py`)
|
||||
|
||||
## Pull Requests
|
||||
|
||||
|
@ -94,30 +154,45 @@ pull requests (PRs).
|
|||
To create a new PR, fork the project in GitHub and clone the upstream repo:
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/open-telemetry/opentelemetry-python-contrib.git
|
||||
git clone https://github.com/open-telemetry/opentelemetry-python-contrib.git
|
||||
cd opentelemetry-python-contrib
|
||||
```
|
||||
|
||||
Add your fork as an origin:
|
||||
|
||||
```sh
|
||||
$ git remote add fork https://github.com/YOUR_GITHUB_USERNAME/opentelemetry-python-contrib.git
|
||||
git remote add fork https://github.com/YOUR_GITHUB_USERNAME/opentelemetry-python-contrib.git
|
||||
```
|
||||
|
||||
Run tests:
|
||||
make sure you have all supported versions of Python installed, install `tox` only for the first time:
|
||||
|
||||
```sh
|
||||
# make sure you have all supported versions of Python installed
|
||||
$ pip install tox # only first time.
|
||||
$ tox # execute in the root of the repository
|
||||
pip install tox tox-uv
|
||||
```
|
||||
|
||||
Run tests in the root of the repository (this will run all tox environments and may take some time):
|
||||
|
||||
```sh
|
||||
tox
|
||||
```
|
||||
|
||||
Check out a new branch, make modifications and push the branch to your fork:
|
||||
|
||||
```sh
|
||||
$ git checkout -b feature
|
||||
# edit files
|
||||
$ git commit
|
||||
$ git push fork feature
|
||||
git checkout -b feature
|
||||
```
|
||||
|
||||
After you edit the files, stage changes in the current directory:
|
||||
|
||||
```sh
|
||||
git add .
|
||||
```
|
||||
|
||||
Then run the following to commit the changes:
|
||||
|
||||
```sh
|
||||
git commit
|
||||
git push fork feature
|
||||
```
|
||||
|
||||
Open a pull request against the main `opentelemetry-python-contrib` repo.
|
||||
|
@ -126,6 +201,7 @@ Open a pull request against the main `opentelemetry-python-contrib` repo.
|
|||
|
||||
* If the PR is not ready for review, please put `[WIP]` in the title, tag it
|
||||
as `work-in-progress`, or mark it as [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
|
||||
* Make sure tests and lint are passing locally before requesting a review.
|
||||
* Make sure CLA is signed and CI is clear.
|
||||
|
||||
### How to Get PRs Reviewed
|
||||
|
@ -142,6 +218,7 @@ If you are not getting reviews, please contact the respective owners directly.
|
|||
### How to Get PRs Merged
|
||||
|
||||
A PR is considered to be **ready to merge** when:
|
||||
|
||||
* It has received two approvals from [Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
|
||||
/ [Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer)
|
||||
(at different companies).
|
||||
|
@ -180,14 +257,26 @@ For a deeper discussion, see: https://github.com/open-telemetry/opentelemetry-sp
|
|||
2. Make sure you have `tox` installed. `pip install tox`.
|
||||
3. Run `tox` without any arguments to run tests for all the packages. Read more about [tox](https://tox.readthedocs.io/en/latest/).
|
||||
|
||||
Some tests can be slow due to pre-steps that do dependencies installs. To help with that, you can run tox a first time, and after that run the tests using previous installed dependencies in toxdir as following:
|
||||
|
||||
1. First time run (e.g., opentelemetry-instrumentation-aiopg)
|
||||
```console
|
||||
tox -e py312-test-instrumentation-aiopg
|
||||
```
|
||||
2. Run tests again without pre-steps:
|
||||
```console
|
||||
.tox/py312-test-instrumentation-aiopg/bin/pytest instrumentation/opentelemetry-instrumentation-aiopg
|
||||
```
|
||||
|
||||
### Testing against a different Core repo branch/commit
|
||||
|
||||
Some of the tox targets install packages from the [OpenTelemetry Python Core Repository](https://github.com/open-telemetry/opentelemetry-python) via pip. The version of the packages installed defaults to the main branch in that repository when tox is run locally. It is possible to install packages tagged with a specific git commit hash by setting an environment variable before running tox as per the following example:
|
||||
|
||||
```sh
|
||||
CORE_REPO_SHA=c49ad57bfe35cfc69bfa863d74058ca9bec55fc3 tox
|
||||
```
|
||||
|
||||
The continuation integration overrides that environment variable with as per the configuration [here](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test.yml#L9).
|
||||
|
||||
The continuous integration overrides that environment variable with as per the configuration [here](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test_0.yml#L14).
|
||||
|
||||
## Style Guide
|
||||
|
||||
|
@ -202,28 +291,85 @@ The continuation integration overrides that environment variable with as per the
|
|||
Below is a checklist of things to be mindful of when implementing a new instrumentation or working on a specific instrumentation. It is one of our goals as a community to keep the implementation specific details of instrumentations as similar across the board as possible for ease of testing and feature parity. It is also good to abstract as much common functionality as possible.
|
||||
|
||||
- Follow semantic conventions
|
||||
- The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/semantic-conventions.md)
|
||||
- Extends from [BaseInstrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py#L26)
|
||||
- The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/semantic-conventions/tree/main/docs).
|
||||
- To ensure consistency, we encourage contributions that align with [STABLE](https://opentelemetry.io/docs/specs/otel/document-status/#lifecycle-status) semantic conventions if available. This approach helps us avoid potential confusion and reduces the need to support multiple outdated versions of semantic conventions. However, we are still open to considering exceptional cases where changes are well justified.
|
||||
- Contributions related to outdated HTTP semantic conventions (conventions prior to becoming [stable](https://github.com/open-telemetry/semantic-conventions/tree/v1.23.0)) will likely be discouraged, as they increase complexity and the potential for misconceptions.
|
||||
- Contains a name that is not already claimed in [Pypi](https://pypi.org/). Contact a maintainer, bring the issue up in the weekly Python SIG or create a ticket in Pypi if a desired name has already been taken.
|
||||
- Extends from [BaseInstrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py#L35)
|
||||
- Supports auto-instrumentation
|
||||
- Add an entry point (ex. https://github.com/open-telemetry/opentelemetry-python-contrib/blob/f045c43affff6ff1af8fa2f7514a4fdaca97dacf/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml#L44)
|
||||
- Add an entry point (ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml#L44>)
|
||||
- Run `python scripts/generate_instrumentation_bootstrap.py` after adding a new instrumentation package.
|
||||
- Functionality that is common amongst other instrumentation and can be abstracted [here](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation)
|
||||
- Request/response [hooks](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/408) for http instrumentations
|
||||
- `suppress_instrumentation` functionality
|
||||
- ex. https://github.com/open-telemetry/opentelemetry-python-contrib/blob/3ec77360cb20482b08b30312a6bedc8b946e3fa1/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L111
|
||||
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/opentelemetry-instrumentation/src/opentelemetry/instrumentation/utils.py#L191>
|
||||
- Suppress propagation functionality
|
||||
- https://github.com/open-telemetry/opentelemetry-python-contrib/issues/344 for more context
|
||||
- `exclude_urls` functionality
|
||||
- ex. https://github.com/open-telemetry/opentelemetry-python-contrib/blob/0fcb60d2ad139f78a52edd85b1cc4e32f2e962d0/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py#L91
|
||||
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py#L327>
|
||||
- `url_filter` functionality
|
||||
- ex. https://github.com/open-telemetry/opentelemetry-python-contrib/blob/0fcb60d2ad139f78a52edd85b1cc4e32f2e962d0/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py#L235
|
||||
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py#L268>
|
||||
- `is_recording()` optimization on non-sampled spans
|
||||
- ex. https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L133
|
||||
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L234>
|
||||
- Appropriate error handling
|
||||
- ex. https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L146
|
||||
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L220>
|
||||
- Isolate sync and async test
|
||||
- For synchronous tests, the typical test case class is inherited from `opentelemetry.test.test_base.TestBase`. However, if you want to write asynchronous tests, the test case class should inherit also from `IsolatedAsyncioTestCase`. Adding asynchronous tests to a common test class can lead to tests passing without actually running, which can be misleading.
|
||||
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/60fb936b7e5371b3e5587074906c49fb873cbd76/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_server_interceptor.py#L84>
|
||||
- Most of the instrumentations have the same version. If you are going to develop a new instrumentation it would probably have `X.Y.dev` version and depends on `opentelemetry-instrumentation` and `opentelemetry-semantic-conventions` for a [compatible version](https://peps.python.org/pep-0440/#compatible-release). That means that you may need to install the instrumentation dependencies from this repo and the core repo from git.
|
||||
- Documentation
|
||||
- When adding a new instrumentation remember to add an entry in `docs/instrumentation/` named `<instrumentation>/<instrumentation>.rst` to have the instrumentation documentation referenced from the index. You can use the entry template available [here](./_template/autodoc_entry.rst)
|
||||
- Testing
|
||||
- When adding a new instrumentation remember to update `tox.ini` adding appropriate rules in `envlist`, `command_pre` and `commands` sections
|
||||
|
||||
### Update supported instrumentation package versions
|
||||
|
||||
- Navigate to the **instrumentation package directory:**
|
||||
- Update **`pyproject.toml`** file by modifying _instruments_ entry in the `[project.optional-dependencies]` section with the new version constraint
|
||||
- Update `_instruments` variable in instrumentation **`package.py`** file with the new version constraint
|
||||
- At the **root of the project directory**, run `tox -e generate` to regenerate necessary files
|
||||
|
||||
If you're adding support for a new version of the instrumentation package, follow these additional steps:
|
||||
|
||||
- At the **instrumentation package directory:** Add new test-requirements.txt file with the respective package version required for testing
|
||||
- At the **root of the project directory**: Add a new test environment entry for the package version in [tox.ini](./tox.ini) and run `tox -e generate-workflows` to regenerate new workflows accordingly. In the same [tox.ini](./tox.ini) file, search for `opentelemetry-instrumentation-{package}/test-requirements` and add a new line to point to the new test-requirements.txt you created in the previous step so tox can install the correct requirements.
|
||||
|
||||
Example PRs: [#2976](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2976), [#2845](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2845)
|
||||
|
||||
## Guideline for GenAI instrumentations
|
||||
|
||||
Instrumentations that relate to [Generative AI](https://opentelemetry.io/docs/specs/semconv/gen-ai/) systems will be placed in the [instrumentation-genai](./instrumentation-genai) folder. This section covers contributions related to those instrumentations. Please note that the [guidelines for instrumentations](#guideline-for-instrumentations) and [expectations from contributors](#expectations-from-contributors) still apply.
|
||||
|
||||
### Get Involved
|
||||
|
||||
* Reviewing PRs: If you would like to be tagged as reviewer in new PRs related to these instrumentations, please submit a PR to add your GitHub handle to [component_owners.yml](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/component_owners.yml) under the corresponding instrumentation folder(s).
|
||||
|
||||
* Approving PRs: If you would like to be able to approve PRs related to these instrumentations, you must join [opentelemetry-python-contrib-approvers](https://github.com/orgs/open-telemetry/teams/opentelemetry-python-contrib-approvers) team. Please ask one of the [Python contrib maintainers](https://github.com/orgs/open-telemetry/teams/opentelemetry-python-contrib-maintainers) to be accepted into the team.
|
||||
|
||||
* Tracking and Creating Issues: For tracking issues related to Generative AI, please filter or add the label [gen-ai](https://github.com/open-telemetry/opentelemetry-python-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Agen-ai) when creating or searching issues. If you do not see an issue related to an instrumentation you would like to contribute to, please create a new tracking issue so the community is aware of its progress.
|
||||
|
||||
## Expectations from contributors
|
||||
|
||||
OpenTelemetry is an open source community, and as such, greatly encourages contributions from anyone interested in the project. With that being said, there is a certain level of expectation from contributors even after a pull request is merged, specifically pertaining to instrumentations. The OpenTelemetry Python community expects contributors to maintain a level of support and interest in the instrumentations they contribute. This is to ensure that the instrumentation does not become stale and still functions the way the original contributor intended. Some instrumentations also pertain to libraries that the current members of the community are not so familiar with, so it is necessary to rely on the expertise of the original contributing parties.
|
||||
|
||||
## Updating supported Python versions
|
||||
|
||||
### Bumping the Python baseline
|
||||
|
||||
When updating the minimum supported Python version remember to:
|
||||
|
||||
- Remove the version in `pyproject.toml` trove classifiers
|
||||
- Remove the version from `tox.ini`
|
||||
- Update github workflows accordingly with `tox -e generate-workflows`
|
||||
- Search for `sys.version_info` usage and remove code for unsupported versions
|
||||
- Bump `py-version` in `.pylintrc` for Python version dependent checks
|
||||
|
||||
### Adding support for a new Python release
|
||||
|
||||
When adding support for a new Python release remember to:
|
||||
|
||||
- Add the version in `tox.ini`
|
||||
- Add the version in `pyproject.toml` trove classifiers
|
||||
- Update github workflows accordingly with `tox -e generate-workflows`; lint and benchmarks use the latest supported version
|
||||
- Update `.pre-commit-config.yaml`
|
||||
- Update tox examples in the documentation
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -186,7 +186,7 @@
|
|||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright The OpenTelemetry Authors
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
|
@ -186,7 +186,8 @@
|
|||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2016 Datadog, Inc.
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
89
README.md
89
README.md
|
@ -20,8 +20,11 @@
|
|||
<img alt="license" src="https://img.shields.io/badge/license-Apache_2.0-green.svg?style=for-the-badge">
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions?query=workflow%3ATest+branch%3Amaster">
|
||||
<img alt="Build Status" src="https://github.com/open-telemetry/opentelemetry-python-contrib/workflows/Test/badge.svg">
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_0.yml">
|
||||
<img alt="Build Status 0" src="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_0.yml/badge.svg?branch=main">
|
||||
</a>
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_1.yml">
|
||||
<img alt="Build Status 1" src="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_1.yml/badge.svg?branch=main">
|
||||
</a>
|
||||
<img alt="Beta" src="https://img.shields.io/badge/status-beta-informational?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAACQAAAAAQAAAJAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABigAwAEAAAAAQAAABgAAAAA8A2UOAAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAABK5JREFUSA2dVm1sFEUYfmd2b/f2Pkqghn5eEQWKrRgjpkYgpoRCLC0oxV5apAiGUDEpJvwxEQ2raWPU+Kf8INU/RtEedwTCR9tYPloxGNJYTTQUwYqJ1aNpaLH3sXu3t7vjvFevpSqt7eSyM+/czvM8877PzB3APBoLgoDLsNePF56LBwqa07EKlDGg84CcWsI4CEbhNnDpAd951lXE2NkiNknCCTLv4HtzZuvPm1C/IKv4oDNXqNDHragety2XVzjECZsJARuBMyRzJrh1O0gQwLXuxofxsPSj4hG8fMLQo7bl9JJD8XZfC1E5yWFOMtd07dvX5kDwg6+2++Chq8txHGtfPoAp0gOFmhYoNFkHjn2TNUmrwRdna7W1QSkU8hvbGk4uThLrapaiLA2E6QY4u/lS9ItHfvJkxYsTMVtnAJLipYIWtVrcdX+8+b8IVnPl/R81prbuPZ1jpYw+0aEUGSkdFsgyBIaFTXCm6nyaxMtJ4n+TeDhJzGqZtQZcuYDgqDwDbqb0JF9oRpIG1Oea3bC1Y6N3x/WV8Zh83emhCs++hlaghDw+8w5UlYKq2lU7Pl8IkvS9KDqXmKmEwdMppVPKwGSEilmyAwJhRwWcq7wYC6z4wZ1rrEoMWxecdOjZWXeAQClBcYDN3NwVwD9pGwqUSyQgclcmxpNJqCuwLmDh3WtvPqXdlt+6Oz70HPGDNSNBee/EOen+rGbEFqDENBPDbtdCp0ukPANmzO0QQJYUpyS5IJJI3Hqt4maS+EB3199ozm8EDU/6fVNU2dQpdx3ZnKzeFXyaUTiasEV/gZMzJMjr3Z+WvAdQ+hs/zw9savimxUntDSaBdZ2f+Idbm1rlNY8esFffBit9HtK5/MejsrJVxikOXlb1Ukir2X+Rbdkd1KG2Ixfn2Ql4JRmELnYK9mEM8G36fAA3xEQ89fxXihC8q+sAKi9jhHxNqagY2hiaYgRCm0f0QP7H4Fp11LSXiuBY2aYFlh0DeDIVVFUJQn5rCnpiNI2gvLxHnASn9DIVHJJlm5rXvQAGEo4zvKq2w5G1NxENN7jrft1oxMdekETjxdH2Z3x+VTVYsPb+O0C/9/auN6v2hNZw5b2UOmSbG5/rkC3LBA+1PdxFxORjxpQ81GcxKc+ybVjEBvUJvaGJ7p7n5A5KSwe4AzkasA+crmzFtowoIVTiLjANm8GDsrWW35ScI3JY8Urv83tnkF8JR0yLvEt2hO/0qNyy3Jb3YKeHeHeLeOuVLRpNF+pkf85OW7/zJxWdXsbsKBUk2TC0BCPwMq5Q/CPvaJFkNS/1l1qUPe+uH3oD59erYGI/Y4sce6KaXYElAIOLt+0O3t2+/xJDF1XvOlWGC1W1B8VMszbGfOvT5qaRRAIFK3BCO164nZ0uYLH2YjNN8thXS2v2BK9gTfD7jHVxzHr4roOlEvYYz9QIz+Vl/sLDXInsctFsXjqIRnO2ZO387lxmIboLDZCJ59KLFliNIgh9ipt6tLg9SihpRPDO1ia5byw7de1aCQmF5geOQtK509rzfdwxaKOIq+73AvwCC5/5fcV4vo3+3LpMdtWHh0ywsJC/ZGoCb8/9D8F/ifgLLl8S8QWfU8cAAAAASUVORK5CYII=">
|
||||
</p>
|
||||
|
@ -30,17 +33,26 @@
|
|||
<strong>
|
||||
<a href="CONTRIBUTING.md">Contributing<a/>
|
||||
•
|
||||
<a href="https://opentelemetry-python-contrib.readthedocs.io/en/stable/#examples">Examples<a/>
|
||||
<a href="https://opentelemetry-python-contrib.readthedocs.io/en/latest/#instrumentations">Instrumentations<a/>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## OpenTelemetry Python Contrib
|
||||
# OpenTelemetry Python Contrib
|
||||
|
||||
The Python auto-instrumentation libraries for [OpenTelemetry](https://opentelemetry.io/) (per [OTEP 0001](https://github.com/open-telemetry/oteps/blob/main/text/0001-telemetry-without-manual-instrumentation.md))
|
||||
|
||||
### Installation
|
||||
## Index
|
||||
|
||||
* [Installation](#installation)
|
||||
* [Releasing](#releasing)
|
||||
* [Releasing a package as `1.0` stable](#releasing-a-package-as-10-stable)
|
||||
* [Semantic Convention status of instrumentations](#semantic-convention-status-of-instrumentations)
|
||||
* [Contributing](#contributing)
|
||||
* [Thanks to all the people who already contributed](#thanks-to-all-the-people-who-already-contributed)
|
||||
|
||||
## Installation
|
||||
|
||||
This repository includes installable packages for each instrumented library. Libraries that produce telemetry data should only depend on `opentelemetry-api`,
|
||||
and defer the choice of the SDK to the application developer. Applications may
|
||||
|
@ -62,7 +74,7 @@ pip install opentelemetry-instrumentation-{integration}
|
|||
|
||||
To install the development versions of these packages instead, clone or fork
|
||||
this repo and do an [editable
|
||||
install](https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs):
|
||||
install](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs):
|
||||
|
||||
```sh
|
||||
pip install -e ./instrumentation/opentelemetry-instrumentation-{integration}
|
||||
|
@ -79,6 +91,7 @@ To resolve this, members of the community are encouraged to commit to becoming a
|
|||
### Releasing a package as `1.0` stable
|
||||
|
||||
To release a package as `1.0` stable, the package:
|
||||
|
||||
- SHOULD have a CODEOWNER. To become one, submit an issue and explain why you meet the responsibilities found in [CODEOWNERS](.github/CODEOWNERS).
|
||||
- MUST have unit tests that cover all supported versions of the instrumented library.
|
||||
- e.g. Instrumentation packages might use different techniques to instrument different major versions of python packages
|
||||
|
@ -86,54 +99,60 @@ To release a package as `1.0` stable, the package:
|
|||
- e.g. If an instrumentation package uses flags, a token as context, or parameters that are not typical of the `BaseInstrumentor` class, these are documented
|
||||
- After the release of `1.0`, a CODEOWNER may no longer feel like they have the bandwidth to meet the responsibilities of maintaining the package. That's not a problem at all, life happens! However, if that is the case, we ask that the CODEOWNER please raise an issue indicating that they would like to be removed as a CODEOWNER so that they don't get pinged on future PRs. Ultimately, we hope to use that issue to find a new CODEOWNER.
|
||||
|
||||
## Semantic Convention status of instrumentations
|
||||
|
||||
In our efforts to maintain optimal user experience and prevent breaking changes for transitioning into stable semantic conventions, OpenTelemetry Python is adopting the semantic convention migration plan for several instrumentations. Currently this plan is only being adopted for [HTTP-related instrumentations](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/non-normative/http-migration.md), but will eventually cover all types. Please refer to the `semconv status` column of the [instrumentation README](instrumentation/README.md) of the current status of instrumentations' semantic conventions. The possible values are `development`, `stable` and `migration` referring to [status](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.31.0/specification/document-status.md#lifecycle-status) of that particular semantic convention. `Migration` refers to an instrumentation that currently supports the migration plan.
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
We meet weekly on Thursday, and the time of the meeting alternates between 9AM PT and 4PM PT. The meeting is subject to change depending on contributors' availability. Check the [OpenTelemetry community calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com) for specific dates and for the Zoom link.
|
||||
We meet weekly on Thursday at 9AM PT. The meeting is subject to change depending on contributors' availability. Check the [OpenTelemetry community calendar](https://calendar.google.com/calendar/embed?src=c_2bf73e3b6b530da4babd444e72b76a6ad893a5c3f43cf40467abc7a9a897f977%40group.calendar.google.com) for specific dates and for the Zoom link.
|
||||
|
||||
Meeting notes are available as a public [Google doc](https://docs.google.com/document/d/1CIMGoIOZ-c3-igzbd6_Pnxx1SjAkjwqoYSUWxPY8XIs/edit). For edit access, get in touch on [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-python/discussions).
|
||||
|
||||
Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telemetry/teams/python-approvers)):
|
||||
### Maintainers
|
||||
|
||||
- [Aaron Abbott](https://github.com/aabmass), Google
|
||||
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
|
||||
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
|
||||
|
||||
Emeritus Approvers:
|
||||
|
||||
- [Héctor Hernández](https://github.com/hectorhdzg), Microsoft
|
||||
- [Yusuke Tsutsumi](https://github.com/toumorokoshi), Google
|
||||
- [Nathaniel Ruiz Nowell](https://github.com/NathanielRN), AWS
|
||||
- [Ashutosh Goel](https://github.com/ashu658), Cisco
|
||||
|
||||
*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver).*
|
||||
|
||||
Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-telemetry/teams/python-maintainers)):
|
||||
|
||||
- [Diego Hurtado](https://github.com/ocelotl), Lightstep
|
||||
- [Leighton Chen](https://github.com/lzchen), Microsoft
|
||||
- [Riccardo Magliocchetti](https://github.com/xrmx), Elastic
|
||||
- [Shalev Roda](https://github.com/shalevr), Cisco
|
||||
|
||||
Emeritus Maintainers:
|
||||
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
|
||||
|
||||
- [Alex Boten](https://github.com/codeboten), Lightstep
|
||||
### Approvers
|
||||
|
||||
- [Emídio Neto](https://github.com/emdneto), PicPay
|
||||
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
|
||||
- [Owais Lone](https://github.com/owais), Splunk
|
||||
- [Pablo Collins](https://github.com/pmcollins), Splunk
|
||||
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
|
||||
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io
|
||||
- [Tammy Baylis](https://github.com/tammy-baylis-swi), SolarWinds
|
||||
|
||||
*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).*
|
||||
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
|
||||
|
||||
## Running Tests Locally
|
||||
### Emeritus Maintainers
|
||||
|
||||
1. Go to your Contrib repo directory. `cd ~/git/opentelemetry-python-contrib`.
|
||||
2. Create a virtual env in your Contrib repo directory. `python3 -m venv my_test_venv`.
|
||||
3. Activate your virtual env. `source my_test_venv/bin/activate`.
|
||||
4. Make sure you have `tox` installed. `pip install tox`.
|
||||
5. Run tests for a package. (e.g. `tox -e test-instrumentation-flask`.)
|
||||
- [Alex Boten](https://github.com/codeboten)
|
||||
- [Diego Hurtado](https://github.com/ocelotl)
|
||||
- [Owais Lone](https://github.com/owais)
|
||||
- [Yusuke Tsutsumi](https://github.com/toumorokoshi)
|
||||
|
||||
### Thanks to all the people who already contributed!
|
||||
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
|
||||
|
||||
### Emeritus Approvers
|
||||
|
||||
- [Ashutosh Goel](https://github.com/ashu658)
|
||||
- [Héctor Hernández](https://github.com/hectorhdzg)
|
||||
- [Nathaniel Ruiz Nowell](https://github.com/NathanielRN)
|
||||
- [Nikolay Sokolik](https://github.com/nikosokolik)
|
||||
- [Nikolay Sokolik](https://github.com/oxeye-nikolay)
|
||||
|
||||
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
|
||||
|
||||
### Thanks to all of our contributors!
|
||||
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/graphs/contributors">
|
||||
<img src="https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-python-contrib" />
|
||||
<img alt="Repo contributors" src="https://contrib.rocks/image?repo=open-telemetry/opentelemetry-python-contrib" />
|
||||
</a>
|
||||
|
||||
|
|
91
RELEASING.md
91
RELEASING.md
|
@ -7,8 +7,32 @@
|
|||
* If making a pre-release of stable components (e.g. release candidate),
|
||||
enter the pre-release version number, e.g. `1.9.0rc2`.
|
||||
(otherwise the workflow will pick up the version from `main` and just remove the `.dev` suffix).
|
||||
* Review and merge the two pull requests that it creates
|
||||
* Review the two pull requests that it creates.
|
||||
(one is targeted to the release branch and one is targeted to `main`).
|
||||
* The builds will fail for the release PR because of validation rules. Follow the [release workflow](https://github.com/open-telemetry/opentelemetry-python/blob/main/RELEASING.md) for the core repo up until this same point.
|
||||
* Close and reopen the PR so that the workflow will take into account the label automation we have in place
|
||||
* Merge the release PR.
|
||||
* Merge the PR to main (this can be done separately from [making the release](#making-the-release))
|
||||
|
||||
### Preparing a major or minor release for individual package
|
||||
|
||||
> [!NOTE]
|
||||
> Per-package release is supported for the following packages only:
|
||||
> - opentelemetry-propagator-aws-xray
|
||||
> - opentelemetry-resource-detector-azure
|
||||
> - opentelemetry-sdk-extension-aws
|
||||
> - opentelemetry-instrumentation-openai-v2
|
||||
> - opentelemetry-instrumentation-vertexai
|
||||
> - opentelemetry-instrumentation-google-genai
|
||||
>
|
||||
> These libraries are also excluded from the general release.
|
||||
|
||||
Package release preparation is handled by the [`[Package] Prepare release`](./.github/workflows/package-prepare-release.yml) workflow that allows
|
||||
to pick a specific package to release. It follows the same versioning strategy and process as the general release.
|
||||
|
||||
Long-term package release branch follows `package-release/{package-name}/v{major}.{minor}.x` (or `package-release/{package-name}/v{major}.{minor}bx`) naming pattern.
|
||||
|
||||
The workflow will create two pull requests, one against the `main` and one against the `package-release/` branch; both should be merged in order to proceed with the release.
|
||||
|
||||
## Preparing a new patch release
|
||||
|
||||
|
@ -17,6 +41,8 @@
|
|||
* Press the "Run workflow" button, then select the release branch from the dropdown list,
|
||||
e.g. `release/v1.9.x`, then enter the pull request number that you want to backport,
|
||||
then click the "Run workflow" button below that.
|
||||
* Add the label `backport` to the generated pull request.
|
||||
* In case label automation doesn't work, just close and reopen the PR so that the workflow will take into account the label automation we have in place.
|
||||
* Review and merge the backport pull request that it generates.
|
||||
* Merge a pull request to the release branch updating the `CHANGELOG.md`.
|
||||
* The heading for the unreleased entries should be `## Unreleased`.
|
||||
|
@ -24,6 +50,20 @@
|
|||
* Press the "Run workflow" button, then select the release branch from the dropdown list,
|
||||
e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
|
||||
* Review and merge the pull request that it creates for updating the version.
|
||||
* Note: If you are doing a patch release in `-contrib` repo, you should also do an equivalent patch release in `-core` repo (even if there's no fix to release), otherwise tests in CI will fail.
|
||||
|
||||
### Preparing a patch release for individual package
|
||||
|
||||
> [!NOTE]
|
||||
> Per-package release is supported only for packages included in the corresponding workflow. Libraries that support per-package release are currently
|
||||
> excluded from the general patch release.
|
||||
|
||||
Per-package patch release preparation is handled by the [`[Package] Prepare patch release`](./.github/workflows/package-prepare-patch-release.yml) workflow that allows
|
||||
to pick a specific package to release.
|
||||
|
||||
The workflow can only be run against long-term release branch such as `package-release/{package-name}/v{major}.{minor}.x` or `package-release/{package-name}/v{major}.{minor}bx`.
|
||||
|
||||
The workflow will create a pull request that should be merged in order to proceed with the release.
|
||||
|
||||
## Making the release
|
||||
|
||||
|
@ -34,6 +74,33 @@
|
|||
* Review and merge the pull request that it creates for updating the change log in main
|
||||
(note that if this is not a patch release then the change log on main may already be up-to-date,
|
||||
in which case no pull request will be created).
|
||||
* Verify that a new [Github release](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) has been created and that the CHANGELOGs look correct.
|
||||
|
||||
### Releasing individual package
|
||||
|
||||
> [!NOTE]
|
||||
> Per-package patch release is supported for the following packages only:
|
||||
> - opentelemetry-propagator-aws-xray
|
||||
> - opentelemetry-resource-detector-azure
|
||||
> - opentelemetry-sdk-extension-aws
|
||||
> - opentelemetry-instrumentation-openai-v2
|
||||
> - opentelemetry-instrumentation-vertexai
|
||||
> - opentelemetry-instrumentation-google-genai
|
||||
>
|
||||
> These libraries are also excluded from the general patch release.
|
||||
|
||||
Per-package release is handled by the [`[Package] Release`](./.github/workflows/package-release.yml) workflow that allows
|
||||
to pick a specific package to release.
|
||||
|
||||
The workflow can only be run against long-term release branch such as `package-release/{package-name}/v{major}.{minor}.x` or `package-release/{package-name}/v{major}.{minor}bx`.
|
||||
|
||||
## After the release
|
||||
|
||||
* Check PyPI
|
||||
* This should be handled automatically on release by the [publish action](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/release.yml).
|
||||
* Check the [action logs](https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/release.yml) to make sure packages have been uploaded to PyPI
|
||||
* Check the release history (e.g. https://pypi.org/project/opentelemetry-instrumentation/#history) on PyPI
|
||||
* If for some reason the action failed, see [Publish failed](#publish-failed) below
|
||||
|
||||
## Notes about version numbering for stable components
|
||||
|
||||
|
@ -66,25 +133,9 @@
|
|||
* The version number for unstable components in the `main` branch will be bumped to the next version,
|
||||
e.g. `0.{Y+1}b0.dev`.
|
||||
|
||||
## After the release
|
||||
## Releasing dev version of new packages to claim namespace
|
||||
|
||||
* Check PyPI
|
||||
* This should be handled automatically on release by the [publish action](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/release.yml).
|
||||
* Check the [action logs](https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/release.yml) to make sure packages have been uploaded to PyPI
|
||||
* Check the release history (e.g. https://pypi.org/project/opentelemetry-instrumentation/#history) on PyPI
|
||||
* If for some reason the action failed, see [Publish failed](#publish-failed) below
|
||||
* Move stable tag
|
||||
* Run the following (TODO automate):
|
||||
```bash
|
||||
git tag -d stable
|
||||
git tag stable
|
||||
git push --delete origin tagname
|
||||
git push origin stable
|
||||
```
|
||||
* This will ensure the docs are pointing at the stable release.
|
||||
* To validate this worked, ensure the stable build has run successfully:
|
||||
https://readthedocs.org/projects/opentelemetry-python/builds/.
|
||||
If the build has not run automatically, it can be manually trigger via the readthedocs interface.
|
||||
When a contribution introduces a new package, in order to mitigate name-squatting incidents, release the current development version of the new package under the `opentelemetry` user to simply claim the namespace. This should be done shortly after the PR that introduced this package has been merged into `main`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
@ -96,4 +147,4 @@ If for some reason the action failed, do it manually:
|
|||
- Build distributions with `./scripts/build.sh`
|
||||
- Delete distributions we don't want to push (e.g. `testutil`)
|
||||
- Push to PyPI as `twine upload --skip-existing --verbose dist/*`
|
||||
- Double check PyPI!
|
||||
- Double check PyPI!
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
.. include:: ../../../instrumentation/opentelemetry-instrumentation-<REPLACE ME>/README.rst
|
||||
:end-before: References
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.<REPLACE ME>
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -12,7 +12,7 @@ dynamic = ["version"]
|
|||
description = "<REPLACE ME>"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
|
@ -22,30 +22,26 @@ classifiers = [
|
|||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
]
|
||||
dependencies = [
|
||||
"opentelemetry-api ~= 1.12",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
test = [
|
||||
# add any test dependencies here
|
||||
"<REPLACE ME>",
|
||||
]
|
||||
|
||||
[project.entry-points.opentelemetry_instrumentor]
|
||||
# REPLACE ME: the entrypoint for the instrumentor e.g
|
||||
# sqlalchemy = "opentelemetry.instrumentation.sqlalchemy:SQLAlchemyInstrumentor"
|
||||
<REPLACE ME> = "opentelemetry.instrumentation.<REPLACE>"
|
||||
REPLACE_ME = "opentelemetry.instrumentation.<REPLACE>"
|
||||
|
||||
[project.urls]
|
||||
# url of the instrumentation e.g
|
||||
# Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-sqlalchemy"
|
||||
Homepage = "<REPLACE ME>"
|
||||
Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
|
||||
|
||||
[tool.hatch.version]
|
||||
# REPLACE ME: the path to the version file e.g
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
__version__ = "0.44b0.dev"
|
||||
__version__ = "0.57b0.dev"
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
pylint==3.0.2
|
||||
flake8==6.1.0
|
||||
isort==5.12.0
|
||||
black==22.3.0
|
||||
httpretty==1.1.4
|
||||
mypy==0.931
|
||||
pyright==v1.1.396
|
||||
sphinx==7.1.2
|
||||
sphinx-rtd-theme==2.0.0rc4
|
||||
sphinx-autodoc-typehints==1.25.2
|
||||
pytest==7.1.3
|
||||
pytest==7.4.4
|
||||
pytest-cov==4.1.0
|
||||
readme-renderer==42.0
|
||||
bleach==4.1.0 # transient dependency for readme-renderer
|
||||
protobuf~=3.13
|
||||
markupsafe>=2.0.1
|
||||
codespell==2.1.0
|
||||
requests==2.31.0
|
||||
requests==2.32.3
|
||||
ruamel.yaml==0.17.21
|
||||
flaky==3.7.0
|
||||
pre-commit==3.7.0; python_version >= '3.9'
|
||||
pre-commit==3.5.0; python_version < '3.9'
|
||||
ruff==0.6.9
|
||||
|
|
|
@ -2,14 +2,6 @@ sphinx==7.1.2
|
|||
sphinx-rtd-theme==2.0.0rc4
|
||||
sphinx-autodoc-typehints==1.25.2
|
||||
|
||||
# Need to install the api/sdk in the venv for autodoc. Modifying sys.path
|
||||
# doesn't work for pkg_resources.
|
||||
-e "git+https://github.com/open-telemetry/opentelemetry-python.git#egg=opentelemetry-api&subdirectory=opentelemetry-api"
|
||||
-e "git+https://github.com/open-telemetry/opentelemetry-python.git#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions"
|
||||
-e "git+https://github.com/open-telemetry/opentelemetry-python.git#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk"
|
||||
-e "git+https://github.com/open-telemetry/opentelemetry-python-contrib.git#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http"
|
||||
./opentelemetry-instrumentation
|
||||
|
||||
# Required by opentelemetry-instrumentation
|
||||
fastapi>=0.65.2
|
||||
pymemcache~=1.3
|
||||
|
@ -20,32 +12,37 @@ django>=2.2
|
|||
# Required by instrumentation and exporter packages
|
||||
aio_pika~=7.2.0
|
||||
aiohttp~=3.0
|
||||
aiokafka~=0.11.0
|
||||
aiopg>=0.13.0,<1.3.0
|
||||
asyncpg>=0.12.0
|
||||
asyncclick~=8.0
|
||||
boto~=2.0
|
||||
botocore~=1.0
|
||||
boto3~=1.0
|
||||
cassandra-driver~=3.25
|
||||
celery>=4.0
|
||||
confluent-kafka>= 1.8.2,<= 2.3.0
|
||||
elasticsearch>=2.0,<9.0
|
||||
confluent-kafka>= 1.8.2,<= 2.4.0
|
||||
elasticsearch>=6.0,<9.0
|
||||
flask~=2.0
|
||||
falcon~=2.0
|
||||
grpcio~=1.27
|
||||
httpx>=0.18.0
|
||||
kafka-python>=2.0,<3.0
|
||||
mysql-connector-python~=8.0
|
||||
mysqlclient~=2.1.1
|
||||
openai >= 1.26.0
|
||||
psutil>=5
|
||||
psycopg~=3.1.17
|
||||
pika>=0.12.0
|
||||
pymongo~=3.1
|
||||
PyMySQL~=0.9.3
|
||||
pymongo~=4.6.3
|
||||
PyMySQL~=1.1.1
|
||||
pymssql~=2.3.2
|
||||
pyramid>=1.7
|
||||
redis>=2.6
|
||||
remoulade>=0.50
|
||||
sqlalchemy>=1.0
|
||||
tornado>=5.1.1
|
||||
tortoise-orm>=0.17.0
|
||||
httpx>=0.18.0
|
||||
|
||||
# indirect dependency pins
|
||||
markupsafe==2.0.1
|
||||
|
|
17
docs/conf.py
17
docs/conf.py
|
@ -40,6 +40,13 @@ instr_dirs = [
|
|||
if isdir(join(instr, f))
|
||||
]
|
||||
|
||||
instr_genai = "../instrumentation-genai"
|
||||
instr_genai_dirs = [
|
||||
os.path.abspath("/".join(["../instrumentation-genai", f, "src"]))
|
||||
for f in listdir(instr_genai)
|
||||
if isdir(join(instr_genai, f))
|
||||
]
|
||||
|
||||
prop = "../propagator"
|
||||
prop_dirs = [
|
||||
os.path.abspath("/".join([prop, f, "src"]))
|
||||
|
@ -60,7 +67,14 @@ resource_dirs = [
|
|||
for f in listdir(resource)
|
||||
if isdir(join(resource, f))
|
||||
]
|
||||
sys.path[:0] = exp_dirs + instr_dirs + sdk_ext_dirs + prop_dirs + resource_dirs
|
||||
sys.path[:0] = (
|
||||
exp_dirs
|
||||
+ instr_dirs
|
||||
+ instr_genai_dirs
|
||||
+ sdk_ext_dirs
|
||||
+ prop_dirs
|
||||
+ resource_dirs
|
||||
)
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
|
@ -108,6 +122,7 @@ intersphinx_mapping = {
|
|||
"https://opentelemetry-python.readthedocs.io/en/latest/",
|
||||
None,
|
||||
),
|
||||
"redis": ("https://redis.readthedocs.io/en/latest/", None),
|
||||
}
|
||||
|
||||
# http://www.sphinx-doc.org/en/master/config.html#confval-nitpicky
|
||||
|
|
|
@ -22,9 +22,9 @@ installed separately via pip:
|
|||
|
||||
pip install opentelemetry-exporter-{exporter}
|
||||
pip install opentelemetry-instrumentation-{instrumentation}
|
||||
pip install opentelemetry-sdk-extension-{sdkextension}
|
||||
pip install opentelemetry-sdk-extension-{sdk-extension}
|
||||
|
||||
A complete list of packages can be found at the
|
||||
A complete list of packages can be found at the
|
||||
`Contrib repo instrumentation <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation>`_
|
||||
and `Contrib repo exporter <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/exporter>`_ directories.
|
||||
|
||||
|
@ -50,8 +50,9 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
|
|||
cd opentelemetry-python-contrib
|
||||
pip install -e ./instrumentation/opentelemetry-instrumentation-flask
|
||||
pip install -e ./instrumentation/opentelemetry-instrumentation-botocore
|
||||
pip install -e ./instrumentation-genai/opentelemetry-instrumentation-openai-v2
|
||||
pip install -e ./sdk-extension/opentelemetry-sdk-extension-aws
|
||||
pip install -e ./resource/opentelemetry-resource-detector-container
|
||||
pip install -e ./resource/opentelemetry-resource-detector-containerid
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
@ -62,6 +63,14 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
|
|||
|
||||
instrumentation/**
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: OpenTelemetry Generative AI Instrumentations
|
||||
:name: Generative AI Instrumentations
|
||||
:glob:
|
||||
|
||||
instrumentation-genai/**
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: OpenTelemetry Propagators
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
OpenTelemetry Python - OpenAI Instrumentation
|
||||
=============================================
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.openai_v2
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -0,0 +1,7 @@
|
|||
.. include:: ../../../instrumentation/opentelemetry-instrumentation-aiohttp-server/README.rst
|
||||
:end-before: References
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.aiohttp_server
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -0,0 +1,10 @@
|
|||
.. include:: ../../../instrumentation/opentelemetry-instrumentation-aiokafka/README.rst
|
||||
:end-before: References
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.aiokafka
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -0,0 +1,7 @@
|
|||
.. include:: ../../../instrumentation/opentelemetry-instrumentation-asyncclick/README.rst
|
||||
:end-before: References
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.asyncclick
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -0,0 +1,7 @@
|
|||
.. include:: ../../../instrumentation/opentelemetry-instrumentation-click/README.rst
|
||||
:end-before: References
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.click
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -0,0 +1,7 @@
|
|||
OpenTelemetry Psycopg Instrumentation
|
||||
=====================================
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.psycopg
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -1,5 +1,5 @@
|
|||
OpenTelemetry Psycopg Instrumentation
|
||||
=====================================
|
||||
OpenTelemetry Psycopg2 Instrumentation
|
||||
======================================
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.psycopg2
|
||||
:members:
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
OpenTelemetry pymssql Instrumentation
|
||||
=====================================
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.pymssql
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -1,7 +1,10 @@
|
|||
OpenTelemetry Redis Instrumentation
|
||||
===================================
|
||||
.. include:: ../../../instrumentation/opentelemetry-instrumentation-redis/README.rst
|
||||
:end-before: References
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.redis
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:show-inheritance:
|
|
@ -0,0 +1,7 @@
|
|||
OpenTelemetry Threading Instrumentation
|
||||
=======================================
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.threading
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -24,10 +24,14 @@ py-class=
|
|||
httpx.Client
|
||||
httpx.AsyncClient
|
||||
httpx.BaseTransport
|
||||
openai.BaseTransport
|
||||
httpx.AsyncBaseTransport
|
||||
httpx.SyncByteStream
|
||||
httpx.AsyncByteStream
|
||||
httpx.Response
|
||||
httpx.URL
|
||||
httpx.Headers
|
||||
aiohttp.web_request.Request
|
||||
yarl.URL
|
||||
cimpl.Producer
|
||||
cimpl.Consumer
|
||||
|
@ -37,6 +41,10 @@ py-class=
|
|||
callable
|
||||
Consumer
|
||||
confluent_kafka.Message
|
||||
psycopg.Connection
|
||||
psycopg.AsyncConnection
|
||||
ObjectProxy
|
||||
fastapi.applications.FastAPI
|
||||
|
||||
any=
|
||||
; API
|
||||
|
@ -64,7 +72,9 @@ any=
|
|||
|
||||
py-obj=
|
||||
opentelemetry.propagators.textmap.CarrierT
|
||||
|
||||
opentelemetry.instrumentation.dbapi.ConnectionT
|
||||
opentelemetry.instrumentation.dbapi.CursorT
|
||||
|
||||
py-func=
|
||||
poll
|
||||
flush
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
OpenTelemetry Python - Resource Detector for Containers
|
||||
=======================================================
|
||||
|
||||
.. automodule:: opentelemetry.resource.detector.container
|
||||
.. automodule:: opentelemetry.resource.detector.containerid
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
|
11
eachdist.ini
11
eachdist.ini
|
@ -16,7 +16,7 @@ sortfirst=
|
|||
ext/*
|
||||
|
||||
[stable]
|
||||
version=1.23.0.dev
|
||||
version=1.36.0.dev
|
||||
|
||||
packages=
|
||||
opentelemetry-sdk
|
||||
|
@ -34,7 +34,7 @@ packages=
|
|||
opentelemetry-api
|
||||
|
||||
[prerelease]
|
||||
version=0.44b0.dev
|
||||
version=0.57b0.dev
|
||||
|
||||
packages=
|
||||
all
|
||||
|
@ -43,18 +43,21 @@ packages=
|
|||
opentelemetry-instrumentation
|
||||
opentelemetry-contrib-instrumentations
|
||||
opentelemetry-distro
|
||||
opentelemetry-resource-detector-container
|
||||
opentelemetry-resource-detector-containerid
|
||||
|
||||
[exclude_release]
|
||||
packages=
|
||||
opentelemetry-resource-detector-azure
|
||||
opentelemetry-sdk-extension-aws
|
||||
opentelemetry-propagator-aws-xray
|
||||
opentelemetry-instrumentation-google-genai
|
||||
opentelemetry-instrumentation-vertexai
|
||||
opentelemetry-instrumentation-openai-v2
|
||||
opentelemetry-instrumentation-test
|
||||
|
||||
[lintroots]
|
||||
extraroots=examples/*,scripts/
|
||||
subglob=*.py,tests/,test/,src/*,examples/*
|
||||
ignore=sklearn
|
||||
|
||||
[testroots]
|
||||
extraroots=examples/*,tests/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.8
|
||||
FROM python:3.9
|
||||
|
||||
RUN apt-get update -y && apt-get install libsnappy-dev -y
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
## Instructions
|
||||
1. Install protobuf tools. Can use your package manager or download from [GitHub](https://github.com/protocolbuffers/protobuf/releases/tag/v21.7)
|
||||
2. Run `generate-proto-py.sh` from inside the `proto/` directory
|
||||
1. Install protobuf tools. Can use your package manager or download from [GitHub](https://github.com/protocolbuffers/protobuf/releases/tag/v26.0)
|
||||
2. Run `generate-proto-py.sh` from inside the `proto/` directory
|
|
@ -1,11 +1,11 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
PROM_VERSION=v2.39.0
|
||||
PROTO_VERSION=v1.3.2
|
||||
|
||||
# SRC_DIR is from protoc perspective. ie its the destination for our checkouts/clones
|
||||
SRC_DIR=opentelemetry/exporter/prometheus_remote_write/gen/
|
||||
DST_DIR=../src/opentelemetry/exporter/prometheus_remote_write/gen/
|
||||
|
||||
#TODO:
|
||||
# Check that black & protoc are installed properly
|
||||
|
@ -49,7 +49,7 @@ sed -i 's/import "gogoproto\/gogo.proto";/import "opentelemetry\/exporter\/prome
|
|||
echo "Removing clones..."
|
||||
rm -rf protobuf prometheus
|
||||
|
||||
# Used libprotoc 3.21.1 & protoc 21.7
|
||||
# Used libprotoc 26
|
||||
echo "Compiling proto files to Python"
|
||||
protoc -I . --python_out=../src ${SRC_DIR}/gogoproto/gogo.proto ${SRC_DIR}/remote.proto ${SRC_DIR}/types.proto
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ dynamic = ["version"]
|
|||
description = "Prometheus Remote Write Metrics Exporter for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
|
@ -19,23 +19,23 @@ classifiers = [
|
|||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
]
|
||||
dependencies = [
|
||||
"protobuf ~= 4.21",
|
||||
"protobuf ~= 5.26",
|
||||
"requests ~= 2.28",
|
||||
"opentelemetry-api ~= 1.12",
|
||||
"opentelemetry-sdk ~= 1.12",
|
||||
"python-snappy ~= 0.6",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
test = []
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/exporter/opentelemetry-exporter-prometheus-remote-write"
|
||||
Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "src/opentelemetry/exporter/prometheus_remote_write/version.py"
|
||||
|
|
|
@ -16,7 +16,7 @@ import logging
|
|||
import re
|
||||
from collections import defaultdict
|
||||
from itertools import chain
|
||||
from typing import Dict, Sequence
|
||||
from typing import Dict, Mapping, Sequence
|
||||
|
||||
import requests
|
||||
import snappy
|
||||
|
@ -29,14 +29,14 @@ from opentelemetry.exporter.prometheus_remote_write.gen.types_pb2 import ( # py
|
|||
Sample,
|
||||
TimeSeries,
|
||||
)
|
||||
from opentelemetry.sdk.metrics import Counter
|
||||
from opentelemetry.sdk.metrics import Histogram as ClientHistogram
|
||||
from opentelemetry.sdk.metrics import (
|
||||
Counter,
|
||||
ObservableCounter,
|
||||
ObservableGauge,
|
||||
ObservableUpDownCounter,
|
||||
UpDownCounter,
|
||||
)
|
||||
from opentelemetry.sdk.metrics import Histogram as ClientHistogram
|
||||
from opentelemetry.sdk.metrics.export import (
|
||||
AggregationTemporality,
|
||||
Gauge,
|
||||
|
@ -253,12 +253,14 @@ class PrometheusRemoteWriteMetricsExporter(MetricExporter):
|
|||
return self._convert_to_timeseries(sample_sets, resource_labels)
|
||||
|
||||
def _convert_to_timeseries(
|
||||
self, sample_sets: Sequence[tuple], resource_labels: Sequence
|
||||
self, sample_sets: Mapping[tuple, Sequence], resource_labels: Sequence
|
||||
) -> Sequence[TimeSeries]:
|
||||
timeseries = []
|
||||
for labels, samples in sample_sets.items():
|
||||
ts = TimeSeries()
|
||||
for label_name, label_value in chain(resource_labels, labels):
|
||||
for label_name, label_value in sorted(
|
||||
chain(resource_labels, labels)
|
||||
):
|
||||
# Previous implementation did not str() the names...
|
||||
ts.labels.append(self._label(label_name, str(label_value)))
|
||||
for value, timestamp in samples:
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,58 +1,45 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: opentelemetry/exporter/prometheus_remote_write/gen/remote.proto
|
||||
# Protobuf Python Version: 5.26.0
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf.internal import builder as _builder
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from opentelemetry.exporter.prometheus_remote_write.gen import (
|
||||
types_pb2 as opentelemetry_dot_exporter_dot_prometheus__remote__write_dot_gen_dot_types__pb2,
|
||||
)
|
||||
from opentelemetry.exporter.prometheus_remote_write.gen.gogoproto import (
|
||||
gogo_pb2 as opentelemetry_dot_exporter_dot_prometheus__remote__write_dot_gen_dot_gogoproto_dot_gogo__pb2,
|
||||
)
|
||||
from opentelemetry.exporter.prometheus_remote_write.gen import types_pb2 as opentelemetry_dot_exporter_dot_prometheus__remote__write_dot_gen_dot_types__pb2
|
||||
from opentelemetry.exporter.prometheus_remote_write.gen.gogoproto import gogo_pb2 as opentelemetry_dot_exporter_dot_prometheus__remote__write_dot_gen_dot_gogoproto_dot_gogo__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
||||
b'\n?opentelemetry/exporter/prometheus_remote_write/gen/remote.proto\x12\nprometheus\x1a>opentelemetry/exporter/prometheus_remote_write/gen/types.proto\x1aGopentelemetry/exporter/prometheus_remote_write/gen/gogoproto/gogo.proto"z\n\x0cWriteRequest\x12\x30\n\ntimeseries\x18\x01 \x03(\x0b\x32\x16.prometheus.TimeSeriesB\x04\xc8\xde\x1f\x00\x12\x32\n\x08metadata\x18\x03 \x03(\x0b\x32\x1a.prometheus.MetricMetadataB\x04\xc8\xde\x1f\x00J\x04\x08\x02\x10\x03"\xae\x01\n\x0bReadRequest\x12"\n\x07queries\x18\x01 \x03(\x0b\x32\x11.prometheus.Query\x12\x45\n\x17\x61\x63\x63\x65pted_response_types\x18\x02 \x03(\x0e\x32$.prometheus.ReadRequest.ResponseType"4\n\x0cResponseType\x12\x0b\n\x07SAMPLES\x10\x00\x12\x17\n\x13STREAMED_XOR_CHUNKS\x10\x01"8\n\x0cReadResponse\x12(\n\x07results\x18\x01 \x03(\x0b\x32\x17.prometheus.QueryResult"\x8f\x01\n\x05Query\x12\x1a\n\x12start_timestamp_ms\x18\x01 \x01(\x03\x12\x18\n\x10\x65nd_timestamp_ms\x18\x02 \x01(\x03\x12*\n\x08matchers\x18\x03 \x03(\x0b\x32\x18.prometheus.LabelMatcher\x12$\n\x05hints\x18\x04 \x01(\x0b\x32\x15.prometheus.ReadHints"9\n\x0bQueryResult\x12*\n\ntimeseries\x18\x01 \x03(\x0b\x32\x16.prometheus.TimeSeries"]\n\x13\x43hunkedReadResponse\x12\x31\n\x0e\x63hunked_series\x18\x01 \x03(\x0b\x32\x19.prometheus.ChunkedSeries\x12\x13\n\x0bquery_index\x18\x02 \x01(\x03\x42\x08Z\x06prompbb\x06proto3'
|
||||
)
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n?opentelemetry/exporter/prometheus_remote_write/gen/remote.proto\x12\nprometheus\x1a>opentelemetry/exporter/prometheus_remote_write/gen/types.proto\x1aGopentelemetry/exporter/prometheus_remote_write/gen/gogoproto/gogo.proto\"z\n\x0cWriteRequest\x12\x30\n\ntimeseries\x18\x01 \x03(\x0b\x32\x16.prometheus.TimeSeriesB\x04\xc8\xde\x1f\x00\x12\x32\n\x08metadata\x18\x03 \x03(\x0b\x32\x1a.prometheus.MetricMetadataB\x04\xc8\xde\x1f\x00J\x04\x08\x02\x10\x03\"\xae\x01\n\x0bReadRequest\x12\"\n\x07queries\x18\x01 \x03(\x0b\x32\x11.prometheus.Query\x12\x45\n\x17\x61\x63\x63\x65pted_response_types\x18\x02 \x03(\x0e\x32$.prometheus.ReadRequest.ResponseType\"4\n\x0cResponseType\x12\x0b\n\x07SAMPLES\x10\x00\x12\x17\n\x13STREAMED_XOR_CHUNKS\x10\x01\"8\n\x0cReadResponse\x12(\n\x07results\x18\x01 \x03(\x0b\x32\x17.prometheus.QueryResult\"\x8f\x01\n\x05Query\x12\x1a\n\x12start_timestamp_ms\x18\x01 \x01(\x03\x12\x18\n\x10\x65nd_timestamp_ms\x18\x02 \x01(\x03\x12*\n\x08matchers\x18\x03 \x03(\x0b\x32\x18.prometheus.LabelMatcher\x12$\n\x05hints\x18\x04 \x01(\x0b\x32\x15.prometheus.ReadHints\"9\n\x0bQueryResult\x12*\n\ntimeseries\x18\x01 \x03(\x0b\x32\x16.prometheus.TimeSeries\"]\n\x13\x43hunkedReadResponse\x12\x31\n\x0e\x63hunked_series\x18\x01 \x03(\x0b\x32\x19.prometheus.ChunkedSeries\x12\x13\n\x0bquery_index\x18\x02 \x01(\x03\x42\x08Z\x06prompbb\x06proto3')
|
||||
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
||||
_builder.BuildTopDescriptorsAndMessages(
|
||||
DESCRIPTOR,
|
||||
"opentelemetry.exporter.prometheus_remote_write.gen.remote_pb2",
|
||||
globals(),
|
||||
)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
DESCRIPTOR._options = None
|
||||
DESCRIPTOR._serialized_options = b"Z\006prompb"
|
||||
_WRITEREQUEST.fields_by_name["timeseries"]._options = None
|
||||
_WRITEREQUEST.fields_by_name[
|
||||
"timeseries"
|
||||
]._serialized_options = b"\310\336\037\000"
|
||||
_WRITEREQUEST.fields_by_name["metadata"]._options = None
|
||||
_WRITEREQUEST.fields_by_name[
|
||||
"metadata"
|
||||
]._serialized_options = b"\310\336\037\000"
|
||||
_WRITEREQUEST._serialized_start = 216
|
||||
_WRITEREQUEST._serialized_end = 338
|
||||
_READREQUEST._serialized_start = 341
|
||||
_READREQUEST._serialized_end = 515
|
||||
_READREQUEST_RESPONSETYPE._serialized_start = 463
|
||||
_READREQUEST_RESPONSETYPE._serialized_end = 515
|
||||
_READRESPONSE._serialized_start = 517
|
||||
_READRESPONSE._serialized_end = 573
|
||||
_QUERY._serialized_start = 576
|
||||
_QUERY._serialized_end = 719
|
||||
_QUERYRESULT._serialized_start = 721
|
||||
_QUERYRESULT._serialized_end = 778
|
||||
_CHUNKEDREADRESPONSE._serialized_start = 780
|
||||
_CHUNKEDREADRESPONSE._serialized_end = 873
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'opentelemetry.exporter.prometheus_remote_write.gen.remote_pb2', _globals)
|
||||
if not _descriptor._USE_C_DESCRIPTORS:
|
||||
_globals['DESCRIPTOR']._loaded_options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'Z\006prompb'
|
||||
_globals['_WRITEREQUEST'].fields_by_name['timeseries']._loaded_options = None
|
||||
_globals['_WRITEREQUEST'].fields_by_name['timeseries']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_WRITEREQUEST'].fields_by_name['metadata']._loaded_options = None
|
||||
_globals['_WRITEREQUEST'].fields_by_name['metadata']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_WRITEREQUEST']._serialized_start=216
|
||||
_globals['_WRITEREQUEST']._serialized_end=338
|
||||
_globals['_READREQUEST']._serialized_start=341
|
||||
_globals['_READREQUEST']._serialized_end=515
|
||||
_globals['_READREQUEST_RESPONSETYPE']._serialized_start=463
|
||||
_globals['_READREQUEST_RESPONSETYPE']._serialized_end=515
|
||||
_globals['_READRESPONSE']._serialized_start=517
|
||||
_globals['_READRESPONSE']._serialized_end=573
|
||||
_globals['_QUERY']._serialized_start=576
|
||||
_globals['_QUERY']._serialized_end=719
|
||||
_globals['_QUERYRESULT']._serialized_start=721
|
||||
_globals['_QUERYRESULT']._serialized_end=778
|
||||
_globals['_CHUNKEDREADRESPONSE']._serialized_start=780
|
||||
_globals['_CHUNKEDREADRESPONSE']._serialized_end=873
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
|
|
|
@ -1,85 +1,66 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: opentelemetry/exporter/prometheus_remote_write/gen/types.proto
|
||||
# Protobuf Python Version: 5.26.0
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf.internal import builder as _builder
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from opentelemetry.exporter.prometheus_remote_write.gen.gogoproto import (
|
||||
gogo_pb2 as opentelemetry_dot_exporter_dot_prometheus__remote__write_dot_gen_dot_gogoproto_dot_gogo__pb2,
|
||||
)
|
||||
from opentelemetry.exporter.prometheus_remote_write.gen.gogoproto import gogo_pb2 as opentelemetry_dot_exporter_dot_prometheus__remote__write_dot_gen_dot_gogoproto_dot_gogo__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
||||
b'\n>opentelemetry/exporter/prometheus_remote_write/gen/types.proto\x12\nprometheus\x1aGopentelemetry/exporter/prometheus_remote_write/gen/gogoproto/gogo.proto"\xf8\x01\n\x0eMetricMetadata\x12\x33\n\x04type\x18\x01 \x01(\x0e\x32%.prometheus.MetricMetadata.MetricType\x12\x1a\n\x12metric_family_name\x18\x02 \x01(\t\x12\x0c\n\x04help\x18\x04 \x01(\t\x12\x0c\n\x04unit\x18\x05 \x01(\t"y\n\nMetricType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07\x43OUNTER\x10\x01\x12\t\n\x05GAUGE\x10\x02\x12\r\n\tHISTOGRAM\x10\x03\x12\x12\n\x0eGAUGEHISTOGRAM\x10\x04\x12\x0b\n\x07SUMMARY\x10\x05\x12\x08\n\x04INFO\x10\x06\x12\x0c\n\x08STATESET\x10\x07"*\n\x06Sample\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x11\n\ttimestamp\x18\x02 \x01(\x03"U\n\x08\x45xemplar\x12\'\n\x06labels\x18\x01 \x03(\x0b\x32\x11.prometheus.LabelB\x04\xc8\xde\x1f\x00\x12\r\n\x05value\x18\x02 \x01(\x01\x12\x11\n\ttimestamp\x18\x03 \x01(\x03"\x8f\x01\n\nTimeSeries\x12\'\n\x06labels\x18\x01 \x03(\x0b\x32\x11.prometheus.LabelB\x04\xc8\xde\x1f\x00\x12)\n\x07samples\x18\x02 \x03(\x0b\x32\x12.prometheus.SampleB\x04\xc8\xde\x1f\x00\x12-\n\texemplars\x18\x03 \x03(\x0b\x32\x14.prometheus.ExemplarB\x04\xc8\xde\x1f\x00"$\n\x05Label\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t"1\n\x06Labels\x12\'\n\x06labels\x18\x01 \x03(\x0b\x32\x11.prometheus.LabelB\x04\xc8\xde\x1f\x00"\x82\x01\n\x0cLabelMatcher\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.prometheus.LabelMatcher.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t"(\n\x04Type\x12\x06\n\x02\x45Q\x10\x00\x12\x07\n\x03NEQ\x10\x01\x12\x06\n\x02RE\x10\x02\x12\x07\n\x03NRE\x10\x03"|\n\tReadHints\x12\x0f\n\x07step_ms\x18\x01 \x01(\x03\x12\x0c\n\x04\x66unc\x18\x02 \x01(\t\x12\x10\n\x08start_ms\x18\x03 \x01(\x03\x12\x0e\n\x06\x65nd_ms\x18\x04 \x01(\x03\x12\x10\n\x08grouping\x18\x05 \x03(\t\x12\n\n\x02\x62y\x18\x06 \x01(\x08\x12\x10\n\x08range_ms\x18\x07 \x01(\x03"\x8b\x01\n\x05\x43hunk\x12\x13\n\x0bmin_time_ms\x18\x01 \x01(\x03\x12\x13\n\x0bmax_time_ms\x18\x02 \x01(\x03\x12(\n\x04type\x18\x03 \x01(\x0e\x32\x1a.prometheus.Chunk.Encoding\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c" \n\x08\x45ncoding\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03XOR\x10\x01"a\n\rChunkedSeries\x12\'\n\x06labels\x18\x01 \x03(\x0b\x32\x11.prometheus.LabelB\x04\xc8\xde\x1f\x00\x12\'\n\x06\x63hunks\x18\x02 \x03(\x0b\x32\x11.prometheus.ChunkB\x04\xc8\xde\x1f\x00\x42\x08Z\x06prompbb\x06proto3'
|
||||
)
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n>opentelemetry/exporter/prometheus_remote_write/gen/types.proto\x12\nprometheus\x1aGopentelemetry/exporter/prometheus_remote_write/gen/gogoproto/gogo.proto\"\xf8\x01\n\x0eMetricMetadata\x12\x33\n\x04type\x18\x01 \x01(\x0e\x32%.prometheus.MetricMetadata.MetricType\x12\x1a\n\x12metric_family_name\x18\x02 \x01(\t\x12\x0c\n\x04help\x18\x04 \x01(\t\x12\x0c\n\x04unit\x18\x05 \x01(\t\"y\n\nMetricType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07\x43OUNTER\x10\x01\x12\t\n\x05GAUGE\x10\x02\x12\r\n\tHISTOGRAM\x10\x03\x12\x12\n\x0eGAUGEHISTOGRAM\x10\x04\x12\x0b\n\x07SUMMARY\x10\x05\x12\x08\n\x04INFO\x10\x06\x12\x0c\n\x08STATESET\x10\x07\"*\n\x06Sample\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\"U\n\x08\x45xemplar\x12\'\n\x06labels\x18\x01 \x03(\x0b\x32\x11.prometheus.LabelB\x04\xc8\xde\x1f\x00\x12\r\n\x05value\x18\x02 \x01(\x01\x12\x11\n\ttimestamp\x18\x03 \x01(\x03\"\x8f\x01\n\nTimeSeries\x12\'\n\x06labels\x18\x01 \x03(\x0b\x32\x11.prometheus.LabelB\x04\xc8\xde\x1f\x00\x12)\n\x07samples\x18\x02 \x03(\x0b\x32\x12.prometheus.SampleB\x04\xc8\xde\x1f\x00\x12-\n\texemplars\x18\x03 \x03(\x0b\x32\x14.prometheus.ExemplarB\x04\xc8\xde\x1f\x00\"$\n\x05Label\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"1\n\x06Labels\x12\'\n\x06labels\x18\x01 \x03(\x0b\x32\x11.prometheus.LabelB\x04\xc8\xde\x1f\x00\"\x82\x01\n\x0cLabelMatcher\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.prometheus.LabelMatcher.Type\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"(\n\x04Type\x12\x06\n\x02\x45Q\x10\x00\x12\x07\n\x03NEQ\x10\x01\x12\x06\n\x02RE\x10\x02\x12\x07\n\x03NRE\x10\x03\"|\n\tReadHints\x12\x0f\n\x07step_ms\x18\x01 \x01(\x03\x12\x0c\n\x04\x66unc\x18\x02 \x01(\t\x12\x10\n\x08start_ms\x18\x03 \x01(\x03\x12\x0e\n\x06\x65nd_ms\x18\x04 \x01(\x03\x12\x10\n\x08grouping\x18\x05 \x03(\t\x12\n\n\x02\x62y\x18\x06 \x01(\x08\x12\x10\n\x08range_ms\x18\x07 \x01(\x03\"\x8b\x01\n\x05\x43hunk\x12\x13\n\x0bmin_time_ms\x18\x01 \x01(\x03\x12\x13\n\x0bmax_time_ms\x18\x02 \x01(\x03\x12(\n\x04type\x18\x03 \x01(\x0e\x32\x1a.prometheus.Chunk.Encoding\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\" \n\x08\x45ncoding\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03XOR\x10\x01\"a\n\rChunkedSeries\x12\'\n\x06labels\x18\x01 \x03(\x0b\x32\x11.prometheus.LabelB\x04\xc8\xde\x1f\x00\x12\'\n\x06\x63hunks\x18\x02 \x03(\x0b\x32\x11.prometheus.ChunkB\x04\xc8\xde\x1f\x00\x42\x08Z\x06prompbb\x06proto3')
|
||||
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
||||
_builder.BuildTopDescriptorsAndMessages(
|
||||
DESCRIPTOR,
|
||||
"opentelemetry.exporter.prometheus_remote_write.gen.types_pb2",
|
||||
globals(),
|
||||
)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
DESCRIPTOR._options = None
|
||||
DESCRIPTOR._serialized_options = b"Z\006prompb"
|
||||
_EXEMPLAR.fields_by_name["labels"]._options = None
|
||||
_EXEMPLAR.fields_by_name[
|
||||
"labels"
|
||||
]._serialized_options = b"\310\336\037\000"
|
||||
_TIMESERIES.fields_by_name["labels"]._options = None
|
||||
_TIMESERIES.fields_by_name[
|
||||
"labels"
|
||||
]._serialized_options = b"\310\336\037\000"
|
||||
_TIMESERIES.fields_by_name["samples"]._options = None
|
||||
_TIMESERIES.fields_by_name[
|
||||
"samples"
|
||||
]._serialized_options = b"\310\336\037\000"
|
||||
_TIMESERIES.fields_by_name["exemplars"]._options = None
|
||||
_TIMESERIES.fields_by_name[
|
||||
"exemplars"
|
||||
]._serialized_options = b"\310\336\037\000"
|
||||
_LABELS.fields_by_name["labels"]._options = None
|
||||
_LABELS.fields_by_name["labels"]._serialized_options = b"\310\336\037\000"
|
||||
_CHUNKEDSERIES.fields_by_name["labels"]._options = None
|
||||
_CHUNKEDSERIES.fields_by_name[
|
||||
"labels"
|
||||
]._serialized_options = b"\310\336\037\000"
|
||||
_CHUNKEDSERIES.fields_by_name["chunks"]._options = None
|
||||
_CHUNKEDSERIES.fields_by_name[
|
||||
"chunks"
|
||||
]._serialized_options = b"\310\336\037\000"
|
||||
_METRICMETADATA._serialized_start = 152
|
||||
_METRICMETADATA._serialized_end = 400
|
||||
_METRICMETADATA_METRICTYPE._serialized_start = 279
|
||||
_METRICMETADATA_METRICTYPE._serialized_end = 400
|
||||
_SAMPLE._serialized_start = 402
|
||||
_SAMPLE._serialized_end = 444
|
||||
_EXEMPLAR._serialized_start = 446
|
||||
_EXEMPLAR._serialized_end = 531
|
||||
_TIMESERIES._serialized_start = 534
|
||||
_TIMESERIES._serialized_end = 677
|
||||
_LABEL._serialized_start = 679
|
||||
_LABEL._serialized_end = 715
|
||||
_LABELS._serialized_start = 717
|
||||
_LABELS._serialized_end = 766
|
||||
_LABELMATCHER._serialized_start = 769
|
||||
_LABELMATCHER._serialized_end = 899
|
||||
_LABELMATCHER_TYPE._serialized_start = 859
|
||||
_LABELMATCHER_TYPE._serialized_end = 899
|
||||
_READHINTS._serialized_start = 901
|
||||
_READHINTS._serialized_end = 1025
|
||||
_CHUNK._serialized_start = 1028
|
||||
_CHUNK._serialized_end = 1167
|
||||
_CHUNK_ENCODING._serialized_start = 1135
|
||||
_CHUNK_ENCODING._serialized_end = 1167
|
||||
_CHUNKEDSERIES._serialized_start = 1169
|
||||
_CHUNKEDSERIES._serialized_end = 1266
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'opentelemetry.exporter.prometheus_remote_write.gen.types_pb2', _globals)
|
||||
if not _descriptor._USE_C_DESCRIPTORS:
|
||||
_globals['DESCRIPTOR']._loaded_options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'Z\006prompb'
|
||||
_globals['_EXEMPLAR'].fields_by_name['labels']._loaded_options = None
|
||||
_globals['_EXEMPLAR'].fields_by_name['labels']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_TIMESERIES'].fields_by_name['labels']._loaded_options = None
|
||||
_globals['_TIMESERIES'].fields_by_name['labels']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_TIMESERIES'].fields_by_name['samples']._loaded_options = None
|
||||
_globals['_TIMESERIES'].fields_by_name['samples']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_TIMESERIES'].fields_by_name['exemplars']._loaded_options = None
|
||||
_globals['_TIMESERIES'].fields_by_name['exemplars']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_LABELS'].fields_by_name['labels']._loaded_options = None
|
||||
_globals['_LABELS'].fields_by_name['labels']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_CHUNKEDSERIES'].fields_by_name['labels']._loaded_options = None
|
||||
_globals['_CHUNKEDSERIES'].fields_by_name['labels']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_CHUNKEDSERIES'].fields_by_name['chunks']._loaded_options = None
|
||||
_globals['_CHUNKEDSERIES'].fields_by_name['chunks']._serialized_options = b'\310\336\037\000'
|
||||
_globals['_METRICMETADATA']._serialized_start=152
|
||||
_globals['_METRICMETADATA']._serialized_end=400
|
||||
_globals['_METRICMETADATA_METRICTYPE']._serialized_start=279
|
||||
_globals['_METRICMETADATA_METRICTYPE']._serialized_end=400
|
||||
_globals['_SAMPLE']._serialized_start=402
|
||||
_globals['_SAMPLE']._serialized_end=444
|
||||
_globals['_EXEMPLAR']._serialized_start=446
|
||||
_globals['_EXEMPLAR']._serialized_end=531
|
||||
_globals['_TIMESERIES']._serialized_start=534
|
||||
_globals['_TIMESERIES']._serialized_end=677
|
||||
_globals['_LABEL']._serialized_start=679
|
||||
_globals['_LABEL']._serialized_end=715
|
||||
_globals['_LABELS']._serialized_start=717
|
||||
_globals['_LABELS']._serialized_end=766
|
||||
_globals['_LABELMATCHER']._serialized_start=769
|
||||
_globals['_LABELMATCHER']._serialized_end=899
|
||||
_globals['_LABELMATCHER_TYPE']._serialized_start=859
|
||||
_globals['_LABELMATCHER_TYPE']._serialized_end=899
|
||||
_globals['_READHINTS']._serialized_start=901
|
||||
_globals['_READHINTS']._serialized_end=1025
|
||||
_globals['_CHUNK']._serialized_start=1028
|
||||
_globals['_CHUNK']._serialized_end=1167
|
||||
_globals['_CHUNK_ENCODING']._serialized_start=1135
|
||||
_globals['_CHUNK_ENCODING']._serialized_end=1167
|
||||
_globals['_CHUNKEDSERIES']._serialized_start=1169
|
||||
_globals['_CHUNKEDSERIES']._serialized_end=1266
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
__version__ = "0.44b0.dev"
|
||||
__version__ = "0.57b0.dev"
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
asgiref==3.8.1
|
||||
certifi==2024.7.4
|
||||
charset-normalizer==3.3.2
|
||||
cramjam==2.8.4
|
||||
Deprecated==1.2.14
|
||||
idna==3.7
|
||||
iniconfig==2.0.0
|
||||
packaging==24.0
|
||||
pluggy==1.5.0
|
||||
protobuf==5.26
|
||||
py-cpuinfo==9.0.0
|
||||
pytest==7.4.4
|
||||
python-snappy==0.7.1
|
||||
requests==2.32.3
|
||||
tomli==2.0.1
|
||||
typing_extensions==4.12.2
|
||||
urllib3==2.2.2
|
||||
wrapt==1.16.0
|
||||
zipp==3.19.2
|
||||
-e exporter/opentelemetry-exporter-prometheus-remote-write
|
|
@ -22,6 +22,8 @@ from opentelemetry.exporter.prometheus_remote_write import (
|
|||
PrometheusRemoteWriteMetricsExporter,
|
||||
)
|
||||
from opentelemetry.exporter.prometheus_remote_write.gen.types_pb2 import ( # pylint: disable=E0611
|
||||
Label,
|
||||
Sample,
|
||||
TimeSeries,
|
||||
)
|
||||
from opentelemetry.sdk.metrics.export import (
|
||||
|
@ -155,6 +157,38 @@ def test_parse_metric(metric, prom_rw):
|
|||
assert sample.value in values
|
||||
|
||||
|
||||
def test_convert_to_timeseries(prom_rw):
|
||||
resource_labels = (("service_name", "foo"), ("bool_value", True))
|
||||
sample_sets = {
|
||||
(("foo", "bar"), ("baz", 42), ("__name__", "test_histogram_tu")): [
|
||||
(1, 1641946016139)
|
||||
],
|
||||
(("baz", "42"), ("foo", "bar")): [(4, 1641946016139)],
|
||||
}
|
||||
timeseries = prom_rw._convert_to_timeseries(sample_sets, resource_labels)
|
||||
assert timeseries == [
|
||||
TimeSeries(
|
||||
labels=[
|
||||
Label(name="__name__", value="test_histogram_tu"),
|
||||
Label(name="baz", value="42"),
|
||||
Label(name="bool_value", value="True"),
|
||||
Label(name="foo", value="bar"),
|
||||
Label(name="service_name", value="foo"),
|
||||
],
|
||||
samples=[Sample(value=1, timestamp=1641946016139)],
|
||||
),
|
||||
TimeSeries(
|
||||
labels=[
|
||||
Label(name="baz", value="42"),
|
||||
Label(name="bool_value", value="True"),
|
||||
Label(name="foo", value="bar"),
|
||||
Label(name="service_name", value="foo"),
|
||||
],
|
||||
samples=[Sample(value=4, timestamp=1641946016139)],
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
class TestValidation(unittest.TestCase):
|
||||
# Test cases to ensure exporter parameter validation works as intended
|
||||
def test_valid_standard_param(self):
|
||||
|
|
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
|||
description = "Rich Console Exporter for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
|
@ -18,23 +18,22 @@ classifiers = [
|
|||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
]
|
||||
dependencies = [
|
||||
"opentelemetry-api ~= 1.12",
|
||||
"opentelemetry-sdk ~= 1.12",
|
||||
"opentelemetry-semantic-conventions == 0.44b0.dev",
|
||||
"opentelemetry-semantic-conventions == 0.57b0.dev",
|
||||
"rich>=10.0.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
test = []
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/exporter/opentelemetry-exporter-richconsole"
|
||||
Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "src/opentelemetry/exporter/richconsole/version.py"
|
||||
|
|
|
@ -64,11 +64,15 @@ from rich.tree import Tree
|
|||
import opentelemetry.trace
|
||||
from opentelemetry.sdk.trace import ReadableSpan
|
||||
from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
|
||||
from opentelemetry.semconv.trace import SpanAttributes
|
||||
from opentelemetry.semconv._incubating.attributes.db_attributes import (
|
||||
DB_STATEMENT,
|
||||
)
|
||||
|
||||
|
||||
def _ns_to_time(nanoseconds):
|
||||
ts = datetime.datetime.utcfromtimestamp(nanoseconds / 1e9)
|
||||
ts = datetime.datetime.fromtimestamp(
|
||||
nanoseconds / 1e9, datetime.timezone.utc
|
||||
)
|
||||
return ts.strftime("%H:%M:%S.%f")
|
||||
|
||||
|
||||
|
@ -118,7 +122,7 @@ def _child_add_optional_attributes(child: Tree, span: ReadableSpan):
|
|||
label=Text.from_markup("[bold cyan]Attributes :[/bold cyan] ")
|
||||
)
|
||||
for attribute in span.attributes:
|
||||
if attribute == SpanAttributes.DB_STATEMENT:
|
||||
if attribute == DB_STATEMENT:
|
||||
attributes.add(
|
||||
Text.from_markup(f"[bold cyan]{attribute} :[/bold cyan] ")
|
||||
)
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
__version__ = "0.44b0.dev"
|
||||
__version__ = "0.57b0.dev"
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
asgiref==3.8.1
|
||||
Deprecated==1.2.14
|
||||
flaky==3.7.0
|
||||
iniconfig==2.0.0
|
||||
markdown-it-py==3.0.0
|
||||
mdurl==0.1.2
|
||||
packaging==24.0
|
||||
pluggy==1.5.0
|
||||
py-cpuinfo==9.0.0
|
||||
Pygments==2.17.2
|
||||
pytest==7.4.4
|
||||
rich==13.7.1
|
||||
tomli==2.0.1
|
||||
typing_extensions==4.12.2
|
||||
wrapt==1.16.0
|
||||
zipp==3.19.2
|
||||
-e exporter/opentelemetry-exporter-richconsole
|
|
@ -1,9 +1,8 @@
|
|||
-c dev-requirements.txt
|
||||
astor==0.8.1
|
||||
jinja2~=2.7
|
||||
jinja2==3.1.6
|
||||
markupsafe==2.0.1
|
||||
isort
|
||||
black
|
||||
ruff==0.6.9
|
||||
requests
|
||||
tomli
|
||||
tomli_w
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
| Instrumentation | Supported Packages | Metrics support | Semconv status |
|
||||
| --------------- | ------------------ | --------------- | -------------- |
|
||||
| [opentelemetry-instrumentation-google-genai](./opentelemetry-instrumentation-google-genai) | google-genai >= 1.0.0 | No | development
|
||||
| [opentelemetry-instrumentation-openai-v2](./opentelemetry-instrumentation-openai-v2) | openai >= 1.26.0 | Yes | development
|
||||
| [opentelemetry-instrumentation-vertexai](./opentelemetry-instrumentation-vertexai) | google-cloud-aiplatform >= 1.64 | No | development
|
|
@ -0,0 +1,4 @@
|
|||
.build
|
||||
.test
|
||||
dist
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
|
||||
## Version 0.3b0 (2025-07-08)
|
||||
|
||||
- Add automatic instrumentation to tool call functions ([#3446](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3446))
|
||||
|
||||
## Version 0.2b0 (2025-04-28)
|
||||
|
||||
- Add more request configuration options to the span attributes ([#3374](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3374))
|
||||
- Restructure tests to keep in line with repository conventions ([#3344](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3344))
|
||||
|
||||
- Fix [bug](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/3416) where
|
||||
span attribute `gen_ai.response.finish_reasons` is empty ([#3417](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3417))
|
||||
|
||||
## Version 0.1b0 (2025-03-05)
|
||||
|
||||
- Add support for async and streaming.
|
||||
([#3298](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3298))
|
||||
|
||||
Create an initial version of Open Telemetry instrumentation for github.com/googleapis/python-genai.
|
||||
([#3256](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3256))
|
|
@ -0,0 +1,203 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
OpenTelemetry Google GenAI SDK Instrumentation
|
||||
==============================================
|
||||
|
||||
|pypi|
|
||||
|
||||
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-google-genai.svg
|
||||
:target: https://pypi.org/project/opentelemetry-instrumentation-google-genai/
|
||||
|
||||
This library adds instrumentation to the `Google GenAI SDK library <https://pypi.org/project/google-genai/>`_
|
||||
to emit telemetry data following `Semantic Conventions for GenAI systems <https://opentelemetry.io/docs/specs/semconv/gen-ai/>`_.
|
||||
It adds trace spans for GenAI operations, events/logs for recording prompts/responses, and emits metrics that describe the
|
||||
GenAI operations in aggregate.
|
||||
|
||||
|
||||
Experimental
|
||||
------------
|
||||
|
||||
This package is still experimental. The instrumentation may not be complete or correct just yet.
|
||||
|
||||
Please see "TODOS.md" for a list of known defects/TODOs that are blockers to package stability.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
If your application is already instrumented with OpenTelemetry, add this
|
||||
package to your requirements.
|
||||
::
|
||||
|
||||
pip install opentelemetry-instrumentation-google-genai
|
||||
|
||||
If you don't have a Google GenAI SDK application, yet, try our `examples <examples>`_.
|
||||
|
||||
Check out `zero-code example <examples/zero-code>`_ for a quick start.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
This section describes how to set up Google GenAI SDK instrumentation if you're setting OpenTelemetry up manually.
|
||||
Check out the `manual example <examples/manual>`_ for more details.
|
||||
|
||||
Instrumenting all clients
|
||||
*************************
|
||||
|
||||
When using the instrumentor, all clients will automatically trace GenAI `generate_content` operations.
|
||||
You can also optionally capture prompts and responses as log events.
|
||||
|
||||
Make sure to configure OpenTelemetry tracing, logging, metrics, and events to capture all telemetry emitted by the instrumentation.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
|
||||
from google.genai import Client
|
||||
|
||||
GoogleGenAiSdkInstrumentor().instrument()
|
||||
|
||||
|
||||
client = Client()
|
||||
response = client.models.generate_content(
|
||||
model="gemini-1.5-flash-002",
|
||||
contents="Write a short poem on OpenTelemetry.")
|
||||
|
||||
Enabling message content
|
||||
*************************
|
||||
|
||||
Message content such as the contents of the prompt and response
|
||||
are not captured by default. To capture message content as log events, set the environment variable
|
||||
`OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` to `true`.
|
||||
|
||||
Uninstrument
|
||||
************
|
||||
|
||||
To uninstrument clients, call the uninstrument method:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
|
||||
|
||||
GoogleGenAiSdkInstrumentor().instrument()
|
||||
# ...
|
||||
|
||||
# Uninstrument all clients
|
||||
GoogleGenAiSdkInstrumentor().uninstrument()
|
||||
|
||||
References
|
||||
----------
|
||||
* `Google Gen AI SDK Documentation <https://ai.google.dev/gemini-api/docs/sdks>`_
|
||||
* `Google Gen AI SDK on GitHub <https://github.com/googleapis/python-genai>`_
|
||||
* `Using Vertex AI with Google Gen AI SDK <https://cloud.google.com/vertex-ai/generative-ai/docs/sdks/overview>`_
|
||||
* `OpenTelemetry Project <https://opentelemetry.io/>`_
|
||||
* `OpenTelemetry Python Examples <https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples>`_
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# TODOs
|
||||
|
||||
## Fundamentals
|
||||
|
||||
Here are some TODO items required to achieve stability for this package:
|
||||
|
||||
- Add more span-level attributes for response information
|
||||
- Verify and correct formatting of events:
|
||||
- Including the 'role' field for message events
|
||||
- Including tool invocation information
|
||||
- Emit events for safety ratings when they block responses
|
||||
- Additional cleanup/improvement tasks such as:
|
||||
- Adoption of 'wrapt' instead of 'functools.wraps'
|
||||
- Bolstering test coverage
|
||||
|
||||
## Future
|
||||
|
||||
Beyond the above TODOs, it would also be desirable to extend the
|
||||
instrumentation beyond `generate_content` to other API surfaces.
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Uncomment and change to your OTLP endpoint
|
||||
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
|
||||
# OTEL_EXPORTER_OTLP_PROTOCOL=grpc
|
||||
|
||||
# Uncomment to change parameters used to configure 'google.genai'
|
||||
# GOOGLE_GENAI_USE_VERTEXAI=1
|
||||
# GOOGLE_API_KEY=<your api key>
|
||||
# GOOGLE_CLOUD_PROJECT=<your cloud project>
|
||||
# GOOGLE_CLOUD_LOCATION=<your cloud location>
|
||||
|
||||
OTEL_SERVICE_NAME=opentelemetry-python-google-genai
|
||||
|
||||
# Change to 'false' to hide prompt and completion content
|
||||
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
|
|
@ -0,0 +1,44 @@
|
|||
OpenTelemetry Google GenAI SDK Manual Instrumentation Example
|
||||
============================================
|
||||
|
||||
This is an example of how to instrument Google GenAI SDK calls when configuring
|
||||
OpenTelemetry SDK and Instrumentations manually.
|
||||
|
||||
When `main.py <main.py>`_ is run, it exports traces, logs, and metrics to an OTLP
|
||||
compatible endpoint. Traces include details such as the model used and the
|
||||
duration of the chat request. Logs capture the chat request and the generated
|
||||
response, providing a comprehensive view of the performance and behavior of
|
||||
your GenAI SDK requests. Metrics include aggregate statistics such as the aggregate
|
||||
token usage as well as the latency distribution of the GenAI operations.
|
||||
|
||||
Note: `.env <.env>`_ file configures additional environment variables:
|
||||
|
||||
- `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`
|
||||
|
||||
... configures Google GenAI SDK instrumentation to capture prompt/response content.
|
||||
|
||||
Setup
|
||||
-----
|
||||
|
||||
An OTLP compatible endpoint should be listening for traces, logs, and metrics on
|
||||
http://localhost:4317. If not, update "OTEL_EXPORTER_OTLP_ENDPOINT" as well.
|
||||
|
||||
Next, set up a virtual environment like this:
|
||||
|
||||
::
|
||||
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install "python-dotenv[cli]"
|
||||
pip install -r requirements.txt
|
||||
|
||||
Run
|
||||
---
|
||||
|
||||
Run the example like this:
|
||||
|
||||
::
|
||||
|
||||
export PROMPT="Your prompt here"
|
||||
dotenv run -- python main.py
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# We skip linting this file with pylint, because the linter is not
|
||||
# configured with the "requirements.txt" dependencies and therefore
|
||||
# will give multiple "no-name-in-module" errors for the imports.
|
||||
#
|
||||
# pylint: skip-file
|
||||
|
||||
import os
|
||||
|
||||
import google.genai
|
||||
|
||||
# NOTE: OpenTelemetry Python Logs and Events APIs are in beta
|
||||
from opentelemetry import _events as otel_events
|
||||
from opentelemetry import _logs as otel_logs
|
||||
from opentelemetry import metrics as otel_metrics
|
||||
from opentelemetry import trace as otel_trace
|
||||
from opentelemetry.exporter.otlp.proto.grpc._log_exporter import (
|
||||
OTLPLogExporter,
|
||||
)
|
||||
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
|
||||
OTLPMetricExporter,
|
||||
)
|
||||
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
|
||||
OTLPSpanExporter,
|
||||
)
|
||||
from opentelemetry.instrumentation.google_genai import (
|
||||
GoogleGenAiSdkInstrumentor,
|
||||
)
|
||||
from opentelemetry.instrumentation.requests import RequestsInstrumentor
|
||||
from opentelemetry.sdk._events import EventLoggerProvider
|
||||
from opentelemetry.sdk._logs import LoggerProvider
|
||||
from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
|
||||
from opentelemetry.sdk.metrics import MeterProvider
|
||||
from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader
|
||||
from opentelemetry.sdk.trace import TracerProvider
|
||||
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
||||
|
||||
|
||||
def setup_otel_tracing():
|
||||
otel_trace.set_tracer_provider(TracerProvider())
|
||||
otel_trace.get_tracer_provider().add_span_processor(
|
||||
BatchSpanProcessor(OTLPSpanExporter())
|
||||
)
|
||||
|
||||
|
||||
def setup_otel_logs_and_events():
|
||||
otel_logs.set_logger_provider(LoggerProvider())
|
||||
otel_logs.get_logger_provider().add_log_record_processor(
|
||||
BatchLogRecordProcessor(OTLPLogExporter())
|
||||
)
|
||||
otel_events.set_event_logger_provider(EventLoggerProvider())
|
||||
|
||||
|
||||
def setup_otel_metrics():
|
||||
meter_provider = MeterProvider(
|
||||
metric_readers=[
|
||||
PeriodicExportingMetricReader(
|
||||
OTLPMetricExporter(),
|
||||
),
|
||||
]
|
||||
)
|
||||
otel_metrics.set_meter_provider(meter_provider)
|
||||
|
||||
|
||||
def setup_opentelemetry():
|
||||
setup_otel_tracing()
|
||||
setup_otel_logs_and_events()
|
||||
setup_otel_metrics()
|
||||
|
||||
|
||||
def instrument_google_genai():
|
||||
GoogleGenAiSdkInstrumentor().instrument()
|
||||
RequestsInstrumentor().instrument()
|
||||
|
||||
|
||||
def main():
|
||||
setup_opentelemetry()
|
||||
instrument_google_genai()
|
||||
client = google.genai.Client()
|
||||
response = client.models.generate_content(
|
||||
model=os.getenv("MODEL", "gemini-2.0-flash-001"),
|
||||
contents=os.getenv("PROMPT", "Why is the sky blue?"),
|
||||
)
|
||||
print(response.text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,20 @@
|
|||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
google-genai ~= 1.0.0
|
||||
opentelemetry-api ~= 1.30.0
|
||||
opentelemetry-sdk ~= 1.30.0
|
||||
opentelemetry-exporter-otlp-proto-grpc ~= 1.30.0
|
||||
opentelemetry-instrumentation-requests ~= 0.51b0
|
||||
opentelemetry-instrumentation-google-genai ~= 0.0.1.dev
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# Update to change exporter configuration as desired.
|
||||
# See: https://opentelemetry.io/docs/zero-code/python/configuration/
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
|
||||
|
||||
# Uncomment to change parameters used to configure 'google.genai'
|
||||
# GOOGLE_GENAI_USE_VERTEXAI=1
|
||||
# GOOGLE_API_KEY=<your api key>
|
||||
# GOOGLE_CLOUD_PROJECT=<your cloud project>
|
||||
# GOOGLE_CLOUD_LOCATION=<your cloud location>
|
||||
|
||||
OTEL_SERVICE_NAME=opentelemetry-python-google-genai
|
||||
|
||||
# Change to 'false' to hide prompt and completion content
|
||||
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
|
|
@ -0,0 +1,46 @@
|
|||
OpenTelemetry Google GenAI SDK Manual Instrumentation Example
|
||||
============================================
|
||||
|
||||
This is an example of how to instrument Google GenAI SDK calls with zero code changes,
|
||||
using `opentelemetryh-instrument`.
|
||||
|
||||
When `main.py <main.py>`_ is run, it exports traces, logs, and metrics to an OTLP
|
||||
compatible endpoint. Traces include details such as the model used and the
|
||||
duration of the chat request. Logs capture the chat request and the generated
|
||||
response, providing a comprehensive view of the performance and behavior of
|
||||
your GenAI SDK requests. Metrics include aggregate statistics such as the aggregate
|
||||
token usage as well as the latency distribution of the GenAI operations.
|
||||
|
||||
Note: `.env <.env>`_ file configures additional environment variables:
|
||||
|
||||
- `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`
|
||||
|
||||
... configures Google GenAI SDK instrumentation to capture prompt/response content.
|
||||
|
||||
Setup
|
||||
-----
|
||||
|
||||
An OTLP compatible endpoint should be listening for traces, logs, and metrics on
|
||||
http://localhost:4317. If not, update "OTEL_EXPORTER_OTLP_ENDPOINT" as well.
|
||||
|
||||
Next, set up a virtual environment like this:
|
||||
|
||||
::
|
||||
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install "python-dotenv[cli]"
|
||||
pip install -r requirements.txt
|
||||
opentelemetry-bootstrap -a install
|
||||
|
||||
|
||||
Run
|
||||
---
|
||||
|
||||
Run the example like this:
|
||||
|
||||
::
|
||||
|
||||
export PROMPT="Your prompt here"
|
||||
dotenv run -- opentelemetry-instrument python main.py
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright The OpenTelemetry Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
|
||||
import google.genai
|
||||
|
||||
|
||||
def main():
|
||||
client = google.genai.Client()
|
||||
response = client.models.generate_content(
|
||||
model=os.getenv("MODEL", "gemini-2.0-flash-001"),
|
||||
contents=os.getenv("PROMPT", "Why is the sky blue?"),
|
||||
)
|
||||
print(response.text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue