Compare commits
853 Commits
1.6.0-beta
...
main
Author | SHA1 | Date |
---|---|---|
|
f153e130b4 | |
|
b659171101 | |
|
2a9c406b6d | |
|
bab4b954cd | |
|
cd522d9081 | |
|
8321588b28 | |
|
62162211ad | |
|
7a4643a829 | |
|
84b3ca4e11 | |
|
0ebe718c70 | |
|
a871f0fc68 | |
|
44f46b1656 | |
|
ca892e44a9 | |
|
a067b8f437 | |
|
2e73a2c468 | |
|
4bab51a01a | |
|
81f29e6068 | |
|
583166cc71 | |
|
e2fdf99f52 | |
|
d2f8e54bb9 | |
|
27234c2a14 | |
|
6b58da89e2 | |
|
accfea63fe | |
|
570a6fa687 | |
|
4dc60007ca | |
|
e67ecf8164 | |
|
98a8d38e8a | |
|
e5b9a9a3db | |
|
be60150962 | |
|
7f111ea831 | |
|
a8ef3e1888 | |
|
9480cb3e9a | |
|
b921486b67 | |
|
5ff15e58c1 | |
|
872ab2b80c | |
|
21af34df63 | |
|
2b20ffc1ed | |
|
7ccfda242a | |
|
6f805344dd | |
|
d8dfaa84a3 | |
|
361a1655b9 | |
|
a2679d5a6d | |
|
0ad46df6cf | |
|
393b5e04f3 | |
|
5963d1d710 | |
|
afe1a5bb11 | |
|
4e9e37fa35 | |
|
f8dc06acf2 | |
|
869d9475ef | |
|
12b994ceda | |
|
5a89e2cfe8 | |
|
cd796552ef | |
|
42fe0738cb | |
|
796be6b4a9 | |
|
e58ee78c2d | |
|
309ed2e7a8 | |
|
04a48b6033 | |
|
4eb55be9a9 | |
|
19afd63555 | |
|
b76121e858 | |
|
b83bc6800e | |
|
7ed91a108f | |
|
5acf77cf04 | |
|
1479b236f7 | |
|
05f74a4c36 | |
|
a2bb510f79 | |
|
4f51654047 | |
|
bd434cc9ae | |
|
e76e0f9f44 | |
|
3401b31085 | |
|
5f9b011c0f | |
|
e9cfc33fad | |
|
154a6dc10b | |
|
21993b01a3 | |
|
d324abb29d | |
|
7cad682002 | |
|
52edab3c8c | |
|
eb0ddd1273 | |
|
dde8f4024b | |
|
e21e9ccd24 | |
|
a10f955cd9 | |
|
6c826c7176 | |
|
260e25271d | |
|
f067d0db96 | |
|
ed26d99bf5 | |
|
78a71ebbf7 | |
|
3f86f47ac3 | |
|
4e84aa72dd | |
|
b552c7f9bf | |
|
74352b8769 | |
|
1f9fa9ffe7 | |
|
77e73ced3c | |
|
15446598f6 | |
|
ec554f9eb0 | |
|
9ecf6b77bc | |
|
fb4bb17b34 | |
|
b884697d47 | |
|
d5f6732118 | |
|
1065e43060 | |
|
0ad6a95bf2 | |
|
3c9beb896b | |
|
7abe983ac0 | |
|
844e148f68 | |
|
3f9b636f06 | |
|
6209ed8f80 | |
|
60a3839591 | |
|
805dd6b4ab | |
|
6828791c61 | |
|
c638ef67cf | |
|
6420be005b | |
|
ee720ba3a3 | |
|
8c1e63894f | |
|
9c9d8585f3 | |
|
c4268fe92b | |
|
e371d7f02d | |
|
24a13ab91c | |
|
2ec8931fc8 | |
|
a67acd87d5 | |
|
ceebd456f1 | |
|
13ed63a88c | |
|
0252f6ca0d | |
|
4792d020f8 | |
|
d5f44d0ae5 | |
|
fd1b5afd08 | |
|
177596891a | |
|
1edcddbe00 | |
|
31fb3bdf35 | |
|
ea70cd550d | |
|
ab32e39c14 | |
|
fbbe939dd4 | |
|
7c0eab2f42 | |
|
98b3986620 | |
|
bb8abee277 | |
|
ff009146a9 | |
|
aa73ce3aaf | |
|
f183a6a11e | |
|
72f7348b57 | |
|
6e6ce171e8 | |
|
04dd5d149c | |
|
06ef55786a | |
|
20988528fd | |
|
180c9e84db | |
|
528d642b44 | |
|
72a5f7c36e | |
|
868ae707fc | |
|
3e8c537192 | |
|
27116b2210 | |
|
a8ede4bdc5 | |
|
f63f8d93f8 | |
|
242cebabfc | |
|
c1472c76fd | |
|
6c69fb2b8c | |
|
d01e7f9699 | |
|
89e5999e69 | |
|
99b686e1ad | |
|
647f1b17a1 | |
|
402ed87689 | |
|
3be15201d7 | |
|
807aa26d20 | |
|
aa5b0423ff | |
|
643e80ef53 | |
|
a8f1076e4d | |
|
5635e6b8d6 | |
|
2862c884e0 | |
|
13a06da855 | |
|
cc2ffdad5b | |
|
c977f73246 | |
|
8943733bcd | |
|
796f49bcfd | |
|
9b83e7bf09 | |
|
4af4abd7c9 | |
|
0c53d9f7dd | |
|
7f2eb92952 | |
|
2ea6e04dab | |
|
1b555c1201 | |
|
577337c992 | |
|
752172890c | |
|
71e6cb49aa | |
|
ec9f76127e | |
|
7b076c64b0 | |
|
e5f65ca696 | |
|
0aba0cdc26 | |
|
c643b7fb22 | |
|
62af9ad84f | |
|
3c62f6b1b1 | |
|
8f17a0ea54 | |
|
41e1a59eb9 | |
|
720d610fa8 | |
|
89ba8073d8 | |
|
71abd4169b | |
|
0c26ce2b3b | |
|
c99f9a1d6d | |
|
36b777b16f | |
|
cccf1ec3b7 | |
|
0cfbf86a8c | |
|
89ea5c6698 | |
|
c44984ef93 | |
|
e5a7095daa | |
|
cd8cb41d9f | |
|
b508b84676 | |
|
275a4463cf | |
|
8fa00cb9d6 | |
|
2828321d1b | |
|
292953799b | |
|
db828ceb44 | |
|
ef090adab3 | |
|
feba0d40fa | |
|
e3855e80b8 | |
|
7037824da6 | |
|
d9864b1e1d | |
|
54f7d9eb87 | |
|
6e8e190039 | |
|
48e5a0804b | |
|
fdca498b44 | |
|
c5acd9f1d3 | |
|
dcdaaae6e3 | |
|
f7df3e1714 | |
|
75d947c58f | |
|
837e852232 | |
|
3d1f74db5a | |
|
17bbd834e5 | |
|
90dd82c382 | |
|
cd31c57af5 | |
|
6100452988 | |
|
7ae7b131e8 | |
|
408a52d62f | |
|
7d7d37ae42 | |
|
29068585a1 | |
|
c3bb89ae50 | |
|
e0a10f7890 | |
|
c94c422e31 | |
|
8e6d814f0f | |
|
ad4e80e282 | |
|
fc9de8b9bc | |
|
f69d9c53e5 | |
|
a6582704cd | |
|
80287c061e | |
|
1f39623af5 | |
|
75a683eab7 | |
|
be8209987b | |
|
145e7ade6f | |
|
305597d9d5 | |
|
0c775e58fa | |
|
44bc90a25b | |
|
b9be07a27d | |
|
84e6afbeba | |
|
7eeddf5f22 | |
|
88d2ad60bb | |
|
f9a0b4c657 | |
|
e3665c95c2 | |
|
4bc398f9d1 | |
|
68c79a3bfd | |
|
913bccfdfc | |
|
2ae01a73fe | |
|
1e7397e779 | |
|
b201d709c1 | |
|
74fc70e8eb | |
|
a5fa611774 | |
|
60a683986a | |
|
626b30e127 | |
|
8ae945345f | |
|
6fbae0d655 | |
|
ae3feb9bcd | |
|
d113ecfbed | |
|
2aae6e12d4 | |
|
60445836cc | |
|
e3b920c0da | |
|
8c1cd6488e | |
|
112e17f50e | |
|
1e1201ad02 | |
|
4b56c5f567 | |
|
53b85ceef9 | |
|
47aff6264e | |
|
7c0f24c177 | |
|
ed1b27f592 | |
|
dc7f1ebb6f | |
|
1fc0ebcceb | |
|
09b654ec41 | |
|
956f62146c | |
|
6fa4492a70 | |
|
858737cdb0 | |
|
451a94b2d0 | |
|
84ff215a5d | |
|
d45060b434 | |
|
8de335c486 | |
|
9f41eadf03 | |
|
5efc683279 | |
|
5dff99f8a0 | |
|
25a9366679 | |
|
0eebf97a4b | |
|
f1f2664021 | |
|
0343715f49 | |
|
cddc09127f | |
|
963ec41598 | |
|
dba7d251f6 | |
|
bb832226d3 | |
|
1a68b49ed6 | |
|
8df7670dd1 | |
|
f3cd0e7ac4 | |
|
36d5900be0 | |
|
b0ebf3518c | |
|
331e1267b6 | |
|
2499ecdf8e | |
|
9b08508541 | |
|
66c2e4b778 | |
|
a55a5ac997 | |
|
5106e3082f | |
|
02f4b2d978 | |
|
25d99a56bf | |
|
19e1663c1e | |
|
f5023550bc | |
|
1aa101bbcf | |
|
f4e392301f | |
|
cc0b9e9d0f | |
|
9cca0ac8f1 | |
|
c8a8913152 | |
|
c1f1c167d2 | |
|
2097f477f3 | |
|
3a09a91b1c | |
|
12a8ab0f45 | |
|
3c38a4b00b | |
|
d650352b8f | |
|
1c02da746e | |
|
60b7d9baf3 | |
|
c1a1931319 | |
|
86c1d8c2b3 | |
|
b941f1e4d6 | |
|
cd01f932a6 | |
|
6e1b5ab577 | |
|
1c01770882 | |
|
9b83188ccd | |
|
82b1fbd760 | |
|
6194d9bb17 | |
|
2b43c096f8 | |
|
29798920da | |
|
f7e2a78f4f | |
|
2d6b03f296 | |
|
dd7405654f | |
|
37535a5607 | |
|
b46aae4dff | |
|
dc8d3fd991 | |
|
1479686a6e | |
|
104c9f0e82 | |
|
685b73d3ac | |
|
1a83643284 | |
|
f3a22c3022 | |
|
ba8a0e4c13 | |
|
1b3f1894d9 | |
|
c483222ea5 | |
|
456cd26a20 | |
|
41a72f45b9 | |
|
0e011e8c3c | |
|
a0316ec3c6 | |
|
5f13315926 | |
|
5a0b686559 | |
|
6ec1510729 | |
|
83ecef862d | |
|
230adaba57 | |
|
b15f9a82e3 | |
|
32c64d04de | |
|
22a58aa89e | |
|
05bb05a0dc | |
|
36c586ddcc | |
|
6a0a934107 | |
|
46e076fbb7 | |
|
ccd3759ec8 | |
|
dbe2ce35e7 | |
|
46265e3379 | |
|
da905a8264 | |
|
53cda157c9 | |
|
d8ce51b1b4 | |
|
978b461771 | |
|
7922e30255 | |
|
4d254eb278 | |
|
8cc51b8bca | |
|
206d117e81 | |
|
b5cafe05f4 | |
|
37b5f92254 | |
|
6d467d719d | |
|
2f14c244e3 | |
|
4af3df9b81 | |
|
b1a21cc0dc | |
|
237de185a7 | |
|
908b46ca2d | |
|
df260790f0 | |
|
26a4414a21 | |
|
dc390a6a7d | |
|
28824f805c | |
|
48ce500ae5 | |
|
23fb651129 | |
|
a763c0dbfc | |
|
fd18bb134c | |
|
357f0a2d79 | |
|
84cd83ad53 | |
|
90871e01cb | |
|
2710c427f0 | |
|
248043a74d | |
|
4d02fe1a08 | |
|
c38cc273bc | |
|
61eee46af8 | |
|
3ffa9160d9 | |
|
b9d56aa64e | |
|
81244d6136 | |
|
625f32f33e | |
|
361a4b9bd8 | |
|
574c71612b | |
|
0cb89abd45 | |
|
3cff6dbfd1 | |
|
498b0d00a1 | |
|
6c0327c4c6 | |
|
7dd39b08fe | |
|
07f7e1d08b | |
|
2abf2a9e71 | |
|
16f2bf0fb9 | |
|
a9c32c98d0 | |
|
8177a391a6 | |
|
b444464d0f | |
|
1e065cbdaa | |
|
808abc8552 | |
|
1bbafaa7b7 | |
|
2d2fcf9650 | |
|
cf8ca09a55 | |
|
a578ed3f9b | |
|
5aa077b9e7 | |
|
af3c389c0c | |
|
9d12b36fd5 | |
|
15cea9c0ef | |
|
c7abbdb1fa | |
|
409d96de68 | |
|
b8ea807bae | |
|
49d70e0702 | |
|
ee5e1e0628 | |
|
abb680143a | |
|
3db4919141 | |
|
4215968f75 | |
|
c47dd7c1b1 | |
|
4a860e38f7 | |
|
8864a054b6 | |
|
2fe54ee958 | |
|
ac0d1d1fab | |
|
e95ae72649 | |
|
eace49c2fb | |
|
c2558da11f | |
|
dffe70c8cc | |
|
e2a867f192 | |
|
e25d128baf | |
|
254f52f65c | |
|
1b4f5a2829 | |
|
2b09864f68 | |
|
864bcfc04a | |
|
0deb93e0a3 | |
|
f89214a29e | |
|
51baf9fbe2 | |
|
98a5d3e5b2 | |
|
994b890be1 | |
|
efe97bf999 | |
|
4a1601b505 | |
|
f76d21a53d | |
|
84bdeb3dd5 | |
|
b8729a0f80 | |
|
36ceb2efe2 | |
|
266fe91bb8 | |
|
89aa7a47ab | |
|
bf423cc735 | |
|
3898df5509 | |
|
1fb00d9a8a | |
|
57c442cc7b | |
|
e222ecb594 | |
|
0bbebb5367 | |
|
876e4faa5a | |
|
a4e5cf524c | |
|
b78a3691a8 | |
|
562f4538b8 | |
|
9261a679e6 | |
|
dde68fa331 | |
|
7b604f7bfb | |
|
c7c7a69788 | |
|
e46a446c4a | |
|
dbcc511903 | |
|
90d9a91cd1 | |
|
3f4c73adb1 | |
|
2c421a04ae | |
|
c6e80a1650 | |
|
93237f1c95 | |
|
b0c95307dd | |
|
9b246750ab | |
|
fb74013d64 | |
|
e0af47e4ab | |
|
dbec6f845a | |
|
e5ca93b8f9 | |
|
39d960e0e7 | |
|
2e30089295 | |
|
1374a7de40 | |
|
d64318f667 | |
|
717c3226bb | |
|
5e0b7bf6dc | |
|
aac1a01bce | |
|
dfdbf01e2f | |
|
af57de2b01 | |
|
1a607c852e | |
|
b10f84a2e0 | |
|
21aeaa70c0 | |
|
70657395b8 | |
|
49f16e44d0 | |
|
2f0af656be | |
|
040012b400 | |
|
0969437c39 | |
|
aacbf038c1 | |
|
3ff1df28cf | |
|
af57ae8787 | |
|
76cafe5d80 | |
|
8f9eb90db0 | |
|
dd4e212d59 | |
|
59f829d615 | |
|
a6a760ffbb | |
|
eb2dc443f4 | |
|
4cccb09239 | |
|
ff6725f07a | |
|
d5795c0056 | |
|
adc89d9424 | |
|
043d8a31c7 | |
|
85933659ab | |
|
3cd4c622ae | |
|
9adb088e06 | |
|
81d29cf87e | |
|
eb2f99856c | |
|
0820101396 | |
|
f34fce5620 | |
|
b90c3b2cea | |
|
bae8a6b699 | |
|
a7f3400977 | |
|
df2abe8c0a | |
|
123c0b4b69 | |
|
8cba9868fb | |
|
fc17a5a33d | |
|
28ead764b6 | |
|
97404a2ebd | |
|
b754b13cdb | |
|
42ecd73bd0 | |
|
77ef12327f | |
|
7ce0c55260 | |
|
05b0ca4521 | |
|
278e246111 | |
|
e7cbbbbf0d | |
|
44432235e5 | |
|
42c593d8c2 | |
|
24d52c4149 | |
|
73b6e30c1b | |
|
7e0213ddbd | |
|
c87134ddc6 | |
|
f5b7f9c9eb | |
|
88b6b0e552 | |
|
09dd46fbad | |
|
5bcc805280 | |
|
4ae0aaf099 | |
|
fb9576b359 | |
|
af2b551316 | |
|
bbce7ef0ef | |
|
d27e9bac41 | |
|
dd877fe179 | |
|
5849d3aad3 | |
|
e4b08ac152 | |
|
855e9c42af | |
|
a1207550af | |
|
99a394c3bc | |
|
41ec1894a0 | |
|
87b970b07a | |
|
303ab7a25a | |
|
8b88f43911 | |
|
a2f85dc9e2 | |
|
f1a1835479 | |
|
8325786802 | |
|
f6c31f31e3 | |
|
cf00e4254e | |
|
f214d27e93 | |
|
93038e21fa | |
|
5ac06dd20a | |
|
05700f640a | |
|
752778270d | |
|
72889f25a4 | |
|
98e9b6ad91 | |
|
5b9a2204e7 | |
|
3fa189ab03 | |
|
10f8a0d7ea | |
|
8ff986b296 | |
|
c057e6adcc | |
|
ebb3524800 | |
|
a31bca866d | |
|
ef977c107a | |
|
ef942a11ac | |
|
71f9a4217f | |
|
edfea52f2e | |
|
4dedeade30 | |
|
c28b3e1251 | |
|
8b54074c7a | |
|
9fd01f7803 | |
|
3d60de1ffd | |
|
bace882971 | |
|
0ee3eb149f | |
|
d2f9d055e0 | |
|
8ca81d4ce2 | |
|
52a03b11ae | |
|
edc9fe2e6e | |
|
6a5a57f696 | |
|
c8a097db75 | |
|
98f687335e | |
|
48db3e1809 | |
|
0b9cf42e9a | |
|
512c7dcbf1 | |
|
c2bb4c578d | |
|
26a2d4b4c7 | |
|
3fb2ec50d0 | |
|
eaf8316656 | |
|
c1f9a05c50 | |
|
11ac32c03c | |
|
914ebf9c6d | |
|
3b8cee7669 | |
|
0fefe37af9 | |
|
1e0e755652 | |
|
6f753f623a | |
|
0a77cc3cce | |
|
eab0a7c367 | |
|
dca99b6e66 | |
|
a872c7d267 | |
|
e3b8b4571c | |
|
00c3e58aad | |
|
9db5a52536 | |
|
ca051e2b02 | |
|
dfd27c5040 | |
|
45cf7c3a25 | |
|
89e538293b | |
|
8c0a4a54e8 | |
|
26eae7c6de | |
|
f71df667aa | |
|
18ccd876a8 | |
|
6d88762954 | |
|
6e042134d3 | |
|
90a9c6c1b0 | |
|
3a5134f2bd | |
|
c78363211e | |
|
b9d09bee5c | |
|
1b4f231e2e | |
|
d0620e6f0f | |
|
aaae273d81 | |
|
88493d257c | |
|
6250307cb2 | |
|
d73ed6755d | |
|
0889e8dc32 | |
|
e3759a1e0e | |
|
14ee5c456e | |
|
9d8ef708a3 | |
|
63fe0f3cc7 | |
|
65dd83b44e | |
|
af83eb1043 | |
|
7eeae5b114 | |
|
3c986e894c | |
|
2961ff56c7 | |
|
bea458a010 | |
|
c0969d059e | |
|
4842364500 | |
|
2bccad8ca7 | |
|
1477c852b3 | |
|
3ffbef3d1a | |
|
f77307b54e | |
|
080ed3d167 | |
|
ecaa601730 | |
|
5eaed73507 | |
|
a736574764 | |
|
7fec53d777 | |
|
486ee5809d | |
|
0278deb7ae | |
|
ffc17408fd | |
|
0680ae3f9b | |
|
38468744a5 | |
|
cd000be6ba | |
|
13791e268e | |
|
2a850d6498 | |
|
f69c025178 | |
|
ecef81d551 | |
|
f075128b12 | |
|
f5c116001f | |
|
93fd7d34a7 | |
|
58e8f24782 | |
|
ff3956350e | |
|
ac56c9f0df | |
|
57ee852470 | |
|
7419d854e6 | |
|
4cf2bf433e | |
|
a963ec809a | |
|
cd5b753785 | |
|
3619a6f2f1 | |
|
f11801da92 | |
|
5ca1124466 | |
|
d617171951 | |
|
bb3a91a61f | |
|
8369c2090f | |
|
41d888373f | |
|
4cec27415d | |
|
a3d2fec0f2 | |
|
fba99e1254 | |
|
8d2162ff4d | |
|
55f76f60d8 | |
|
4a8f99ee71 | |
|
9dbd22dbfe | |
|
c5f5dd7dbd | |
|
c48c014b50 | |
|
94c20c684b | |
|
61c6c748ad | |
|
9211cee8bf | |
|
f592dcf4b1 | |
|
c637263136 | |
|
014d5a1bd5 | |
|
a47b222101 | |
|
39c77d40f8 | |
|
4f73d2b78a | |
|
79aa39fb7e | |
|
6a829dd363 | |
|
4e390e3284 | |
|
97442efb5d | |
|
e6f97bc92f | |
|
f96ca5cf41 | |
|
617ac6c04a | |
|
324ab61fa1 | |
|
eec09c9fa5 | |
|
4d61dbad0d | |
|
e383b5db86 | |
|
f9c300b284 | |
|
1f7f9315dc | |
|
0c4f065484 | |
|
a55341a50b | |
|
7dff32480d | |
|
2b62e476ee | |
|
276b307943 | |
|
0256f875d4 | |
|
68eabf0188 | |
|
2a228f9234 | |
|
d3461964ca | |
|
f2c225519d | |
|
bdd931e08c | |
|
e904994fab | |
|
c337d1ea84 | |
|
b0f9607a80 | |
|
201811aa87 | |
|
ecb5dc8732 | |
|
78ab35cefd | |
|
0bc3bdc7ff | |
|
c062e12ea9 | |
|
66373082d8 | |
|
4ccee25c9f | |
|
b7bc57b6cd | |
|
94ede6e6a9 | |
|
00750ddcca | |
|
0a989a942f | |
|
f25ff3a4f4 | |
|
4a3c8d36b3 | |
|
91ed41fcd9 | |
|
f2ab97636c | |
|
5345863908 | |
|
5e6eca84bb | |
|
299a6c10f4 | |
|
d91be7751b | |
|
37481f1ee6 | |
|
c8f939e60b | |
|
defaffa91f | |
|
ba161c492a | |
|
9ba8887170 | |
|
e454dc9dc8 | |
|
2de73b2c12 | |
|
ff9912f87a | |
|
d1d6d4b720 | |
|
5cb7a3fca9 | |
|
b45b8a9a12 | |
|
86a6ba0b7f | |
|
d76aa77011 | |
|
0839431cd6 | |
|
8463f60a51 | |
|
74ad003000 | |
|
f7b4ae1b67 | |
|
3c3ba093d5 | |
|
cd8de07562 | |
|
c0a55775b4 | |
|
637ddcfe4c | |
|
faa70be1b3 | |
|
d07d03086a | |
|
38e21a99bb | |
|
50d3af0aff | |
|
0f58eb153f | |
|
296b62de6a | |
|
aa32b119b4 | |
|
d04fb289d9 | |
|
1ec7a63571 | |
|
83ea1ec83d | |
|
c257ba598d | |
|
e66f4f3bf7 | |
|
f63b0adf64 | |
|
33fdd4769a | |
|
037cda86d8 | |
|
18c85fa403 | |
|
b091af1899 | |
|
865bcb64a5 | |
|
8cc43f23e2 | |
|
59f1d2ce8d | |
|
3c2bb7c93d | |
|
eaf1d88021 | |
|
f01db2bdfb | |
|
d76542e9da | |
|
be45aab2ba | |
|
c2293e088e | |
|
d4d5122316 | |
|
3e885c77f2 | |
|
f63e6e5362 | |
|
dc1f09d4b9 | |
|
c18ff6593a | |
|
b0038ae9b3 | |
|
4124d219fc | |
|
8ea6bb951c | |
|
bb57319f95 | |
|
b22c7a9372 | |
|
23b041c553 | |
|
043272e6d5 | |
|
d8ec26b575 | |
|
a09b623992 | |
|
c03ee85a74 | |
|
aeca53949a | |
|
0b2d0367b2 | |
|
6e2f44254e | |
|
bc1badf3ae | |
|
a80d7ce711 | |
|
48b4a8c4e8 | |
|
9302891028 | |
|
2a480cd732 | |
|
f468dd8359 | |
|
535c81912b | |
|
15a54bb7a1 | |
|
f3da99f4ea | |
|
7cb92d3b6d | |
|
224a4cc250 | |
|
7eb3e7322e | |
|
fc1100f794 | |
|
2c5c034ec6 | |
|
fe78453c03 | |
|
e9d0e2b035 | |
|
9139b72128 | |
|
680115f9dc | |
|
b870ed9b0c | |
|
b139e945f4 | |
|
c97a233a9a | |
|
185d62254c | |
|
459783f700 | |
|
92cdcc55f8 | |
|
c0d75a727c | |
|
1f6d2cc873 | |
|
0228fb9718 |
|
@ -0,0 +1,4 @@
|
|||
# see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions
|
||||
exemptions:
|
||||
- check: artifacthub_badge
|
||||
reason: "Artifact Hub doesn't support .NET packages"
|
|
@ -10,9 +10,18 @@ indent_size = 2
|
|||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
|
||||
[*.{cs,cshtml,htm,html,md,py,sln,xml}]
|
||||
indent_size = 4
|
||||
|
||||
###############################
|
||||
# Copyright header #
|
||||
###############################
|
||||
[*.cs]
|
||||
file_header_template = Copyright The OpenTelemetry Authors\nSPDX-License-Identifier: Apache-2.0
|
||||
|
||||
###############################
|
||||
# .NET Coding Conventions #
|
||||
###############################
|
||||
|
@ -35,7 +44,7 @@ csharp_indent_labels = flush_left
|
|||
|
||||
# Modifier preferences
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
|
||||
|
||||
# this. preferences
|
||||
dotnet_style_qualification_for_field = true:suggestion
|
||||
|
@ -47,8 +56,8 @@ dotnet_style_qualification_for_event = true:suggestion
|
|||
csharp_style_var_for_built_in_types = true:silent
|
||||
csharp_style_var_when_type_is_apparent = true:silent
|
||||
csharp_style_var_elsewhere = true:silent
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||
dotnet_style_predefined_type_for_member_access = true:silent
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
|
||||
dotnet_style_predefined_type_for_member_access = true:suggestion
|
||||
|
||||
# name all constant fields using PascalCase
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
|
||||
|
@ -69,6 +78,7 @@ dotnet_style_readonly_field = true:suggestion
|
|||
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
|
||||
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
csharp_style_prefer_primary_constructors = false:none
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
|
@ -76,21 +86,23 @@ dotnet_style_collection_initializer = true:suggestion
|
|||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||
dotnet_style_prefer_auto_properties = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
|
||||
csharp_prefer_simple_default_expression = true:suggestion
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable:none
|
||||
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
csharp_style_expression_bodied_methods = true:suggestion
|
||||
dotnet_diagnostic.IDE0022.severity = suggestion # dotnet format doesn't respect the suggestion in the line above
|
||||
csharp_style_expression_bodied_constructors = false:warning
|
||||
csharp_style_expression_bodied_operators = true:suggestion
|
||||
csharp_style_expression_bodied_properties = true:suggestion
|
||||
csharp_style_expression_bodied_indexers = true:suggestion
|
||||
csharp_style_expression_bodied_accessors = true:suggestion
|
||||
|
||||
# Pattern matching
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
|
@ -107,6 +119,7 @@ csharp_style_prefer_range_operator = false:none
|
|||
csharp_style_pattern_local_over_anonymous_function = true:suggestion
|
||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||
csharp_style_namespace_declarations = file_scoped:warning
|
||||
dotnet_style_namespace_match_folder = false:none
|
||||
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
|
@ -122,10 +135,10 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false
|
|||
csharp_space_between_parentheses = false
|
||||
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
|
||||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
|
||||
|
||||
# Code analyzers
|
||||
# CA1031: Do not catch general exception types
|
||||
|
@ -146,7 +159,14 @@ dotnet_diagnostic.IDE0005.severity = warning
|
|||
# RS0041: Public members should not use oblivious types
|
||||
dotnet_diagnostic.RS0041.severity = suggestion
|
||||
|
||||
[obj/**.cs]
|
||||
[*Tests.cs]
|
||||
# CA1515: Disable making types internal for Tests classes. It is required by xunit
|
||||
dotnet_diagnostic.CA1515.severity = none
|
||||
|
||||
# CA2007: Disable Consider calling ConfigureAwait on the awaited task. It is not working with xunit
|
||||
dotnet_diagnostic.CA2007.severity = none
|
||||
|
||||
[**/obj/**.cs]
|
||||
generated_code = true
|
||||
|
||||
[*.csproj]
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
*.sh eol=lf
|
|
@ -1,45 +0,0 @@
|
|||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve
|
||||
labels: bug
|
||||
---
|
||||
|
||||
# Bug Report
|
||||
|
||||
List of [all OpenTelemetry NuGet
|
||||
packages](https://www.nuget.org/profiles/OpenTelemetry) and version that you are
|
||||
using (e.g. `OpenTelemetry 1.0.2`):
|
||||
|
||||
* TBD
|
||||
|
||||
Runtime version (e.g. `net462`, `net48`, `netcoreapp3.1`, `net6.0` etc. You can
|
||||
find this information from the `*.csproj` file):
|
||||
|
||||
* TBD
|
||||
|
||||
## Symptom
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**What is the expected behavior?**
|
||||
|
||||
What did you expect to see?
|
||||
|
||||
**What is the actual behavior?**
|
||||
|
||||
What did you see instead?
|
||||
|
||||
## Reproduce
|
||||
|
||||
Create a self-contained project using the template of your choice, apply the
|
||||
minimum required code to result in the issue you're observing.
|
||||
|
||||
We will close this issue if:
|
||||
|
||||
* The repro project you share with us is complex. We can't investigate custom
|
||||
projects, so don't point us to such, please.
|
||||
* If we can not reproduce the behavior you're reporting.
|
||||
|
||||
## Additional Context
|
||||
|
||||
Add any other context about the problem here.
|
|
@ -0,0 +1,94 @@
|
|||
name: Bug report
|
||||
title: "[bug] "
|
||||
description: Create a report to help us improve
|
||||
labels: [bug,needs-triage]
|
||||
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 the bug as quickly as possible.
|
||||
|
||||
Before filing a bug, please be sure you have searched through [existing bugs](https://github.com/open-telemetry/opentelemetry-dotnet/issues?q=is%3Aissue+is%3Aopen+label%3Abug) to see if an existing issue covers the bug.
|
||||
|
||||
- type: dropdown
|
||||
id: package
|
||||
attributes:
|
||||
label: Package
|
||||
description: Which NuGet package does this bug report concern?
|
||||
multiple: false
|
||||
options:
|
||||
- OpenTelemetry
|
||||
- OpenTelemetry.Api
|
||||
- OpenTelemetry.Api.ProviderBuilderExtensions
|
||||
- OpenTelemetry.Exporter.Console
|
||||
- OpenTelemetry.Exporter.InMemory
|
||||
- OpenTelemetry.Exporter.OpenTelemetryProtocol
|
||||
- OpenTelemetry.Exporter.Prometheus.AspNetCore
|
||||
- OpenTelemetry.Exporter.Prometheus.HttpListener
|
||||
- OpenTelemetry.Exporter.Zipkin
|
||||
- OpenTelemetry.Extensions.Hosting
|
||||
- OpenTelemetry.Extensions.Propagators
|
||||
- OpenTelemetry.Shims.OpenTracing
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Package Version
|
||||
description: List of [all OpenTelemetry NuGet packages](https://www.nuget.org/profiles/OpenTelemetry) and version that you are using (e.g. `OpenTelemetry 1.0.2`)
|
||||
value: |
|
||||
| Package Name | Version |
|
||||
| ------------------------------------- | ------- |
|
||||
| OpenTelemetry.Api | 1.8.0 |
|
||||
| OpenTelemetry | 1.8.0 |
|
||||
| TBD | TBD |
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Runtime Version
|
||||
description: What .NET runtime version did you use? (e.g. `net462`, `net48`, `net8.0`, etc. You can find this information from the `*.csproj` file)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: What happened? Please provide as much detail as you reasonably can.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
description: Provide a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). We will close the issue if the repro project you share with us is complex or we cannot reproduce the behavior you are reporting. We cannot investigate custom projects, so don't point us to such, please.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Result
|
||||
description: What did you expect to see?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Actual Result
|
||||
description: What did you see instead?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Any additional information you think may be relevant to this issue.
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Tip
|
||||
description: This element is static, used to render a helpful sub-heading for end-users and community members to help prioritize issues. Please leave as is.
|
||||
options:
|
||||
- "<sub>[React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with :+1: to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>"
|
||||
default: 0
|
|
@ -0,0 +1,7 @@
|
|||
# https://docs.github.com/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
|
||||
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question
|
||||
url: https://github.com/open-telemetry/opentelemetry-dotnet/discussions/new?category=q-a
|
||||
about: Ask a question to help us improve our knowledge base and documentation.
|
|
@ -1,29 +0,0 @@
|
|||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for this project
|
||||
labels: enhancement
|
||||
---
|
||||
|
||||
# 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,63 @@
|
|||
name: Feature request
|
||||
title: "[feature request] "
|
||||
description: Suggest an idea for this project
|
||||
labels: [enhancement,needs-triage]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request! 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 request as quickly as possible.
|
||||
|
||||
Before opening a feature request, 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: dropdown
|
||||
id: package
|
||||
attributes:
|
||||
label: Package
|
||||
description: Which NuGet package does this feature request concern?
|
||||
multiple: false
|
||||
options:
|
||||
- OpenTelemetry
|
||||
- OpenTelemetry.Api
|
||||
- OpenTelemetry.Api.ProviderBuilderExtensions
|
||||
- OpenTelemetry.Exporter.Console
|
||||
- OpenTelemetry.Exporter.InMemory
|
||||
- OpenTelemetry.Exporter.OpenTelemetryProtocol
|
||||
- OpenTelemetry.Exporter.Prometheus.AspNetCore
|
||||
- OpenTelemetry.Exporter.Prometheus.HttpListener
|
||||
- OpenTelemetry.Exporter.Zipkin
|
||||
- OpenTelemetry.Extensions.Hosting
|
||||
- OpenTelemetry.Extensions.Propagators
|
||||
- OpenTelemetry.Shims.OpenTracing
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem?
|
||||
description: If so, provide a concise description of the problem.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: What is the expected behavior?
|
||||
description: Describe the solution you would like.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Which alternative solutions or features have you considered?
|
||||
description: Describe alternatives you've considered.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Any additional information you think may be relevant to this feature request.
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Tip
|
||||
description: This element is static, used to render a helpful sub-heading for end-users and community members to help prioritize issues. Please leave as is.
|
||||
options:
|
||||
- "<sub>[React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with :+1: to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>"
|
||||
default: 0
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
name: Question
|
||||
about: Create a question to help us improve our knowledge base and documentation
|
||||
labels: question
|
||||
---
|
||||
|
||||
# Question
|
||||
|
||||
Use [Github Discussions](https://github.com/open-telemetry/opentelemetry-dotnet/discussions/new).
|
|
@ -7,7 +7,7 @@ Please provide a brief description of the changes here.
|
|||
|
||||
## Merge requirement checklist
|
||||
|
||||
* [ ] [CONTRIBUTING](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/CONTRIBUTING.md) guidelines followed (nullable enabled, static analysis, etc.)
|
||||
* [ ] [CONTRIBUTING](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/CONTRIBUTING.md) guidelines followed (license requirements, nullable enabled, static analysis, etc.)
|
||||
* [ ] Unit tests added/updated
|
||||
* [ ] Appropriate `CHANGELOG.md` files updated for non-trivial changes
|
||||
* [ ] Changes in public API reviewed (if applicable)
|
||||
|
|
|
@ -23,7 +23,32 @@ comment:
|
|||
require_changes: no
|
||||
|
||||
ignore:
|
||||
- "docs/**/*"
|
||||
- "examples/**/*"
|
||||
- "test/**/*"
|
||||
- "**.md"
|
||||
- ".github"
|
||||
- ".vscode"
|
||||
- "build"
|
||||
- "docs"
|
||||
- "examples"
|
||||
- "src/Shared"
|
||||
- "test"
|
||||
|
||||
flags:
|
||||
unittests-Solution:
|
||||
carryforward: true
|
||||
paths:
|
||||
- src
|
||||
|
||||
unittests-Project-Stable:
|
||||
carryforward: true
|
||||
paths:
|
||||
- src
|
||||
|
||||
unittests-Project-Experimental:
|
||||
carryforward: true
|
||||
paths:
|
||||
- src
|
||||
|
||||
unittests-UnstableCoreLibraries-Experimental:
|
||||
carryforward: true
|
||||
paths:
|
||||
- src
|
||||
|
|
|
@ -6,3 +6,70 @@ updates:
|
|||
interval: "daily"
|
||||
labels:
|
||||
- "infra"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/examples/MicroserviceExample/WebApi"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "wednesday"
|
||||
labels:
|
||||
- "infra"
|
||||
ignore:
|
||||
- dependency-name: "*"
|
||||
update-types:
|
||||
- "version-update:semver-major"
|
||||
- "version-update:semver-minor"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "examples/MicroserviceExample/WorkerService"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "wednesday"
|
||||
labels:
|
||||
- "infra"
|
||||
ignore:
|
||||
- dependency-name: "*"
|
||||
update-types:
|
||||
- "version-update:semver-major"
|
||||
- "version-update:semver-minor"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "wednesday"
|
||||
labels:
|
||||
- "infra"
|
||||
ignore:
|
||||
- dependency-name: "*"
|
||||
update-types:
|
||||
- "version-update:semver-major"
|
||||
- "version-update:semver-minor"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "wednesday"
|
||||
labels:
|
||||
- "infra"
|
||||
ignore:
|
||||
- dependency-name: "*"
|
||||
update-types:
|
||||
- "version-update:semver-major"
|
||||
- "version-update:semver-minor"
|
||||
- package-ecosystem: "dotnet-sdk"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "wednesday"
|
||||
labels:
|
||||
- "infra"
|
||||
ignore:
|
||||
- dependency-name: "*"
|
||||
update-types:
|
||||
- "version-update:semver-major"
|
||||
- "version-update:semver-minor"
|
||||
- package-ecosystem: "pip"
|
||||
directory: "test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "wednesday"
|
||||
labels:
|
||||
- "infra"
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
# Called by ci.yml to build & test project files
|
||||
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
||||
name: Build Component
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
project-name:
|
||||
required: true
|
||||
type: string
|
||||
project-build-commands:
|
||||
default: ''
|
||||
required: false
|
||||
type: string
|
||||
code-cov-name:
|
||||
required: true
|
||||
type: string
|
||||
code-cov-prefix:
|
||||
default: 'unittests'
|
||||
required: false
|
||||
type: string
|
||||
os-list:
|
||||
default: '[ "windows-latest", "ubuntu-22.04", "ubuntu-22.04-arm" ]'
|
||||
required: false
|
||||
type: string
|
||||
tfm-list:
|
||||
default: '[ "net462", "net8.0", "net9.0" ]'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
|
||||
strategy:
|
||||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
||||
matrix:
|
||||
os: ${{ fromJSON(inputs.os-list) }}
|
||||
version: ${{ fromJSON(inputs.tfm-list) }}
|
||||
exclude:
|
||||
- os: ubuntu-22.04
|
||||
version: net462
|
||||
- os: ubuntu-22.04-arm
|
||||
version: net462
|
||||
- os: ubuntu-22.04-arm
|
||||
version: net8.0
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
||||
# the version tag which is typically NOT on the first commit so we
|
||||
# retrieve them all.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup previous .NET runtimes
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: dotnet restore ${{ inputs.project-name }}
|
||||
run: dotnet restore ${{ inputs.project-name }} ${{ inputs.project-build-commands }}
|
||||
|
||||
- name: dotnet build ${{ inputs.project-name }}
|
||||
run: dotnet build ${{ inputs.project-name }} --configuration Release --no-restore ${{ inputs.project-build-commands }}
|
||||
|
||||
- name: dotnet test ${{ inputs.project-name }}
|
||||
run: >
|
||||
dotnet test ${{ inputs.project-name }}
|
||||
--collect:"Code Coverage"
|
||||
--results-directory:TestResults
|
||||
--framework ${{ matrix.version }}
|
||||
--configuration Release
|
||||
--no-restore
|
||||
--no-build
|
||||
--logger:"console;verbosity=detailed"
|
||||
--logger:"GitHubActions;report-warnings=false"
|
||||
--logger:"junit;LogFilePath=TestResults/junit.xml"
|
||||
-- RunConfiguration.DisableAppDomain=true
|
||||
|
||||
- name: Install coverage tool
|
||||
run: dotnet tool install -g dotnet-coverage
|
||||
|
||||
- name: Merging test results
|
||||
run: dotnet-coverage merge -f cobertura -o ./TestResults/Cobertura.xml ./TestResults/**/*.coverage
|
||||
|
||||
- name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
||||
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
|
||||
continue-on-error: true # Note: Don't fail for upload failures
|
||||
env:
|
||||
OS: ${{ matrix.os }}
|
||||
TFM: ${{ matrix.version }}
|
||||
with:
|
||||
files: TestResults/Cobertura.xml
|
||||
env_vars: OS,TFM
|
||||
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
||||
name: Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
|
||||
codecov_yml_path: .github/codecov.yml
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: Upload test results ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
||||
if: ${{ !cancelled() && hashFiles('./**/TestResults/junit.xml') != '' }}
|
||||
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
|
||||
with:
|
||||
env_vars: OS,TFM
|
||||
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
|
||||
name: Test results for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -0,0 +1,58 @@
|
|||
name: 'Add labels to issues and pull requests'
|
||||
on:
|
||||
issues:
|
||||
types: [ opened ]
|
||||
|
||||
pull_request_target:
|
||||
branches: [ 'main*' ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
add-labels-on-issues:
|
||||
permissions:
|
||||
issues: write
|
||||
if: github.event_name == 'issues' && !github.event.issue.pull_request
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Add labels for package found in bug issue descriptions
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\add-labels.psm1
|
||||
|
||||
AddLabelsOnIssuesForPackageFoundInBody `
|
||||
-issueNumber ${{ github.event.issue.number }} `
|
||||
-issueBody $env:ISSUE_BODY
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
ISSUE_BODY: ${{ github.event.issue.body }}
|
||||
|
||||
add-labels-on-pull-requests:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
if: github.event_name == 'pull_request_target'
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
ref: ${{ github.event.repository.default_branch }} # Note: Do not run on the PR branch we want to execute add-labels.psm1 from main on the base repo only because pull_request_target can see secrets
|
||||
|
||||
- name: Add labels for files changed on pull requests
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\add-labels.psm1
|
||||
|
||||
AddLabelsOnPullRequestsBasedOnFilesChanged `
|
||||
-pullRequestNumber ${{ github.event.pull_request.number }} `
|
||||
-labelPackagePrefix 'pkg:'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
|
@ -1,27 +0,0 @@
|
|||
name: API Compatibility
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
CheckAPICompatibility: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # fetching all
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=true
|
|
@ -0,0 +1,37 @@
|
|||
name: Resolve automation settings
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
enabled:
|
||||
value: ${{ jobs.resolve-automation.outputs.enabled == 'true' }}
|
||||
token-secret-name:
|
||||
value: ${{ jobs.resolve-automation.outputs.token-secret-name }}
|
||||
username:
|
||||
value: ${{ vars.AUTOMATION_USERNAME }}
|
||||
email:
|
||||
value: ${{ vars.AUTOMATION_EMAIL }}
|
||||
secrets:
|
||||
OPENTELEMETRYBOT_GITHUB_TOKEN:
|
||||
required: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
resolve-automation:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
outputs:
|
||||
enabled: ${{ steps.evaluate.outputs.enabled }}
|
||||
token-secret-name: ${{ steps.evaluate.outputs.token-secret-name }}
|
||||
|
||||
env:
|
||||
OPENTELEMETRYBOT_GITHUB_TOKEN_EXISTS: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN != '' }}
|
||||
|
||||
steps:
|
||||
- id: evaluate
|
||||
run: |
|
||||
echo "enabled=${{ env.OPENTELEMETRYBOT_GITHUB_TOKEN_EXISTS == 'true' }}" >> "$GITHUB_OUTPUT"
|
||||
echo "token-secret-name=OPENTELEMETRYBOT_GITHUB_TOKEN" >> "$GITHUB_OUTPUT"
|
|
@ -1,32 +0,0 @@
|
|||
name: Publish AOTCompatibility testApp
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
aot-test:
|
||||
strategy:
|
||||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
version: [ net7.0 ]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # fetching all
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: publish AOT testApp, assert static analysis warning count, and run the app
|
||||
shell: pwsh
|
||||
run: .\build\test-aot-compatibility.ps1 ${{ matrix.version }}
|
|
@ -1,28 +0,0 @@
|
|||
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
# See also: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
||||
|
||||
# Description: This workflow exists to unblock documentation-only PRs.
|
||||
|
||||
# IMPORTANT: This workflow MUST use the same 'name' and 'matrix' as the non -md workflow.
|
||||
|
||||
name: Test instrumentation libraries
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ windows-latest, ubuntu-latest ]
|
||||
version: [ net462, net6.0, net7.0 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
version: net462
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
|
@ -1,44 +0,0 @@
|
|||
name: Test instrumentation libraries # test instrumentation libraries with latest stable version of API/SDK as they are packed against it
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
strategy:
|
||||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
||||
matrix:
|
||||
os: [ windows-latest, ubuntu-latest ]
|
||||
version: [ net462, net6.0, net7.0 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
version: net462
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
env:
|
||||
RunningDotNetPack: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # fetching all
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore ./build/InstrumentationLibraries.proj
|
||||
|
||||
- name: Build
|
||||
run: dotnet build ./build/InstrumentationLibraries.proj --configuration Release --no-restore
|
||||
|
||||
- name: Test ${{ matrix.version }}
|
||||
run: dotnet test **/bin/Release/${{ matrix.version }}/OpenTelemetry.Instrumentation*.Tests.dll --logger:"console;verbosity=detailed"
|
|
@ -1,41 +0,0 @@
|
|||
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
# See also: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
||||
|
||||
# Description: This workflow exists to unblock documentation-only PRs.
|
||||
|
||||
# IMPORTANT: This workflow MUST use the same 'name' and 'matrix' as the non -md workflow.
|
||||
|
||||
name: Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build-test-stable:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ windows-latest, ubuntu-latest ]
|
||||
version: [ net462, net6.0, net7.0 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
version: net462
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
build-test-experimental:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ windows-latest, ubuntu-latest ]
|
||||
version: [ net462, net6.0, net7.0 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
version: net462
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
|
@ -1,68 +1,196 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# The push trigger would run the CI workflow when any changes get merged to main branch.
|
||||
# The build badge on the main README uses the CI results on the main branch to report the build status.
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-test-stable:
|
||||
strategy:
|
||||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
||||
matrix:
|
||||
os: [ windows-latest, ubuntu-latest ]
|
||||
version: [ net462, net6.0, net7.0 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
version: net462
|
||||
lint-misspell-sanitycheck:
|
||||
uses: ./.github/workflows/sanitycheck.yml
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
detect-changes:
|
||||
runs-on: windows-latest
|
||||
outputs:
|
||||
changes: ${{ steps.changes.outputs.changes }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: AurorNZ/paths-filter@3b1f3abc3371cca888d8eb03dfa70bc8a9867629 # v4.0.0
|
||||
id: changes
|
||||
with:
|
||||
fetch-depth: 0 # fetching all
|
||||
filters: |
|
||||
md: ['**.md']
|
||||
build: ['build/**', '.github/**/*.yml', '**/*.targets', '**/*.props', 'global.json']
|
||||
shared: ['src/Shared/**']
|
||||
code: ['**.cs', '**.csproj', '.editorconfig']
|
||||
solution: ['OpenTelemetry.sln']
|
||||
packaged-code: ['src/**', '!**/*.md']
|
||||
api-code: ['*/OpenTelemetry.Api*/**', '!**/*.md']
|
||||
api-packages: ['src/OpenTelemetry.Api*/**', '!**/*.md']
|
||||
instrumentation: ['*/OpenTelemetry.Instrumentation*/**', 'test/TestApp.AspNetCore/**', '!**/*.md']
|
||||
sdk-code: ['src/OpenTelemetry/**', 'test/OpenTelemetry.Tests/**', '!**/*.md']
|
||||
sdk-package: ['src/OpenTelemetry/**', '!**/*.md']
|
||||
unstable-core-packages: ['src/OpenTelemetry.Exporter.Prometheus.AspNetCore/**', 'src/OpenTelemetry.Exporter.Prometheus.HttpListener/**', 'src/OpenTelemetry.Shims.OpenTracing/**', '!**/*.md']
|
||||
otlp: ['*/OpenTelemetry.Exporter.OpenTelemetryProtocol*/**', '!**/*.md']
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
lint-md:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'md')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
uses: ./.github/workflows/markdownlint.yml
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
lint-dotnet-format:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'code')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
uses: ./.github/workflows/dotnet-format.yml
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=false
|
||||
build-test-solution:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'solution')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
uses: ./.github/workflows/Component.BuildTest.yml
|
||||
with:
|
||||
project-name: 'OpenTelemetry.sln'
|
||||
code-cov-name: 'Solution'
|
||||
|
||||
- name: Test ${{ matrix.version }}
|
||||
run: dotnet test **/bin/**/${{ matrix.version }}/*.Tests.dll --logger:"console;verbosity=detailed"
|
||||
build-test-project-stable:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'code')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
uses: ./.github/workflows/Component.BuildTest.yml
|
||||
with:
|
||||
project-name: './build/OpenTelemetry.proj'
|
||||
project-build-commands: '-p:ExposeExperimentalFeatures=false'
|
||||
code-cov-name: 'Project-Stable'
|
||||
|
||||
build-test-experimental:
|
||||
build-test-project-experimental:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'code')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
uses: ./.github/workflows/Component.BuildTest.yml
|
||||
with:
|
||||
project-name: './build/OpenTelemetry.proj'
|
||||
project-build-commands: '-p:ExposeExperimentalFeatures=true'
|
||||
code-cov-name: 'Project-Experimental'
|
||||
|
||||
# Build unstable core libraries using stable packages released to NuGet
|
||||
build-test-unstable-core:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'unstable-core-packages')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
uses: ./.github/workflows/Component.BuildTest.yml
|
||||
with:
|
||||
project-name: './build/UnstableCoreLibraries.proj'
|
||||
project-build-commands: '-p:RunningDotNetPack=true -p:ExposeExperimentalFeatures=true'
|
||||
code-cov-name: 'UnstableCoreLibraries-Experimental'
|
||||
|
||||
otlp-integration-test:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'api-packages')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'sdk-package')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'otlp')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ windows-latest, ubuntu-latest ]
|
||||
version: [ net462, net6.0, net7.0 ]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
version: net462
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
version: [ net8.0, net9.0 ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # fetching all
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run OTLP Exporter docker compose
|
||||
run: docker compose --file=test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
w3c-trace-context-integration-test:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'api-packages')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'sdk-package')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'instrumentation')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [ net8.0, net9.0 ]
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run W3C Trace Context docker compose
|
||||
run: docker compose --file=test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
validate-packages:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'packaged-code')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
uses: ./.github/workflows/package-validation.yml
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=true
|
||||
generate-docs:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'packaged-code')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'md')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
uses: ./.github/workflows/docfx.yml
|
||||
|
||||
- name: Test ${{ matrix.version }}
|
||||
run: dotnet test **/bin/**/${{ matrix.version }}/*.Tests.dll --logger:"console;verbosity=detailed"
|
||||
verify-aot-compat:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'packaged-code')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
uses: ./.github/workflows/verifyaotcompat.yml
|
||||
|
||||
concurrency-tests:
|
||||
needs: detect-changes
|
||||
if: |
|
||||
contains(needs.detect-changes.outputs.changes, 'api-code')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'sdk-code')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'build')
|
||||
|| contains(needs.detect-changes.outputs.changes, 'shared')
|
||||
uses: ./.github/workflows/concurrency-tests.yml
|
||||
|
||||
build-test:
|
||||
needs: [
|
||||
detect-changes,
|
||||
lint-misspell-sanitycheck,
|
||||
lint-md,
|
||||
lint-dotnet-format,
|
||||
build-test-solution,
|
||||
build-test-project-stable,
|
||||
build-test-project-experimental,
|
||||
build-test-unstable-core,
|
||||
otlp-integration-test,
|
||||
w3c-trace-context-integration-test,
|
||||
validate-packages,
|
||||
generate-docs,
|
||||
verify-aot-compat,
|
||||
concurrency-tests
|
||||
]
|
||||
if: always() && !cancelled()
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- run: |
|
||||
if ( ${{ contains(needs.*.result, 'failure') }} == true ); then echo 'build failed'; exit 1; else echo 'build complete'; fi
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
name: Code Coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build-test-report:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # fetching all
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: dotnet build
|
||||
run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=true
|
||||
|
||||
# - name: dotnet test
|
||||
# run: dotnet test --collect:"XPlat Code Coverage" --results-directory:"TestResults" --configuration Release --no-build -- RunConfiguration.DisableAppDomain=true
|
||||
|
||||
- name: dotnet test
|
||||
run: dotnet test --collect:"Code Coverage" --results-directory:"TestResults" --configuration Release --no-build -- RunConfiguration.DisableAppDomain=true
|
||||
|
||||
- name: Process code coverage
|
||||
run: .\build\process-codecoverage.ps1
|
||||
shell: powershell
|
||||
|
||||
- name: Install report tool
|
||||
run: dotnet tool install -g dotnet-reportgenerator-globaltool
|
||||
|
||||
- name: Merging test results
|
||||
run: reportgenerator -reports:TestResults/**/*.xml -targetdir:TestResults -reporttypes:Cobertura -assemblyFilters:"-microsoft.data.sqlclient*;-grpc.core*;-opentracing*"
|
||||
|
||||
- uses: codecov/codecov-action@v3.1.4
|
||||
with:
|
||||
file: TestResults/Cobertura.xml
|
||||
env_vars: OS
|
||||
name: Code Coverage for ${{ matrix.os }}
|
|
@ -1,64 +1,71 @@
|
|||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main' ]
|
||||
pull_request:
|
||||
branches: [ 'main' ]
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # once in a day at 00:00
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
permissions:
|
||||
actions: read # for github/codeql-action/init to get workflow details
|
||||
contents: read # for actions/checkout to fetch code
|
||||
security-events: write # for github/codeql-action/analyze to upload SARIF results
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['csharp']
|
||||
# Learn more...
|
||||
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
language: ['actions', 'csharp']
|
||||
|
||||
steps:
|
||||
- name: configure Pagefile
|
||||
uses: al-cheb/configure-pagefile-action@v1.3
|
||||
- name: Configure Pagefile
|
||||
if: matrix.language == 'csharp'
|
||||
uses: al-cheb/configure-pagefile-action@a3b6ebd6b634da88790d9c58d4b37a7f4a7b8708 # v1.4
|
||||
with:
|
||||
minimum-size: 8GB
|
||||
maximum-size: 32GB
|
||||
disk-root: "D:"
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
filter: 'tree:0'
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
|
||||
with:
|
||||
build-mode: none
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# Command-line programs to run using the OS shell.
|
||||
# https://git.io/JvXDl
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
|
||||
with:
|
||||
category: '/language:${{ matrix.language }}'
|
||||
|
||||
codeql:
|
||||
if: ${{ !cancelled() }}
|
||||
needs: [ analyze ]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Report status
|
||||
shell: bash
|
||||
env:
|
||||
SCAN_SUCCESS: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
|
||||
run: |
|
||||
if [ "${SCAN_SUCCESS}" == "true" ]
|
||||
then
|
||||
echo 'CodeQL analysis successful'
|
||||
else
|
||||
echo 'CodeQL analysis failed'
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
# Called by ci.yml to run coyote concurrency tests
|
||||
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
||||
name: Concurrency Tests
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
run-concurrency-tests:
|
||||
|
||||
strategy:
|
||||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
||||
matrix:
|
||||
os: [ windows-latest, ubuntu-22.04 ]
|
||||
version: [ net8.0 ]
|
||||
project: [ OpenTelemetry.Tests, OpenTelemetry.Api.Tests ]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: Run Coyote Tests
|
||||
shell: pwsh
|
||||
run: .\build\scripts\test-threadSafety.ps1 -testProjectName ${{ matrix.project }} -targetFramework ${{ matrix.version }}
|
||||
|
||||
- name: Publish Artifacts
|
||||
if: always() && !cancelled()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: ${{ matrix.os }}-${{ matrix.project }}-${{ matrix.version }}-coyoteoutput
|
||||
path: '**/*_CoyoteOutput.*'
|
|
@ -1,21 +1,26 @@
|
|||
name: docfx
|
||||
# Called by ci.yml to run documentation build
|
||||
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
||||
name: Build docfx
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
run-docfx-build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: install docfx
|
||||
run: choco install docfx -y
|
||||
run: dotnet tool install -g docfx
|
||||
|
||||
- name: run .\build\docfx.cmd
|
||||
shell: cmd
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
# See also: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
||||
|
||||
# Description: This workflow exists to unblock documentation-only PRs.
|
||||
|
||||
# IMPORTANT: This workflow MUST use the same 'name' and 'matrix' as the non -md workflow.
|
||||
|
||||
name: dotnet format
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.cs'
|
||||
- '.editorconfig'
|
||||
|
||||
jobs:
|
||||
check-format:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
|
@ -1,30 +1,46 @@
|
|||
name: dotnet format
|
||||
# Called by ci.yml to perform dotnet format linting
|
||||
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
||||
name: Lint - dotnet format
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
paths:
|
||||
- '**.cs'
|
||||
- '.editorconfig'
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths:
|
||||
- '**.cs'
|
||||
- '.editorconfig'
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-format:
|
||||
run-dotnet-format-stable:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: Install format tool
|
||||
run: dotnet tool install -g dotnet-format
|
||||
- name: dotnet restore
|
||||
run: dotnet restore OpenTelemetry.sln
|
||||
|
||||
- name: dotnet format
|
||||
run: dotnet-format --folder --check
|
||||
run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes # Note: .proj files are currently not supported by dotnet format
|
||||
env:
|
||||
ExposeExperimentalFeatures: false
|
||||
|
||||
run-dotnet-format-experimental:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: dotnet restore
|
||||
run: dotnet restore OpenTelemetry.sln
|
||||
|
||||
- name: dotnet format
|
||||
run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes # Note: .proj files are currently not supported by dotnet format
|
||||
env:
|
||||
ExposeExperimentalFeatures: true
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
name: FOSSA scanning
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
fossa:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
|
||||
with:
|
||||
api-key: ${{secrets.FOSSA_API_KEY}}
|
||||
team: OpenTelemetry
|
|
@ -1,39 +0,0 @@
|
|||
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
# See also: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
||||
|
||||
# Description: This workflow exists to unblock documentation-only PRs.
|
||||
|
||||
# IMPORTANT: This workflow MUST use the same 'name' and 'matrix' as the non -md workflow.
|
||||
|
||||
name: Integration Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
sql-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
version: [net6.0,net7.0]
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
w3c-trace-context-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
version: [net6.0,net7.0]
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
otlp-exporter-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
version: [net6.0,net7.0]
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
|
@ -1,36 +0,0 @@
|
|||
name: Integration Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
w3c-trace-context-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [net6.0,net7.0]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run W3C Trace Context docker-compose.integration
|
||||
run: docker-compose --file=test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
|
||||
|
||||
otlp-exporter-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [net6.0,net7.0]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run OTLP Exporter docker-compose.integration
|
||||
run: docker-compose --file=test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
|
|
@ -1,25 +1,24 @@
|
|||
name: markdownlint
|
||||
# Called by ci.yml to perform markdown linting
|
||||
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
||||
name: Lint - Markdown
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
paths:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths:
|
||||
- '**.md'
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
run-markdownlint:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: install markdownlint-cli
|
||||
run: sudo npm install -g markdownlint-cli
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: run markdownlint
|
||||
run: markdownlint .
|
||||
uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e # v20.0.0
|
||||
with:
|
||||
globs: |
|
||||
**/*.md
|
||||
!.github/**/*.md
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
name: OSSF Scorecard
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "24 5 * * 0" # 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
|
||||
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@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
|
||||
with:
|
||||
sarif_file: results.sarif
|
|
@ -0,0 +1,58 @@
|
|||
# Called by ci.yml to perform package validation
|
||||
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
||||
name: Package Validation
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
run-package-validation-stable:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
||||
# the version tag which is typically NOT on the first commit so we
|
||||
# retrieve them all.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: dotnet pack
|
||||
run: dotnet pack ./build/OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=false /p:RunningDotNetPack=true
|
||||
|
||||
- name: Publish stable NuGet packages to Artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: packages-stable
|
||||
path: ./artifacts/package/release
|
||||
if-no-files-found: error
|
||||
|
||||
run-package-validation-experimental:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
||||
# the version tag which is typically NOT on the first commit so we
|
||||
# retrieve them all.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: dotnet pack
|
||||
run: dotnet pack ./build/OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=true /p:RunningDotNetPack=true
|
||||
|
||||
- name: Publish experimental NuGet packages to Artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: packages-experimental
|
||||
path: ./artifacts/package/release
|
||||
if-no-files-found: error
|
|
@ -0,0 +1,125 @@
|
|||
name: Complete release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
required: true
|
||||
description: 'Release tag'
|
||||
type: string
|
||||
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
automation:
|
||||
uses: ./.github/workflows/automation.yml
|
||||
secrets: inherit
|
||||
|
||||
push-packages-and-publish-release:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs: automation
|
||||
|
||||
if: |
|
||||
github.event_name == 'issue_comment'
|
||||
&& github.event.issue.pull_request
|
||||
&& github.event.issue.locked == true
|
||||
&& github.event.comment.user.login != needs.automation.outputs.username
|
||||
&& contains(github.event.comment.body, '/PushPackages')
|
||||
&& startsWith(github.event.issue.title, '[release] Prepare release ')
|
||||
&& github.event.issue.pull_request.merged_at
|
||||
&& needs.automation.outputs.enabled
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
ref: ${{ github.event.repository.default_branch }}
|
||||
|
||||
- name: Push packages and publish release
|
||||
shell: pwsh
|
||||
env:
|
||||
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
|
||||
run: |
|
||||
Import-Module .\build\scripts\post-release.psm1
|
||||
|
||||
PushPackagesPublishReleaseUnlockAndPostNoticeOnPrepareReleasePullRequest `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-pullRequestNumber '${{ github.event.issue.number }}' `
|
||||
-botUserName '${{ needs.automation.outputs.username }}' `
|
||||
-commentUserName '${{ github.event.comment.user.login }}' `
|
||||
-artifactDownloadPath '${{ github.workspace }}/artifacts' `
|
||||
-pushToNuget '${{ secrets.NUGET_TOKEN != '' }}'
|
||||
|
||||
post-release-published:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs:
|
||||
- automation
|
||||
|
||||
if: |
|
||||
needs.automation.outputs.enabled
|
||||
&& (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Note: By default GitHub only fetches 1 commit. We need all the tags
|
||||
# for this work.
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.repository.default_branch }}
|
||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: Create GitHub Pull Request to update stable build version in props
|
||||
if: |
|
||||
(github.ref_type == 'tag' && startsWith(github.ref_name, 'core-') && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-beta') && !contains(github.ref_name, '-rc'))
|
||||
|| (inputs.tag && startsWith(inputs.tag, 'core-') && !contains(inputs.tag, '-alpha') && !contains(inputs.tag, '-beta') && !contains(inputs.tag, '-rc'))
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\post-release.psm1
|
||||
|
||||
CreateStableVersionUpdatePullRequest `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-tag '${{ inputs.tag || github.ref_name }}' `
|
||||
-targetBranch '${{ github.event.repository.default_branch }}' `
|
||||
-gitUserName '${{ needs.automation.outputs.username }}' `
|
||||
-gitUserEmail '${{ needs.automation.outputs.email }}'
|
||||
|
||||
- name: Invoke core version update workflow in opentelemetry-dotnet-contrib repository
|
||||
if: vars.CONTRIB_REPO
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\post-release.psm1
|
||||
|
||||
InvokeCoreVersionUpdateWorkflowInRemoteRepository `
|
||||
-remoteGitRepository '${{ vars.CONTRIB_REPO }}' `
|
||||
-tag '${{ inputs.tag || github.ref_name }}'
|
||||
|
||||
- name: Post notice when release is published
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\post-release.psm1
|
||||
|
||||
TryPostReleasePublishedNoticeOnPrepareReleasePullRequest `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-botUserName '${{ needs.automation.outputs.username }}' `
|
||||
-tag '${{ inputs.tag || github.ref_name }}'
|
|
@ -0,0 +1,214 @@
|
|||
name: Prepare for a release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag-prefix:
|
||||
type: choice
|
||||
options:
|
||||
- core-
|
||||
- coreunstable-
|
||||
description: 'Release tag prefix'
|
||||
required: true
|
||||
version:
|
||||
type: string
|
||||
description: 'Release version'
|
||||
required: true
|
||||
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
automation:
|
||||
uses: ./.github/workflows/automation.yml
|
||||
secrets: inherit
|
||||
|
||||
prepare-release-pr:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs: automation
|
||||
|
||||
if: github.event_name == 'workflow_dispatch' && needs.automation.outputs.enabled
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
- name: Create GitHub Pull Request to prepare release
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\prepare-release.psm1
|
||||
|
||||
CreatePullRequestToUpdateChangelogsAndPublicApis `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-minVerTagPrefix '${{ inputs.tag-prefix }}' `
|
||||
-version '${{ inputs.version }}' `
|
||||
-requestedByUserName '${{ github.event.sender.login }}' `
|
||||
-targetBranch '${{ github.ref_name }}' `
|
||||
-gitUserName '${{ needs.automation.outputs.username }}' `
|
||||
-gitUserEmail '${{ needs.automation.outputs.email }}'
|
||||
|
||||
lock-pr-and-post-notice-to-create-release-tag:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs: automation
|
||||
|
||||
if: |
|
||||
github.event_name == 'pull_request'
|
||||
&& github.event.action == 'closed'
|
||||
&& github.event.pull_request.user.login == needs.automation.outputs.username
|
||||
&& github.event.pull_request.merged == true
|
||||
&& startsWith(github.event.pull_request.title, '[release] Prepare release ')
|
||||
&& needs.automation.outputs.enabled
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
- name: Lock GitHub Pull Request to prepare release
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\prepare-release.psm1
|
||||
|
||||
LockPullRequestAndPostNoticeToCreateReleaseTag `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-pullRequestNumber '${{ github.event.pull_request.number }}' `
|
||||
-botUserName '${{ needs.automation.outputs.username }}'
|
||||
|
||||
create-release-tag-pr-post-notice:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs: automation
|
||||
|
||||
if: |
|
||||
github.event_name == 'issue_comment'
|
||||
&& github.event.issue.pull_request
|
||||
&& github.event.issue.locked == true
|
||||
&& github.event.comment.user.login != needs.automation.outputs.username
|
||||
&& contains(github.event.comment.body, '/CreateReleaseTag')
|
||||
&& startsWith(github.event.issue.title, '[release] Prepare release ')
|
||||
&& github.event.issue.pull_request.merged_at
|
||||
&& needs.automation.outputs.enabled
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
- name: Create release tag
|
||||
id: create-tag
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\prepare-release.psm1
|
||||
|
||||
CreateReleaseTagAndPostNoticeOnPullRequest `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-pullRequestNumber '${{ github.event.issue.number }}' `
|
||||
-botUserName '${{ needs.automation.outputs.username }}' `
|
||||
-gitUserName '${{ needs.automation.outputs.username }}' `
|
||||
-gitUserEmail '${{ needs.automation.outputs.email }}'
|
||||
|
||||
update-changelog-release-dates-on-prepare-pr-post-notice:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs: automation
|
||||
|
||||
if: |
|
||||
github.event_name == 'issue_comment'
|
||||
&& github.event.issue.pull_request
|
||||
&& github.event.issue.state == 'open'
|
||||
&& github.event.comment.user.login != needs.automation.outputs.username
|
||||
&& contains(github.event.comment.body, '/UpdateReleaseDates')
|
||||
&& startsWith(github.event.issue.title, '[release] Prepare release ')
|
||||
&& github.event.issue.pull_request.merged_at == null
|
||||
&& needs.automation.outputs.enabled
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
- name: Update release date
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\prepare-release.psm1
|
||||
|
||||
UpdateChangelogReleaseDatesAndPostNoticeOnPullRequest `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-pullRequestNumber '${{ github.event.issue.number }}' `
|
||||
-botUserName '${{ needs.automation.outputs.username }}' `
|
||||
-commentUserName '${{ github.event.comment.user.login }}' `
|
||||
-gitUserName '${{ needs.automation.outputs.username }}' `
|
||||
-gitUserEmail '${{ needs.automation.outputs.email }}'
|
||||
|
||||
update-releasenotes-on-prepare-pr-post-notice:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs: automation
|
||||
|
||||
if: |
|
||||
github.event_name == 'issue_comment'
|
||||
&& github.event.issue.pull_request
|
||||
&& github.event.issue.state == 'open'
|
||||
&& github.event.comment.user.login != needs.automation.outputs.username
|
||||
&& contains(github.event.comment.body, '/UpdateReleaseNotes')
|
||||
&& startsWith(github.event.issue.title, '[release] Prepare release ')
|
||||
&& github.event.issue.pull_request.merged_at == null
|
||||
&& needs.automation.outputs.enabled
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
- name: Update release notes
|
||||
env:
|
||||
COMMENT_BODY: ${{ github.event.comment.body }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\prepare-release.psm1
|
||||
|
||||
UpdateReleaseNotesAndPostNoticeOnPullRequest `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-pullRequestNumber '${{ github.event.issue.number }}' `
|
||||
-botUserName '${{ needs.automation.outputs.username }}' `
|
||||
-commentUserName '${{ github.event.comment.user.login }}' `
|
||||
-commentBody $Env:COMMENT_BODY `
|
||||
-gitUserName '${{ needs.automation.outputs.username }}' `
|
||||
-gitUserEmail '${{ needs.automation.outputs.email }}'
|
|
@ -5,46 +5,143 @@
|
|||
################### IMPORTANT ###################
|
||||
#################################################
|
||||
|
||||
name: Pack and publish to MyGet
|
||||
name: Build, pack, and publish to MyGet
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'core-*'
|
||||
- 'coreunstable-*'
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # once in a day at 00:00
|
||||
|
||||
jobs:
|
||||
build-pack:
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
automation:
|
||||
uses: ./.github/workflows/automation.yml
|
||||
secrets: inherit
|
||||
|
||||
build-pack-publish:
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
env:
|
||||
RunningDotNetPack: true
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
COSIGN_YES: "yes"
|
||||
|
||||
outputs:
|
||||
artifact-url: ${{ steps.upload-artifacts.outputs.artifact-url }}
|
||||
artifact-id: ${{ steps.upload-artifacts.outputs.artifact-id }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all
|
||||
ref: ${{ github.ref || 'main' }}
|
||||
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
|
||||
# the version tag which is typically NOT on the first commit so we
|
||||
# retrieve them all.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore OpenTelemetry.proj
|
||||
- name: Install Cosign
|
||||
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
|
||||
with:
|
||||
cosign-release: v2.5.3
|
||||
|
||||
- name: dotnet restore
|
||||
run: dotnet restore ./build/OpenTelemetry.proj -p:RunningDotNetPack=true
|
||||
|
||||
- name: dotnet build
|
||||
run: dotnet build OpenTelemetry.proj --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }}
|
||||
run: dotnet build ./build/OpenTelemetry.proj --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }} -p:RunningDotNetPack=true
|
||||
|
||||
- name: Sign DLLs with Cosign Keyless
|
||||
shell: pwsh
|
||||
run: |
|
||||
$projectFiles = Get-ChildItem -Path src/*/*.csproj -File
|
||||
|
||||
foreach ($projectFile in $projectFiles) {
|
||||
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($projectFile)
|
||||
|
||||
Get-ChildItem -Path artifacts/bin/$projectName/release_*/$projectName.dll -File | ForEach-Object {
|
||||
$fileFullPath = $_.FullName
|
||||
Write-Host "Signing $fileFullPath"
|
||||
|
||||
cosign.exe sign-blob $fileFullPath --yes --output-signature $fileFullPath-keyless.sig --output-certificate $fileFullPath-keyless.pem
|
||||
}
|
||||
}
|
||||
|
||||
- name: dotnet pack
|
||||
run: dotnet pack OpenTelemetry.proj --configuration Release --no-build
|
||||
run: dotnet pack ./build/OpenTelemetry.proj --configuration Release --no-restore --no-build -p:PackTag=${{ github.ref_type == 'tag' && github.ref_name || '' }}
|
||||
|
||||
- name: Publish Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
id: upload-artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: ${{ github.ref_name }}-packages
|
||||
path: '**/bin/**/*.*nupkg'
|
||||
path: ./artifacts/package/release
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Publish MyGet
|
||||
env:
|
||||
MYGET_TOKEN_EXISTS: ${{ secrets.MYGET_TOKEN != '' }}
|
||||
if: env.MYGET_TOKEN_EXISTS == 'true' # Skip MyGet publish if run on a fork without the secret
|
||||
run: |
|
||||
nuget setApiKey ${{ secrets.MYGET_TOKEN }} -Source https://www.myget.org/F/opentelemetry/api/v2/package
|
||||
nuget push **/bin/**/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package
|
||||
nuget push ./artifacts/package/release/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package
|
||||
|
||||
post-build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs:
|
||||
- automation
|
||||
- build-pack-publish
|
||||
|
||||
if: needs.automation.outputs.enabled && github.event_name == 'push'
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
|
||||
|
||||
- name: Download Artifacts
|
||||
run: |
|
||||
curl \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: token ${{ github.token }}" \
|
||||
-L \
|
||||
-o '${{ github.workspace }}/artifacts/${{ github.ref_name }}-packages.zip' \
|
||||
--create-dirs \
|
||||
"https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${{ needs.build-pack-publish.outputs.artifact-id }}/zip"
|
||||
|
||||
- name: Create GitHub Release draft
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\post-release.psm1
|
||||
|
||||
CreateDraftRelease `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-tag '${{ github.ref_name }}' `
|
||||
-releaseFiles '${{ github.workspace }}/artifacts/${{ github.ref_name }}-packages.zip#Packages'
|
||||
|
||||
- name: Post notice when packages are ready
|
||||
shell: pwsh
|
||||
run: |
|
||||
Import-Module .\build\scripts\post-release.psm1
|
||||
|
||||
TryPostPackagesReadyNoticeOnPrepareReleasePullRequest `
|
||||
-gitRepository '${{ github.repository }}' `
|
||||
-tag '${{ github.ref_name }}' `
|
||||
-tagSha '${{ github.sha }}' `
|
||||
-packagesUrl '${{ needs.build-pack-publish.outputs.artifact-url }}' `
|
||||
-botUserName '${{ needs.automation.outputs.username }}'
|
||||
|
||||
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
name: sanitycheck
|
||||
# Called by ci.yml to perform general linting
|
||||
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
||||
name: Lint - Spelling & Encoding
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main*' ]
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
misspell:
|
||||
runs-on: ubuntu-latest
|
||||
run-misspell:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: install misspell
|
||||
run: |
|
||||
|
@ -22,12 +24,12 @@ jobs:
|
|||
- name: run misspell
|
||||
run: ./bin/misspell -error .
|
||||
|
||||
encoding:
|
||||
runs-on: ubuntu-latest
|
||||
run-sanitycheck:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: detect non-ASCII encoding and trailing space
|
||||
run: python3 ./build/sanitycheck.py
|
||||
run: python3 ./build/scripts/sanitycheck.py
|
||||
|
|
|
@ -1,21 +1,32 @@
|
|||
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
# Github Actions Stale: https://github.com/actions/stale
|
||||
|
||||
name: "Close stale pull requests"
|
||||
name: "Manage stale issues and pull requests"
|
||||
on:
|
||||
schedule:
|
||||
- cron: "12 3 * * *" # arbitrary time not to DDOS GitHub
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
|
||||
with:
|
||||
stale-pr-message: 'This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.'
|
||||
stale-issue-message: 'This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.'
|
||||
close-issue-message: 'Closed as inactive. Feel free to reopen if this issue is still a concern.'
|
||||
stale-pr-message: 'This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day.'
|
||||
close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.'
|
||||
operations-per-run: 400
|
||||
days-before-pr-stale: 7
|
||||
days-before-issue-stale: -1
|
||||
days-before-issue-stale: 300
|
||||
days-before-pr-close: 7
|
||||
days-before-issue-close: -1
|
||||
days-before-issue-close: 7
|
||||
exempt-all-issue-milestones: true
|
||||
exempt-issue-labels: 'keep-open,needs-triage'
|
||||
exempt-pr-labels: 'keep-open'
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
# Called by ci.yml to perform AOT validation
|
||||
# See: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
|
||||
name: Publish & Verify AOT Compatibility
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
run-verify-aot-compat:
|
||||
|
||||
strategy:
|
||||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
|
||||
matrix:
|
||||
os: [ ubuntu-22.04, windows-latest ]
|
||||
version: [ net8.0, net9.0 ]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
|
||||
- name: publish AOT testApp, assert static analysis warning count, and run the app
|
||||
shell: pwsh
|
||||
run: .\build\scripts\test-aot-compatibility.ps1 ${{ matrix.version }}
|
|
@ -21,6 +21,7 @@
|
|||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Aa]rtifacts/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
@ -348,3 +349,9 @@ ASALocalRun/
|
|||
|
||||
# Tempo files
|
||||
tempo-data/
|
||||
|
||||
# Coyote Rewrite Files
|
||||
rewrite.coyote.json
|
||||
|
||||
# Test results
|
||||
TestResults/
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
# Default state for all rules
|
||||
default: true
|
||||
|
||||
# allow long lines for tables and code blocks
|
||||
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md
|
||||
MD013:
|
||||
code_blocks: false
|
||||
tables: false
|
||||
|
||||
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md
|
||||
MD033:
|
||||
# Allowed elements
|
||||
allowed_elements: [ 'details', 'summary' ]
|
||||
|
||||
# MD059/link-text-should-be-descriptive : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md
|
||||
MD059: false
|
||||
|
|
240
CONTRIBUTING.md
240
CONTRIBUTING.md
|
@ -10,16 +10,39 @@ for a summary description of past meetings. To request edit access, join the
|
|||
meeting or get in touch on
|
||||
[Slack](https://cloud-native.slack.com/archives/C01N3BC2W7Q).
|
||||
|
||||
Even though, anybody can contribute, there are benefits of being a member of our
|
||||
community. See to the [community membership
|
||||
Anyone may contribute but there are benefits of being a member of our community.
|
||||
See the [community membership
|
||||
document](https://github.com/open-telemetry/community/blob/main/community-membership.md)
|
||||
on how to become a
|
||||
[**Member**](https://github.com/open-telemetry/community/blob/main/community-membership.md#member),
|
||||
[**Approver**](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
|
||||
[**Member**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#member),
|
||||
[**Triager**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager),
|
||||
[**Approver**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver),
|
||||
and
|
||||
[**Maintainer**](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
|
||||
[**Maintainer**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
|
||||
|
||||
## Find a Buddy and Get Started Quickly
|
||||
## Give feedback
|
||||
|
||||
We are always looking for your feedback.
|
||||
|
||||
You can do this by [submitting a GitHub issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/new).
|
||||
|
||||
You may also prefer writing on [#otel-dotnet Slack channel](https://cloud-native.slack.com/archives/C01N3BC2W7Q).
|
||||
|
||||
### Report a bug
|
||||
|
||||
Reporting bugs is an important contribution. Please make sure to include:
|
||||
|
||||
* Expected and actual behavior;
|
||||
* OpenTelemetry, OS, and .NET versions you are using;
|
||||
* Steps to reproduce;
|
||||
* [Minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).
|
||||
|
||||
### Request a feature
|
||||
|
||||
If you would like to work on something that is not listed as an issue
|
||||
(e.g. a new feature or enhancement) please create an issue and describe your proposal.
|
||||
|
||||
## 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 channel and find a buddy!
|
||||
|
@ -34,17 +57,24 @@ resource for your first contribution, join our Slack channel and find a buddy!
|
|||
|
||||
Your OpenTelemetry buddy is your resource to talk to directly on all aspects of
|
||||
contributing to OpenTelemetry: providing context, reviewing PRs, and helping
|
||||
those get merged. Buddies will not be available 24/7, but is committed to
|
||||
responding during their normal contribution hours.
|
||||
those get merged. Buddies will not be available 24/7, but are committed to
|
||||
responding during their normal working hours.
|
||||
|
||||
## Development Environment
|
||||
|
||||
You can contribute to this project from a Windows, macOS or Linux machine.
|
||||
You can contribute to this project from a Windows, macOS, or Linux machine.
|
||||
|
||||
On all platforms, the minimum requirements are:
|
||||
|
||||
* Git client and command line tools.
|
||||
* .NET 7.0+
|
||||
* Git client and command line tools
|
||||
|
||||
* [.NET SDK (latest stable version)](https://dotnet.microsoft.com/download)
|
||||
|
||||
> [!NOTE]
|
||||
> At times a pre-release version of the .NET SDK may be required to build code
|
||||
in this repository. Check
|
||||
[global.json](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/global.json)
|
||||
to verify the current required version.
|
||||
|
||||
### Linux or MacOS
|
||||
|
||||
|
@ -59,42 +89,97 @@ of Windows.
|
|||
* Visual Studio 2022+ or Visual Studio Code
|
||||
* .NET Framework 4.6.2+
|
||||
|
||||
### Public API
|
||||
## Public API validation
|
||||
|
||||
It is critical to keep public API surface small and clean. This repository is
|
||||
using `Microsoft.CodeAnalysis.PublicApiAnalyzers` to validate the public APIs.
|
||||
This analyzer will check if you changed a public property/method so the change
|
||||
will be easily spotted in pull request. It will also ensure that OpenTelemetry
|
||||
doesn't expose APIs outside of the library primary concerns like a generic
|
||||
helper methods.
|
||||
It is critical to **NOT** make breaking changes to public APIs which have been
|
||||
released in stable builds. We also strive to keep a minimal public API surface.
|
||||
This repository is using
|
||||
[Microsoft.CodeAnalysis.PublicApiAnalyzers](https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
|
||||
and [Package
|
||||
validation](https://learn.microsoft.com/dotnet/fundamentals/apicompat/package-validation/overview)
|
||||
to validate public APIs.
|
||||
|
||||
#### How to enable and configure
|
||||
* `Microsoft.CodeAnalysis.PublicApiAnalyzers` will validate public API
|
||||
changes/additions against a set of "public API files" which capture the
|
||||
shipped/unshipped public APIs. These files must be maintained manually (not
|
||||
recommended) or by using tooling/code fixes built into the package (see below
|
||||
for details).
|
||||
|
||||
* Create a folder in your project called `.publicApi` with the frameworks that
|
||||
as folders you target.
|
||||
* Create two files called `PublicAPI.Shipped.txt` and `PublicAPI.Unshipped.txt`
|
||||
in each framework that you target.
|
||||
* Add the following lines to your csproj:
|
||||
Public API files are also used to perform public API reviews by repo
|
||||
approvers/maintainers before releasing stable builds.
|
||||
|
||||
```xml
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Shipped.txt" />
|
||||
<AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Unshipped.txt" />
|
||||
</ItemGroup>
|
||||
```
|
||||
* `Package validation` will validate public API changes/additions against
|
||||
previously released NuGet packages.
|
||||
|
||||
* Use
|
||||
[IntelliSense](https://docs.microsoft.com/visualstudio/ide/using-intellisense)
|
||||
to update the publicApi files.
|
||||
This is performed automatically by the build/CI
|
||||
[package-validation](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/.github/workflows/package-validation.yml)
|
||||
workflow.
|
||||
|
||||
By default package validation is **NOT** run for local builds. To enable
|
||||
package validation in local builds set the `EnablePackageValidation` property
|
||||
to `true` in
|
||||
[Common.prod.props](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/build/Common.prod.props)
|
||||
(please do not check in this change).
|
||||
|
||||
### Working with Microsoft.CodeAnalysis.PublicApiAnalyzers
|
||||
|
||||
#### Update public API files when writing code
|
||||
|
||||
[IntelliSense](https://docs.microsoft.com/visualstudio/ide/using-intellisense)
|
||||
will [suggest
|
||||
modifications](https://github.com/dotnet/roslyn-analyzers/issues/3322#issuecomment-591031429)
|
||||
to the `PublicAPI.Unshipped.txt` file when you make changes. After reviewing
|
||||
these changes, ensure they are reflected across all targeted frameworks. You can
|
||||
do this by:
|
||||
|
||||
* Using the "Fix all occurrences in Project" feature in Visual Studio.
|
||||
|
||||
* Manually cycling through each framework using Visual Studio's target framework
|
||||
dropdown (in the upper right corner) and applying the IntelliSense
|
||||
suggestions.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Do **NOT** modify `PublicAPI.Shipped.txt` files. New features and bug fixes
|
||||
**SHOULD** only require changes to `PublicAPI.Unshipped.txt` files. If you
|
||||
have to modify a "shipped" file it likely means you made a mistake and broke a
|
||||
stable API. Typically only maintainers modify the `PublicAPI.Shipped.txt` file
|
||||
while performing stable releases. If you need help reach out to an approver or
|
||||
maintainer on Slack or open a draft PR.
|
||||
|
||||
#### Enable public API validation in new projects
|
||||
|
||||
1. If you are **NOT** using experimental APIs:
|
||||
* If your API is the same across all target frameworks:
|
||||
* You only need two files: `.publicApi/PublicAPI.Shipped.txt` and
|
||||
`.publicApi/PublicAPI.Unshipped.txt`.
|
||||
* If your APIs differ between target frameworks:
|
||||
* Place the shared APIs in `.publicApi/PublicAPI.Shipped.txt` and
|
||||
`.publicApi/PublicAPI.Unshipped.txt`.
|
||||
* Create framework-specific files for API differences (e.g.,
|
||||
`.publicApi/net462/PublicAPI.Shipped.txt` and
|
||||
`.publicApi/net462/PublicAPI.Unshipped.txt`).
|
||||
|
||||
2. If you are using experimental APIs:
|
||||
* Follow the rules above, but create an additional layer in your folder
|
||||
structure:
|
||||
* For stable APIs: `.publicApi/Stable/*`.
|
||||
* For experimental APIs: `.publicApi/Experimental/*`.
|
||||
* The `Experimental` folder should contain APIs that are public only in
|
||||
pre-release builds. Typically the `Experimental` folder only contains
|
||||
`PublicAPI.Unshipped.txt` files as experimental APIs are never shipped
|
||||
stable.
|
||||
|
||||
Example folder structure can be found
|
||||
[here](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Api/.publicApi).
|
||||
|
||||
## Pull Requests
|
||||
|
||||
### How to Send Pull Requests
|
||||
### How to create pull requests
|
||||
|
||||
Everyone is welcome to contribute code to `opentelemetry-dotnet` via GitHub pull
|
||||
requests (PRs).
|
||||
|
||||
To create a new PR, fork the project in GitHub and clone the upstream repo:
|
||||
To create a new PR, fork the project on GitHub and clone the upstream repo:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/open-telemetry/opentelemetry-dotnet.git
|
||||
|
@ -125,7 +210,7 @@ If you made changes to the Markdown documents (`*.md` files), install the latest
|
|||
markdownlint .
|
||||
```
|
||||
|
||||
Check out a new branch, make modifications and push the branch to your fork:
|
||||
Check out a new branch, make modifications, and push the branch to your fork:
|
||||
|
||||
```sh
|
||||
$ git checkout -b feature
|
||||
|
@ -136,20 +221,26 @@ $ git push fork feature
|
|||
|
||||
Open a pull request against the main `opentelemetry-dotnet` repo.
|
||||
|
||||
### How to Receive Comments
|
||||
#### Tips and best practices for pull requests
|
||||
|
||||
* If the PR is not ready for review, please mark it as
|
||||
[`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
|
||||
* Make sure CLA is signed and all required CI checks are clear.
|
||||
* Submit small, focused PRs addressing a single
|
||||
concern/issue.
|
||||
* Submit small, focused PRs addressing a single concern/issue.
|
||||
* Make sure the PR title reflects the contribution.
|
||||
* Write a summary that helps understand the change.
|
||||
* Include usage examples in the summary, where applicable.
|
||||
* Include benchmarks (before/after) in the summary, for contributions that are
|
||||
performance enhancements.
|
||||
* We are open to bot generated PRs or AI/LLM assisted PRs. Actually, we are
|
||||
using
|
||||
[dependabot](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)
|
||||
to automate the security updates. However, if you use bots to generate spam
|
||||
PRs (e.g. incorrect, noisy, non-improvements, unintelligible, trying to sell
|
||||
your product, etc.), we might close the PR right away with a warning, and if
|
||||
you keep doing so, we might block your user account.
|
||||
|
||||
### How to Get PRs Merged
|
||||
### How to get pull requests merged
|
||||
|
||||
A PR is considered to be **ready to merge** when:
|
||||
|
||||
|
@ -157,18 +248,21 @@ A PR is considered to be **ready to merge** when:
|
|||
[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).
|
||||
* Major feedbacks are resolved.
|
||||
* Major feedback/comments are resolved.
|
||||
* It has been open for review for at least one working day. This gives people
|
||||
reasonable time to review.
|
||||
* Trivial change (typo, cosmetic, doc, etc.) doesn't have to wait for one day.
|
||||
* Urgent fix can take exception as long as it has been actively communicated.
|
||||
* Trivial change (typo, cosmetic, doc, etc.) doesn't have to wait for one day.
|
||||
* Urgent fix can take exception as long as it has been actively communicated.
|
||||
|
||||
Any Maintainer can merge the PR once it is **ready to merge**. Note, that some
|
||||
PRs may not be merged immediately if the repo is in the process of a release and
|
||||
the maintainers decided to defer the PR to the next release train.
|
||||
Any maintainer can merge PRs once they are **ready to merge** however
|
||||
maintainers might decide to wait on merging changes until there are more
|
||||
approvals and/or dicussion, or based on other factors such as release timing and
|
||||
risk to users. For example if a stable release is planned and a new change is
|
||||
introduced adding public API(s) or behavioral changes it might be held until the
|
||||
next alpha/beta release.
|
||||
|
||||
If a PR has been stuck (e.g. there are lots of debates and people couldn't agree
|
||||
on each other), the owner should try to get people aligned by:
|
||||
If a PR has become stuck (e.g. there is a lot of debate and people couldn't
|
||||
agree on the direction), the owner should try to get people aligned by:
|
||||
|
||||
* Consolidating the perspectives and putting a summary in the PR. It is
|
||||
recommended to add a link into the PR description, which points to a comment
|
||||
|
@ -183,7 +277,7 @@ on each other), the owner should try to get people aligned by:
|
|||
the owner should bring it to the OpenTelemetry .NET SIG
|
||||
[meeting](README.md#contributing).
|
||||
|
||||
## Design Choices
|
||||
## Design choices
|
||||
|
||||
As with other OpenTelemetry clients, opentelemetry-dotnet follows the
|
||||
[opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification).
|
||||
|
@ -191,7 +285,7 @@ As with other OpenTelemetry clients, opentelemetry-dotnet follows the
|
|||
It's especially valuable to read through the [library
|
||||
guidelines](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/library-guidelines.md).
|
||||
|
||||
### Focus on Capabilities, Not Structure Compliance
|
||||
### Focus on capabilities not structural compliance
|
||||
|
||||
OpenTelemetry is an evolving specification, one where the desires and use cases
|
||||
are clear, but the method to satisfy those uses cases are not.
|
||||
|
@ -205,10 +299,10 @@ than conform to specific API names or argument patterns in the spec.
|
|||
For a deeper discussion, see [this spec
|
||||
issue](https://github.com/open-telemetry/opentelemetry-specification/issues/165).
|
||||
|
||||
## Style Guide
|
||||
## Style guide
|
||||
|
||||
This project includes a [`.editorconfig`](./.editorconfig) file which is
|
||||
supported by all the IDEs/editor mentioned above. It works with the IDE/editor
|
||||
supported by all the IDEs/editors mentioned above. It works with the IDE/editor
|
||||
only and does not affect the actual build of the project.
|
||||
|
||||
This repository also includes StyleCop ruleset files under the `./build` folder.
|
||||
|
@ -229,27 +323,33 @@ types](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-type
|
|||
* Pass [static
|
||||
analysis](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview).
|
||||
|
||||
New projects MUST enable static analysis by specifying
|
||||
`<AnalysisLevel>latest-all</AnalysisLevel>` in the project file (`.csproj`).
|
||||
|
||||
> **Note**
|
||||
> [!NOTE]
|
||||
> There are other project-level features enabled automatically via
|
||||
[Common.props](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/build/Common.props)
|
||||
new projects must NOT manually override these settings.
|
||||
|
||||
## New code
|
||||
## License requirements
|
||||
|
||||
New code files MUST enable [nullable reference
|
||||
types](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/nullable-reference-types)
|
||||
manually in projects where it is not automatically enabled project-wide. This is
|
||||
done by specifying `#nullable enable` towards the top of the file (usually after
|
||||
the copyright header). We are currently working towards enabling nullable
|
||||
context in every project by updating code as it is worked on, this requirement
|
||||
is to make sure the surface area of code needing updates is shrinking and not
|
||||
expanding.
|
||||
OpenTelemetry .NET is licensed under the [Apache License, Version
|
||||
2.0](./LICENSE.TXT).
|
||||
|
||||
> **Note**
|
||||
> The first time a project is updated to use nullable context in public APIs
|
||||
some housekeeping needs to be done in public API definitions (`.publicApi`
|
||||
folder). This can be done automatically via a code fix offered by the public API
|
||||
analyzer.
|
||||
### Copying files from other projects
|
||||
|
||||
OpenTelemetry .NET uses some files from other projects, typically where a binary
|
||||
distribution does not exist or would be inconvenient.
|
||||
|
||||
The following rules must be followed for PRs that include files from another
|
||||
project:
|
||||
|
||||
* The license of the file is
|
||||
[permissive](https://en.wikipedia.org/wiki/Permissive_free_software_licence).
|
||||
|
||||
* The license of the file is left intact.
|
||||
|
||||
* The contribution is correctly attributed in the [3rd party
|
||||
notices](./THIRD-PARTY-NOTICES.TXT) file in the repository, as needed.
|
||||
|
||||
See
|
||||
[EnvironmentVariablesExtensions.cs](./src/Shared/EnvironmentVariables/EnvironmentVariablesExtensions.cs)
|
||||
for an example of a file copied from another project and attributed in the [3rd
|
||||
party notices](./THIRD-PARTY-NOTICES.TXT) file.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<ArtifactsPath>$([System.IO.Path]::Combine('$(MSBuildThisFileDirectory)', 'artifacts'))</ArtifactsPath>
|
||||
<UseArtifactsOutput>true</UseArtifactsOutput>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,10 +1,19 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OTelLatestStableVer>1.5.1</OTelLatestStableVer>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<OTelLatestStableVer>1.12.0</OTelLatestStableVer>
|
||||
|
||||
<!--
|
||||
This is typically the latest annual release of .NET. Use this wherever
|
||||
possible and only deviate (use a specific version) when a package has a
|
||||
more specific patch which must be reference directly.
|
||||
-->
|
||||
<LatestRuntimeOutOfBandVer>9.0.0</LatestRuntimeOutOfBandVer>
|
||||
|
||||
<!-- Mitigate https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-43485. -->
|
||||
<SystemTextEncodingsWebOutOfBandMinimumCoreAppVer>8.0.0</SystemTextEncodingsWebOutOfBandMinimumCoreAppVer>
|
||||
<SystemTextJsonOutOfBandMinimumCoreAppVer>8.0.5</SystemTextJsonOutOfBandMinimumCoreAppVer>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
|
@ -13,80 +22,107 @@
|
|||
vulnerability in the NuGet packages that are published from this repository.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Google.Protobuf" Version="[3.19.4,4.0)" />
|
||||
<PackageVersion Include="Grpc" Version="[2.44.0,3.0)" />
|
||||
<PackageVersion Include="Grpc.Net.Client" Version="[2.52.0,3.0)" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Http.Abstractions" Version="[2.1.1,6.0)" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Http.Features" Version="[2.1.1,6.0)" />
|
||||
<PackageVersion Include="Microsoft.CSharp" Version="[4.7.0]" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="[3.1.0,)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="[3.1.0,)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[3.1.0,)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="[2.1.0,)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="[3.1.0,)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="[3.1.0,)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options" Version="[3.1.0,)" />
|
||||
<PackageVersion Include="OpenTelemetry" Version="$(OTelLatestStableVer)" />
|
||||
<PackageVersion Include="OpenTelemetry.Api.ProviderBuilderExtensions" Version="$(OTelLatestStableVer)" />
|
||||
<!--
|
||||
Typically, for the Microsoft.Extensions.* packages relating to DI Abstractions, Hosting Abstractions, and Logging,
|
||||
the latest stable version should be used because:
|
||||
1) Each major version bump will have some new API capabilities (e.g.For Logging, .NET 6 introduced compile-time logging
|
||||
source generation, .NET 8 introduced automatic event id generation).
|
||||
2) Each minor version bump is normally security hotfixes or critical bug fixes.
|
||||
3) Since version 3.1.0, the .NET runtime team is holding a high bar for backward compatibility on
|
||||
these packages even during major version bumps, so compatibility is not a concern here.
|
||||
-->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Abstractions" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
|
||||
<!--
|
||||
OTel packages always point to latest stable release.
|
||||
-->
|
||||
<PackageVersion Include="OpenTelemetry" Version="[$(OTelLatestStableVer),2.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Api" Version="[$(OTelLatestStableVer),2.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Api.ProviderBuilderExtensions" Version="[$(OTelLatestStableVer),2.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="[$(OTelLatestStableVer),2.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="[$(OTelLatestStableVer),2.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Extensions.Propagators" Version="[$(OTelLatestStableVer),2.0)" />
|
||||
<PackageVersion Include="OpenTracing" Version="[0.12.1,0.13)" />
|
||||
|
||||
<!--
|
||||
Typically, the latest stable version of System.Diagnostics.DiagnosticSource should be used here because:
|
||||
1) Each major version bump will have some new OpenTelemetry API capabilities (e.g. .NET 6 introduced Meter
|
||||
API, .NET 7 added UpDownCounter, .NET 8 is adding Meter/Instrument level attributes support, .NET 9 might
|
||||
add Advice/Hint API) that the OpenTelemetry components rely on.
|
||||
1) Each major version bump will likely have some new OpenTelemetry capabilities (e.g. .NET 6 introduced Meter
|
||||
API, .NET 7 added UpDownCounter, .NET 8 added Meter/Instrument level attributes support, .NET 9 added
|
||||
Advice/Hint API, etc.).
|
||||
2) Each minor version bump is normally security hotfixes or critical bug fixes.
|
||||
3) The .NET runtime team provides extra backward compatibility guarantee to System.Diagnostics.DiagnosticSource
|
||||
even during major version bumps, so compatibility is not a concern here.
|
||||
-->
|
||||
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="7.0.2" />
|
||||
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- A conservative version of System.Reflection.Emit.Lightweight must be used here since there is no backward compatibility guarantee during major version bumps. -->
|
||||
<PackageVersion Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
|
||||
<ItemGroup>
|
||||
<!--
|
||||
Note: See TargetFrameworksRequiringSystemTextJsonDirectReference for the
|
||||
list of targets where System.Text.Json direct reference is applied.
|
||||
-->
|
||||
|
||||
<!-- A conservative version of System.Text.Encodings.Web must be used here since there is no backward compatibility guarantee during major version bumps. -->
|
||||
<!--
|
||||
We use conservative versions of these packages for older runtimes where
|
||||
an upgrade might introduce breaking changes. For example see:
|
||||
https://devblogs.microsoft.com/dotnet/system-text-json-in-dotnet-7/#breaking-changes.
|
||||
-->
|
||||
<PackageVersion Include="System.Text.Encodings.Web" Version="4.7.2" />
|
||||
|
||||
<!-- A conservative version of System.Text.Json must be used here since there is no backward compatibility guarantee during major version bumps. -->
|
||||
<PackageVersion Include="System.Text.Json" Version="4.7.2" />
|
||||
|
||||
<!-- A conservative version of System.Threading.Tasks.Extensions must be used here since there is no backward compatibility guarantee during major version bumps. -->
|
||||
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
|
||||
<!-- Newer NETCoreApp runtimes need to be redirected to safe versions. -->
|
||||
<PackageVersion Update="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebOutOfBandMinimumCoreAppVer)" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
|
||||
<PackageVersion Update="System.Text.Json" Version="$(SystemTextJsonOutOfBandMinimumCoreAppVer)" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
This section covers packages that are **not** directly referenced by the NuGet packages published from this repository.
|
||||
For example, these packages are used in the tests, examples or referenced as "PrivateAssets", but not in the NuGet packages themselves.
|
||||
These packages are referenced as "PrivateAssets" or used in tests/examples.
|
||||
-->
|
||||
<!-- 'net7.0' is the default `TargetFramework`. Use `VersionOverride` in the project to override the package versions from a different `TargetFramework` -->
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="BenchmarkDotNet" Version="[0.13.6,0.14)" />
|
||||
<PackageVersion Include="BenchmarkDotNet" Version="0.15.2" />
|
||||
<PackageVersion Include="CommandLineParser" Version="[2.9.1,3.0)" />
|
||||
<PackageVersion Include="Grpc.AspNetCore" Version="[2.55.0,3.0)" />
|
||||
<PackageVersion Include="Grpc.AspNetCore.Server" Version="[2.55.0, 3.0)" />
|
||||
<PackageVersion Include="Grpc.Tools" Version="[2.56.2,3.0)" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="7.0.9" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.9" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="[3.11.0-beta1.23402.2]" />
|
||||
<PackageVersion Include="Microsoft.CodeCoverage" Version="[17.6.3]" />
|
||||
<PackageVersion Include="Microsoft.Data.SqlClient" Version="2.1.2" />
|
||||
<PackageVersion Include="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21308.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="[3.1.6,5.0)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="3.1.20" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="[6.0.0,)" />
|
||||
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
|
||||
<PackageVersion Include="Grpc.AspNetCore" Version="[2.59.0,3.0)" />
|
||||
<PackageVersion Include="Grpc.AspNetCore.Server" Version="[2.59.0, 3.0)" />
|
||||
<PackageVersion Include="Grpc.Tools" Version="[2.59.0,3.0)" />
|
||||
<PackageVersion Include="Google.Protobuf" Version="[3.22.5,4.0)" />
|
||||
<PackageVersion Include="Grpc" Version="[2.44.0,3.0)" />
|
||||
<PackageVersion Include="Grpc.Net.Client" Version="[2.52.0,3.0)" />
|
||||
<PackageVersion Include="JunitXml.TestLogger" Version="6.1.0" />
|
||||
<PackageVersion Include="Microsoft.CSharp" Version="[4.7.0]" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="[3.11.0-beta1.23525.2]" />
|
||||
<PackageVersion Include="Microsoft.Coyote" Version="1.7.11" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(LatestRuntimeOutOfBandVer)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Telemetry.Abstractions" Version="[9.0.0,)" />
|
||||
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="[1.0.3,2.0)" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="[17.6.3]" />
|
||||
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="[1.1.1,2.0)" />
|
||||
<PackageVersion Include="MinVer" Version="[4.3.0,5.0)" />
|
||||
<PackageVersion Include="Moq" Version="[4.18.4,5.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="[1.5.0,2.0)" />
|
||||
<PackageVersion Include="RabbitMQ.Client" Version="[6.5.0,7.0)" />
|
||||
<PackageVersion Include="StyleCop.Analyzers" Version="[1.2.0-beta.507,2.0)" />
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="[6.4.0]" />
|
||||
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageVersion Include="Testcontainers.MsSql" Version="3.3.0" />
|
||||
<PackageVersion Include="Testcontainers.SqlEdge" Version="3.3.0" />
|
||||
<PackageVersion Include="xunit" Version="[2.5.0,3.0)" />
|
||||
<PackageVersion Include="xunit.runner.visualstudio" Version="[2.5.0,3.0)" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="[17.13.0,18.0.0)" />
|
||||
<PackageVersion Include="MinVer" Version="[5.0.0,6.0)" />
|
||||
<PackageVersion Include="NuGet.Versioning" Version="6.11.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="[1.9.0,2.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="[1.9.0-beta.1,2.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="[1.9.0,2.0)" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="[1.9.0,2.0)" />
|
||||
<PackageVersion Include="RabbitMQ.Client" Version="[6.8.1,7.0)" />
|
||||
<PackageVersion Include="StyleCop.Analyzers" Version="[1.2.0-beta.556,2.0)" />
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="[6.7.3,)" />
|
||||
<PackageVersion Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
|
||||
<PackageVersion Include="xunit" Version="[2.9.3,3.0)" />
|
||||
<PackageVersion Include="xunit.runner.visualstudio" Version="[2.8.2,3.0)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
|
||||
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -3,23 +3,14 @@
|
|||
<packageSources>
|
||||
<clear />
|
||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="dotnet8" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json" />
|
||||
<add key=".Net Core Tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
|
||||
</packageSources>
|
||||
|
||||
<!-- Define mappings by adding package patterns beneath the target source. -->
|
||||
<!-- *.Tools packages will be restored from ".Net Core Tools", everything else from nuget.org. -->
|
||||
<packageSourceMapping>
|
||||
<!-- key value for <packageSource> should match key values from <packageSources> element -->
|
||||
<packageSource key="NuGet">
|
||||
<package pattern="*" />
|
||||
</packageSource>
|
||||
<packageSource key="dotnet8">
|
||||
<package pattern="Microsoft.CodeAnalysis.PublicApiAnalyzers" />
|
||||
</packageSource>
|
||||
<packageSource key=".Net Core Tools">
|
||||
<package pattern="Microsoft.DotNet.ApiCompat" />
|
||||
</packageSource>
|
||||
</packageSourceMapping>
|
||||
|
||||
<disabledPackageSources />
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
<Project>
|
||||
<ItemGroup>
|
||||
<SolutionProjects Include="**\*.csproj" />
|
||||
|
||||
<PackProjects Include="src\**\*.csproj" />
|
||||
|
||||
<!-- Not pack SemanticConventions project for now -->
|
||||
<SolutionProjects Remove="src\OpenTelemetry.SemanticConventions\OpenTelemetry.SemanticConventions.csproj" />
|
||||
<PackProjects Remove="src\OpenTelemetry.SemanticConventions\OpenTelemetry.SemanticConventions.csproj" />
|
||||
|
||||
<!-- Skip building these projects when publish packages workflow runs as these projects need to depend upon instrumentation libraries taking a project reference
|
||||
instead of package reference on API/SDK-->
|
||||
<SolutionProjects Remove="examples\**\*.csproj" Condition="'$(RunningDotNetPack)' == 'true'"/>
|
||||
<SolutionProjects Remove="test\Benchmarks\Benchmarks.csproj" Condition="'$(RunningDotNetPack)' == 'true'"/>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
<MSBuild Projects="@(SolutionProjects)" Targets="Restore;Build" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Pack">
|
||||
<MSBuild Projects="@(PackProjects)" Targets="Pack" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -11,16 +11,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||
ProjectSection(SolutionItems) = preProject
|
||||
.dockerignore = .dockerignore
|
||||
.editorconfig = .editorconfig
|
||||
.gitignore = .gitignore
|
||||
CONTRIBUTING.md = CONTRIBUTING.md
|
||||
Directory.Packages.props = Directory.Packages.props
|
||||
test\Directory.Packages.props = test\Directory.Packages.props
|
||||
examples\Directory.Packages.props = examples\Directory.Packages.props
|
||||
docs\Directory.Packages.props = docs\Directory.Packages.props
|
||||
global.json = global.json
|
||||
LICENSE = LICENSE
|
||||
LICENSE.TXT = LICENSE.TXT
|
||||
NuGet.config = NuGet.config
|
||||
OpenTelemetry.proj = OpenTelemetry.proj
|
||||
README.md = README.md
|
||||
RELEASENOTES.md = RELEASENOTES.md
|
||||
THIRD-PARTY-NOTICES.TXT = THIRD-PARTY-NOTICES.TXT
|
||||
VERSIONING.md = VERSIONING.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -29,22 +27,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7CB2F02E
|
|||
build\Common.nonprod.props = build\Common.nonprod.props
|
||||
build\Common.prod.props = build\Common.prod.props
|
||||
build\Common.props = build\Common.props
|
||||
build\Common.targets = build\Common.targets
|
||||
build\debug.snk = build\debug.snk
|
||||
Directory.Packages.props = Directory.Packages.props
|
||||
build\docfx.cmd = build\docfx.cmd
|
||||
build\docker-compose.net6.0.yml = build\docker-compose.net6.0.yml
|
||||
build\docker-compose.net7.0.yml = build\docker-compose.net7.0.yml
|
||||
build\finalize-publicapi.ps1 = build\finalize-publicapi.ps1
|
||||
build\docker-compose.net8.0.yml = build\docker-compose.net8.0.yml
|
||||
build\docker-compose.net9.0.yml = build\docker-compose.net9.0.yml
|
||||
build\GlobalAttrExclusions.txt = build\GlobalAttrExclusions.txt
|
||||
build\opentelemetry-icon-color.png = build\opentelemetry-icon-color.png
|
||||
build\OpenTelemetry.prod.loose.ruleset = build\OpenTelemetry.prod.loose.ruleset
|
||||
build\OpenTelemetry.prod.ruleset = build\OpenTelemetry.prod.ruleset
|
||||
build\OpenTelemetry.proj = build\OpenTelemetry.proj
|
||||
build\OpenTelemetry.test.ruleset = build\OpenTelemetry.test.ruleset
|
||||
build\PreBuild.ps1 = build\PreBuild.ps1
|
||||
build\process-codecoverage.ps1 = build\process-codecoverage.ps1
|
||||
build\RELEASING.md = build\RELEASING.md
|
||||
build\stylecop.json = build\stylecop.json
|
||||
build\test-aot-compatibility.ps1 = build\test-aot-compatibility.ps1
|
||||
build\UnstableCoreLibraries.proj = build\UnstableCoreLibraries.proj
|
||||
build\xunit.runner.json = build\xunit.runner.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -52,10 +49,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Zipk
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Api", "src\OpenTelemetry.Api\OpenTelemetry.Api.csproj", "{99F8A331-05E9-45A5-89BA-4C54E825E5B2}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNetCore", "src\OpenTelemetry.Instrumentation.AspNetCore\OpenTelemetry.Instrumentation.AspNetCore.csproj", "{752D2182-A351-41D8-99EE-DD363D7D5B43}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNetCore.Tests", "test\OpenTelemetry.Instrumentation.AspNetCore.Tests\OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj", "{2A47F6A8-63E5-4237-8046-94CAF321E797}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testdata", "testdata", "{77C7929A-2EED-4AA6-8705-B5C443C8AA0F}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{E359BB2B-9AEC-497D-B321-7DF2450C3B8E}"
|
||||
|
@ -78,36 +71,36 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Open
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{F1D0972B-38CF-49C2-9F4B-4C5DE02FB71D}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.github\codecov.yml = .github\codecov.yml
|
||||
.github\CODEOWNERS = .github\CODEOWNERS
|
||||
.github\dependabot.yml = .github\dependabot.yml
|
||||
.github\PULL_REQUEST_TEMPLATE.md = .github\PULL_REQUEST_TEMPLATE.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEMPLATE", "{A533C800-3DC3-4D04-90A7-0CE7A1E6BDB3}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.github\ISSUE_TEMPLATE\bug_report.md = .github\ISSUE_TEMPLATE\bug_report.md
|
||||
.github\ISSUE_TEMPLATE\feature_request.md = .github\ISSUE_TEMPLATE\feature_request.md
|
||||
.github\ISSUE_TEMPLATE\question.md = .github\ISSUE_TEMPLATE\question.md
|
||||
.github\ISSUE_TEMPLATE\bug_report.yml = .github\ISSUE_TEMPLATE\bug_report.yml
|
||||
.github\ISSUE_TEMPLATE\feature_request.yml = .github\ISSUE_TEMPLATE\feature_request.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{E69578EB-B456-4062-A645-877CD964528B}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.github\workflows\apicompatibility.yml = .github\workflows\apicompatibility.yml
|
||||
.github\workflows\ci-aot.yml = .github\workflows\ci-aot.yml
|
||||
.github\workflows\ci-instrumentation-libraries-md.yml = .github\workflows\ci-instrumentation-libraries-md.yml
|
||||
.github\workflows\ci-instrumentation-libraries.yml = .github\workflows\ci-instrumentation-libraries.yml
|
||||
.github\workflows\ci-md.yml = .github\workflows\ci-md.yml
|
||||
.github\workflows\add-labels.yml = .github\workflows\add-labels.yml
|
||||
.github\workflows\automation.yml = .github\workflows\automation.yml
|
||||
.github\workflows\ci.yml = .github\workflows\ci.yml
|
||||
.github\workflows\code-coverage.yml = .github\workflows\code-coverage.yml
|
||||
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
|
||||
.github\workflows\Component.BuildTest.yml = .github\workflows\Component.BuildTest.yml
|
||||
.github\workflows\concurrency-tests.yml = .github\workflows\concurrency-tests.yml
|
||||
.github\workflows\docfx.yml = .github\workflows\docfx.yml
|
||||
.github\workflows\dotnet-format-md.yml = .github\workflows\dotnet-format-md.yml
|
||||
.github\workflows\dotnet-format.yml = .github\workflows\dotnet-format.yml
|
||||
.github\workflows\integration-md.yml = .github\workflows\integration-md.yml
|
||||
.github\workflows\integration.yml = .github\workflows\integration.yml
|
||||
.github\workflows\markdownlint.yml = .github\workflows\markdownlint.yml
|
||||
.github\workflows\package-validation.yml = .github\workflows\package-validation.yml
|
||||
.github\workflows\post-release.yml = .github\workflows\post-release.yml
|
||||
.github\workflows\prepare-release.yml = .github\workflows\prepare-release.yml
|
||||
.github\workflows\publish-packages-1.0.yml = .github\workflows\publish-packages-1.0.yml
|
||||
.github\workflows\sanitycheck.yml = .github\workflows\sanitycheck.yml
|
||||
.github\workflows\stale.yml = .github\workflows\stale.yml
|
||||
.github\workflows\verifyaotcompat.yml = .github\workflows\verifyaotcompat.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C1542297-8763-4DF4-957C-489ED771C21D}"
|
||||
|
@ -122,32 +115,27 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{D2E73927-5
|
|||
test\Directory.Build.targets = test\Directory.Build.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Grpc.Tests", "test\OpenTelemetry.Instrumentation.Grpc.Tests\OpenTelemetry.Instrumentation.Grpc.Tests.csproj", "{305E9DFD-E73B-4A28-8769-795C25551020}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples.Console", "examples\Console\Examples.Console.csproj", "{FF3E6E08-E8E4-4523-B526-847CD989279F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples.AspNetCore", "examples\AspNetCore\Examples.AspNetCore.csproj", "{0935622B-9377-4056-8343-AE6ECDC274CF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "test\Benchmarks\Benchmarks.csproj", "{DE9130A4-F30A-49D7-8834-41DE3021218B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.SqlClient.Tests", "test\OpenTelemetry.Instrumentation.SqlClient.Tests\OpenTelemetry.Instrumentation.SqlClient.Tests.csproj", "{0C606039-BE0A-4EE6-B8F7-F75B41E52CB8}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.SqlClient", "src\OpenTelemetry.Instrumentation.SqlClient\OpenTelemetry.Instrumentation.SqlClient.csproj", "{41C30DC1-8C57-4E14-A83A-7635A3C7960B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Http.Tests", "test\OpenTelemetry.Instrumentation.Http.Tests\OpenTelemetry.Instrumentation.Http.Tests.csproj", "{DE9EB7D8-9CC5-4073-90B3-9FBF685B3305}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Http", "src\OpenTelemetry.Instrumentation.Http\OpenTelemetry.Instrumentation.Http.csproj", "{412C64D1-43D6-4E4C-8AD8-E20E63B415BD}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.GrpcNetClient", "src\OpenTelemetry.Instrumentation.GrpcNetClient\OpenTelemetry.Instrumentation.GrpcNetClient.csproj", "{0246BFC4-8AAF-45E1-A127-DB43D6E345BB}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{7C87CAF9-79D7-4C26-9FFB-F3F1FB6911F1}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
docs\README.md = docs\README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{2C7DD1DA-C229-4D9E-9AF0-BCD5CD3E4948}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
examples\Directory.Build.props = examples\Directory.Build.props
|
||||
examples\Directory.Build.targets = examples\Directory.Build.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "trace", "trace", "{5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
docs\trace\README.md = docs\trace\README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "metrics", "metrics", "{3277B1C0-BDFE-4460-9B0D-D9A661FB48DB}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
@ -156,7 +144,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "metrics", "metrics", "{3277
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "logs", "logs", "{3862190B-E2C5-418E-AFDC-DB281FB5C705}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
docs\logs\getting-started-console\README.md = docs\logs\getting-started-console\README.md
|
||||
docs\logs\README.md = docs\logs\README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MicroserviceExample", "MicroserviceExample", "{4D492D62-5150-45F9-817F-C99562E364E2}"
|
||||
|
@ -175,6 +163,7 @@ EndProject
|
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{CB401DF1-FF5C-4055-886E-1183E832B2D6}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
docs\Directory.Build.props = docs\Directory.Build.props
|
||||
docs\Directory.Packages.props = docs\Directory.Packages.props
|
||||
docs\docfx.json = docs\docfx.json
|
||||
docs\toc.yml = docs\toc.yml
|
||||
EndProjectSection
|
||||
|
@ -211,8 +200,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Tests.Stress"
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "getting-started-prometheus-grafana", "docs\metrics\getting-started-prometheus-grafana\getting-started-prometheus-grafana.csproj", "{41B784AA-3301-4126-AF9F-1D59BD04B0BF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.SemanticConventions", "src\OpenTelemetry.SemanticConventions\OpenTelemetry.SemanticConventions.csproj", "{D4519DF6-CC72-4AC4-A851-E21383098D11}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "customizing-the-sdk", "docs\logs\customizing-the-sdk\customizing-the-sdk.csproj", "{6C7A1595-36D6-4229-BBB5-5A6B5791791D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Extensions.Propagators", "src\OpenTelemetry.Extensions.Propagators\OpenTelemetry.Extensions.Propagators.csproj", "{E91B2E40-E428-43B3-8A43-09709F0E69E4}"
|
||||
|
@ -235,6 +222,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Tests.Stress.
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp.AspNetCore", "test\TestApp.AspNetCore\TestApp.AspNetCore.csproj", "{5FDAF679-DE5A-4C73-A49B-8ABCF2399229}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "complex-objects", "docs\logs\complex-objects\complex-objects.csproj", "{9AAB00EC-ED6F-4462-82DE-7D864A9DB6C5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redaction", "docs\logs\redaction\redaction.csproj", "{A2DF46DE-50D7-4887-8C9D-4BD79CA19FAA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Console.Tests", "test\OpenTelemetry.Exporter.Console.Tests\OpenTelemetry.Exporter.Console.Tests.csproj", "{011E70E1-152A-47BB-AF83-12DD12B125ED}"
|
||||
|
@ -260,30 +249,18 @@ EndProject
|
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\ActivityHelperExtensions.cs = src\Shared\ActivityHelperExtensions.cs
|
||||
src\Shared\ActivityInstrumentationHelper.cs = src\Shared\ActivityInstrumentationHelper.cs
|
||||
src\Shared\AssemblyVersionExtensions.cs = src\Shared\AssemblyVersionExtensions.cs
|
||||
src\Shared\DiagnosticDefinitions.cs = src\Shared\DiagnosticDefinitions.cs
|
||||
src\Shared\ExceptionExtensions.cs = src\Shared\ExceptionExtensions.cs
|
||||
src\Shared\Guard.cs = src\Shared\Guard.cs
|
||||
src\Shared\HttpSemanticConventionHelper.cs = src\Shared\HttpSemanticConventionHelper.cs
|
||||
src\Shared\MathHelper.cs = src\Shared\MathHelper.cs
|
||||
src\Shared\PeerServiceResolver.cs = src\Shared\PeerServiceResolver.cs
|
||||
src\Shared\PeriodicExportingMetricReaderHelper.cs = src\Shared\PeriodicExportingMetricReaderHelper.cs
|
||||
src\Shared\PooledList.cs = src\Shared\PooledList.cs
|
||||
src\Shared\ResourceSemanticConventions.cs = src\Shared\ResourceSemanticConventions.cs
|
||||
src\Shared\SemanticConventions.cs = src\Shared\SemanticConventions.cs
|
||||
src\Shared\SpanAttributeConstants.cs = src\Shared\SpanAttributeConstants.cs
|
||||
src\Shared\SpanHelper.cs = src\Shared\SpanHelper.cs
|
||||
src\Shared\StatusHelper.cs = src\Shared\StatusHelper.cs
|
||||
src\Shared\TagAndValueTransformer.cs = src\Shared\TagAndValueTransformer.cs
|
||||
src\Shared\TagTransformer.cs = src\Shared\TagTransformer.cs
|
||||
src\Shared\TagTransformerJsonHelper.cs = src\Shared\TagTransformerJsonHelper.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DiagnosticSourceInstrumentation", "DiagnosticSourceInstrumentation", "{28F3EC79-660C-4659-8B73-F90DC1173316}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceListener.cs = src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceListener.cs
|
||||
src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs = src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs
|
||||
src\Shared\DiagnosticSourceInstrumentation\ListenerHandler.cs = src\Shared\DiagnosticSourceInstrumentation\ListenerHandler.cs
|
||||
src\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs = src\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs
|
||||
src\Shared\ThreadSafeRandom.cs = src\Shared\ThreadSafeRandom.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EnvironmentVariables", "EnvironmentVariables", "{6D4B4FB2-0A8A-4044-948B-C063FD340439}"
|
||||
|
@ -295,19 +272,83 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EnvironmentVariables", "Env
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Options", "Options", "{494902DD-C63F-48E0-BED3-B58EFB4051C8}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\Options\ConfigurationExtensions.cs = src\Shared\Options\ConfigurationExtensions.cs
|
||||
src\Shared\Options\DelegatingOptionsFactory.cs = src\Shared\Options\DelegatingOptionsFactory.cs
|
||||
src\Shared\Options\DelegatingOptionsFactoryServiceCollectionExtensions.cs = src\Shared\Options\DelegatingOptionsFactoryServiceCollectionExtensions.cs
|
||||
src\Shared\Options\SingletonOptionsManager.cs = src\Shared\Options\SingletonOptionsManager.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shims", "Shims", "{A0CB9A10-F22D-4E66-A449-74B3D0361A9C}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\Shims\IsExternalInit.cs = src\Shared\Shims\IsExternalInit.cs
|
||||
src\Shared\Shims\Lock.cs = src\Shared\Shims\Lock.cs
|
||||
src\Shared\Shims\NullableAttributes.cs = src\Shared\Shims\NullableAttributes.cs
|
||||
src\Shared\Shims\UnconditionalSuppressMessageAttribute.cs = src\Shared\Shims\UnconditionalSuppressMessageAttribute.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Api.Tests", "test\OpenTelemetry.Api.Tests\OpenTelemetry.Api.Tests.csproj", "{777C04B8-1BD5-43D7-B3CD-D2189DFABCF3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Metrics", "Metrics", "{1C459B5B-C702-46FF-BF1A-EE795E420FFA}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\Metrics\Base2ExponentialBucketHistogramHelper.cs = src\Shared\Metrics\Base2ExponentialBucketHistogramHelper.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "getting-started-aspnetcore", "docs\logs\getting-started-aspnetcore\getting-started-aspnetcore.csproj", "{99B4D965-8782-4694-8DFA-B7A3630CEF60}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "links-creation", "docs\trace\links-creation-with-new-activities\links-creation.csproj", "{B4856711-6D4C-4246-A686-49458D4C1301}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "diagnostics", "diagnostics", "{52AF6D7D-9E66-4234-9A2C-5D16C6F22B40}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
docs\diagnostics\README.md = docs\diagnostics\README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "experimental-apis", "experimental-apis", "{17A22B0E-6EC3-4A39-B955-0A486AD06699}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
docs\diagnostics\experimental-apis\OTEL1000.md = docs\diagnostics\experimental-apis\OTEL1000.md
|
||||
docs\diagnostics\experimental-apis\OTEL1001.md = docs\diagnostics\experimental-apis\OTEL1001.md
|
||||
docs\diagnostics\experimental-apis\OTEL1004.md = docs\diagnostics\experimental-apis\OTEL1004.md
|
||||
docs\diagnostics\experimental-apis\README.md = docs\diagnostics\experimental-apis\README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "resources", "resources", "{A115CE4C-71A8-4B95-96A5-C1DF46FD94C2}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
docs\resources\README.md = docs\resources\README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "extending-the-sdk", "docs\resources\extending-the-sdk\extending-the-sdk.csproj", "{7BE494FC-4B0D-4340-A62A-9C9F3E7389FE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dedicated-pipeline", "docs\logs\dedicated-pipeline\dedicated-pipeline.csproj", "{19545B37-8518-4BDD-AD49-00C031FB3C2A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Configuration", "Configuration", "{87A20A76-D524-4AAC-AF92-8725BFED0415}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\Configuration\IConfigurationExtensionsLogger.cs = src\Shared\Configuration\IConfigurationExtensionsLogger.cs
|
||||
src\Shared\Configuration\OpenTelemetryConfigurationExtensions.cs = src\Shared\Configuration\OpenTelemetryConfigurationExtensions.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TagWriter", "TagWriter", "{993E65E5-E71B-40FD-871C-60A9EBD59724}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\TagWriter\ArrayTagWriter.cs = src\Shared\TagWriter\ArrayTagWriter.cs
|
||||
src\Shared\TagWriter\JsonStringArrayTagWriter.cs = src\Shared\TagWriter\JsonStringArrayTagWriter.cs
|
||||
src\Shared\TagWriter\TagWriter.cs = src\Shared\TagWriter\TagWriter.cs
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{44982E0D-C8C6-42DC-9F8F-714981F27CE6}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\scripts\add-labels.psm1 = build\scripts\add-labels.psm1
|
||||
build\scripts\finalize-publicapi.ps1 = build\scripts\finalize-publicapi.ps1
|
||||
build\scripts\post-release.psm1 = build\scripts\post-release.psm1
|
||||
build\scripts\prepare-release.psm1 = build\scripts\prepare-release.psm1
|
||||
build\scripts\sanitycheck.py = build\scripts\sanitycheck.py
|
||||
build\scripts\test-aot-compatibility.ps1 = build\scripts\test-aot-compatibility.ps1
|
||||
build\scripts\test-threadSafety.ps1 = build\scripts\test-threadSafety.ps1
|
||||
build\scripts\update-changelogs.ps1 = build\scripts\update-changelogs.ps1
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "exemplars", "docs\metrics\exemplars\exemplars.csproj", "{79C12C80-B27B-41FB-AE79-A3BB74CFA782}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Proto", "Proto", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\Shared\Proto\README.md = src\Shared\Proto\README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -330,14 +371,6 @@ Global
|
|||
{99F8A331-05E9-45A5-89BA-4C54E825E5B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{99F8A331-05E9-45A5-89BA-4C54E825E5B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{99F8A331-05E9-45A5-89BA-4C54E825E5B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{752D2182-A351-41D8-99EE-DD363D7D5B43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{752D2182-A351-41D8-99EE-DD363D7D5B43}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{752D2182-A351-41D8-99EE-DD363D7D5B43}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{752D2182-A351-41D8-99EE-DD363D7D5B43}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2A47F6A8-63E5-4237-8046-94CAF321E797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2A47F6A8-63E5-4237-8046-94CAF321E797}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2A47F6A8-63E5-4237-8046-94CAF321E797}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2A47F6A8-63E5-4237-8046-94CAF321E797}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AAC408FE-40EF-4479-97D9-697F2C1A0B28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AAC408FE-40EF-4479-97D9-697F2C1A0B28}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AAC408FE-40EF-4479-97D9-697F2C1A0B28}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -370,10 +403,6 @@ Global
|
|||
{7C4026CA-6434-4762-8B77-D657EAEE1325}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7C4026CA-6434-4762-8B77-D657EAEE1325}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7C4026CA-6434-4762-8B77-D657EAEE1325}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{305E9DFD-E73B-4A28-8769-795C25551020}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{305E9DFD-E73B-4A28-8769-795C25551020}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{305E9DFD-E73B-4A28-8769-795C25551020}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{305E9DFD-E73B-4A28-8769-795C25551020}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FF3E6E08-E8E4-4523-B526-847CD989279F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FF3E6E08-E8E4-4523-B526-847CD989279F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FF3E6E08-E8E4-4523-B526-847CD989279F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -386,26 +415,6 @@ Global
|
|||
{DE9130A4-F30A-49D7-8834-41DE3021218B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DE9130A4-F30A-49D7-8834-41DE3021218B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DE9130A4-F30A-49D7-8834-41DE3021218B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0C606039-BE0A-4EE6-B8F7-F75B41E52CB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0C606039-BE0A-4EE6-B8F7-F75B41E52CB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0C606039-BE0A-4EE6-B8F7-F75B41E52CB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0C606039-BE0A-4EE6-B8F7-F75B41E52CB8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{41C30DC1-8C57-4E14-A83A-7635A3C7960B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{41C30DC1-8C57-4E14-A83A-7635A3C7960B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{41C30DC1-8C57-4E14-A83A-7635A3C7960B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{41C30DC1-8C57-4E14-A83A-7635A3C7960B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DE9EB7D8-9CC5-4073-90B3-9FBF685B3305}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DE9EB7D8-9CC5-4073-90B3-9FBF685B3305}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DE9EB7D8-9CC5-4073-90B3-9FBF685B3305}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DE9EB7D8-9CC5-4073-90B3-9FBF685B3305}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{412C64D1-43D6-4E4C-8AD8-E20E63B415BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{412C64D1-43D6-4E4C-8AD8-E20E63B415BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{412C64D1-43D6-4E4C-8AD8-E20E63B415BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{412C64D1-43D6-4E4C-8AD8-E20E63B415BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0246BFC4-8AAF-45E1-A127-DB43D6E345BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0246BFC4-8AAF-45E1-A127-DB43D6E345BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0246BFC4-8AAF-45E1-A127-DB43D6E345BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0246BFC4-8AAF-45E1-A127-DB43D6E345BB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{07336602-860B-4975-95DD-405D19C00901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07336602-860B-4975-95DD-405D19C00901}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07336602-860B-4975-95DD-405D19C00901}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -482,10 +491,6 @@ Global
|
|||
{41B784AA-3301-4126-AF9F-1D59BD04B0BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{41B784AA-3301-4126-AF9F-1D59BD04B0BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{41B784AA-3301-4126-AF9F-1D59BD04B0BF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D4519DF6-CC72-4AC4-A851-E21383098D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D4519DF6-CC72-4AC4-A851-E21383098D11}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D4519DF6-CC72-4AC4-A851-E21383098D11}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D4519DF6-CC72-4AC4-A851-E21383098D11}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6C7A1595-36D6-4229-BBB5-5A6B5791791D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6C7A1595-36D6-4229-BBB5-5A6B5791791D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6C7A1595-36D6-4229-BBB5-5A6B5791791D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -530,6 +535,10 @@ Global
|
|||
{5FDAF679-DE5A-4C73-A49B-8ABCF2399229}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5FDAF679-DE5A-4C73-A49B-8ABCF2399229}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5FDAF679-DE5A-4C73-A49B-8ABCF2399229}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9AAB00EC-ED6F-4462-82DE-7D864A9DB6C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9AAB00EC-ED6F-4462-82DE-7D864A9DB6C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9AAB00EC-ED6F-4462-82DE-7D864A9DB6C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9AAB00EC-ED6F-4462-82DE-7D864A9DB6C5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A2DF46DE-50D7-4887-8C9D-4BD79CA19FAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A2DF46DE-50D7-4887-8C9D-4BD79CA19FAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A2DF46DE-50D7-4887-8C9D-4BD79CA19FAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -578,6 +587,26 @@ Global
|
|||
{777C04B8-1BD5-43D7-B3CD-D2189DFABCF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{777C04B8-1BD5-43D7-B3CD-D2189DFABCF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{777C04B8-1BD5-43D7-B3CD-D2189DFABCF3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{99B4D965-8782-4694-8DFA-B7A3630CEF60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{99B4D965-8782-4694-8DFA-B7A3630CEF60}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{99B4D965-8782-4694-8DFA-B7A3630CEF60}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{99B4D965-8782-4694-8DFA-B7A3630CEF60}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B4856711-6D4C-4246-A686-49458D4C1301}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B4856711-6D4C-4246-A686-49458D4C1301}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B4856711-6D4C-4246-A686-49458D4C1301}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B4856711-6D4C-4246-A686-49458D4C1301}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7BE494FC-4B0D-4340-A62A-9C9F3E7389FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7BE494FC-4B0D-4340-A62A-9C9F3E7389FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7BE494FC-4B0D-4340-A62A-9C9F3E7389FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7BE494FC-4B0D-4340-A62A-9C9F3E7389FE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{19545B37-8518-4BDD-AD49-00C031FB3C2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{19545B37-8518-4BDD-AD49-00C031FB3C2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{19545B37-8518-4BDD-AD49-00C031FB3C2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{19545B37-8518-4BDD-AD49-00C031FB3C2A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{79C12C80-B27B-41FB-AE79-A3BB74CFA782}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{79C12C80-B27B-41FB-AE79-A3BB74CFA782}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{79C12C80-B27B-41FB-AE79-A3BB74CFA782}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{79C12C80-B27B-41FB-AE79-A3BB74CFA782}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -613,6 +642,7 @@ Global
|
|||
{6C7A1595-36D6-4229-BBB5-5A6B5791791D} = {3862190B-E2C5-418E-AFDC-DB281FB5C705}
|
||||
{9A07D215-90AC-4BAF-BCDB-73D74FD3A5C5} = {3862190B-E2C5-418E-AFDC-DB281FB5C705}
|
||||
{5FDAF679-DE5A-4C73-A49B-8ABCF2399229} = {77C7929A-2EED-4AA6-8705-B5C443C8AA0F}
|
||||
{9AAB00EC-ED6F-4462-82DE-7D864A9DB6C5} = {3862190B-E2C5-418E-AFDC-DB281FB5C705}
|
||||
{A2DF46DE-50D7-4887-8C9D-4BD79CA19FAA} = {3862190B-E2C5-418E-AFDC-DB281FB5C705}
|
||||
{DEDE8442-03CA-48CF-99B9-EA224D89D148} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
|
||||
{EF4F6280-14D1-49D4-8095-1AC36E169AA8} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
|
||||
|
@ -620,10 +650,22 @@ Global
|
|||
{800DB925-6014-4136-AC01-3356CF7CADD3} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
|
||||
{9C99621C-343E-479C-A943-332DB6129B71} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
|
||||
{62AF4BD3-DCAE-4D44-AA5B-991C1071166B} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
|
||||
{28F3EC79-660C-4659-8B73-F90DC1173316} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
|
||||
{6D4B4FB2-0A8A-4044-948B-C063FD340439} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
|
||||
{494902DD-C63F-48E0-BED3-B58EFB4051C8} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
|
||||
{A0CB9A10-F22D-4E66-A449-74B3D0361A9C} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
|
||||
{1C459B5B-C702-46FF-BF1A-EE795E420FFA} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
|
||||
{99B4D965-8782-4694-8DFA-B7A3630CEF60} = {3862190B-E2C5-418E-AFDC-DB281FB5C705}
|
||||
{B4856711-6D4C-4246-A686-49458D4C1301} = {5B7FB835-3FFF-4BC2-99C5-A5B5FAE3C818}
|
||||
{52AF6D7D-9E66-4234-9A2C-5D16C6F22B40} = {7C87CAF9-79D7-4C26-9FFB-F3F1FB6911F1}
|
||||
{17A22B0E-6EC3-4A39-B955-0A486AD06699} = {52AF6D7D-9E66-4234-9A2C-5D16C6F22B40}
|
||||
{A115CE4C-71A8-4B95-96A5-C1DF46FD94C2} = {7C87CAF9-79D7-4C26-9FFB-F3F1FB6911F1}
|
||||
{7BE494FC-4B0D-4340-A62A-9C9F3E7389FE} = {A115CE4C-71A8-4B95-96A5-C1DF46FD94C2}
|
||||
{19545B37-8518-4BDD-AD49-00C031FB3C2A} = {3862190B-E2C5-418E-AFDC-DB281FB5C705}
|
||||
{87A20A76-D524-4AAC-AF92-8725BFED0415} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
|
||||
{993E65E5-E71B-40FD-871C-60A9EBD59724} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
|
||||
{44982E0D-C8C6-42DC-9F8F-714981F27CE6} = {7CB2F02E-03FA-4FFF-89A5-C51F107623FD}
|
||||
{79C12C80-B27B-41FB-AE79-A3BB74CFA782} = {3277B1C0-BDFE-4460-9B0D-D9A661FB48DB}
|
||||
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {A49299FB-C5CD-4E0E-B7E1-B7867BBD67CC}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {55639B5C-0770-4A22-AB56-859604650521}
|
||||
|
|
282
README.md
282
README.md
|
@ -6,9 +6,32 @@
|
|||
[](https://www.nuget.org/profiles/OpenTelemetry)
|
||||
[](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/ci.yml)
|
||||
|
||||
The .NET [OpenTelemetry](https://opentelemetry.io/) client.
|
||||
[](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-dotnet)
|
||||
[](https://www.bestpractices.dev/projects/10017)
|
||||
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet?ref=badge_shield&issueType=license)
|
||||
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet?ref=badge_shield&issueType=security)
|
||||
|
||||
## Supported .NET Versions
|
||||
The .NET [OpenTelemetry](https://opentelemetry.io/) implementation.
|
||||
|
||||
<details>
|
||||
<summary>Table of Contents</summary>
|
||||
|
||||
* [Supported .NET versions](#supported-net-versions)
|
||||
* [Project status](#project-status)
|
||||
* [Getting started](#getting-started)
|
||||
* [Getting started with Logging](#getting-started-with-logging)
|
||||
* [Getting started with Metrics](#getting-started-with-metrics)
|
||||
* [Getting started with Tracing](#getting-started-with-tracing)
|
||||
* [Repository structure](#repository-structure)
|
||||
* [Troubleshooting](#troubleshooting)
|
||||
* [Extensibility](#extensibility)
|
||||
* [Releases](#releases)
|
||||
* [Contributing](#contributing)
|
||||
* [References](#references)
|
||||
|
||||
</details>
|
||||
|
||||
## Supported .NET versions
|
||||
|
||||
Packages shipped from this repository generally support all the officially
|
||||
supported versions of [.NET](https://dotnet.microsoft.com/download/dotnet) and
|
||||
|
@ -17,52 +40,88 @@ older Windows-based .NET implementation), except `.NET Framework 3.5`.
|
|||
Any exceptions to this are noted in the individual `README.md`
|
||||
files.
|
||||
|
||||
## Project Status
|
||||
## Project status
|
||||
|
||||
| Signal | Status |
|
||||
| ------- | ---------- |
|
||||
| Logs | Stable* |
|
||||
| Metrics | Stable |
|
||||
| Traces | Stable |
|
||||
**Stable** across all 3 signals (`Logs`, `Metrics`, and `Traces`).
|
||||
|
||||
*While the `OpenTelemetryLoggerProvider` (i.e integration with `ILogger`) is
|
||||
stable, the [OTLP Exporter for
|
||||
Logs](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol#enable-log-exporter)
|
||||
is still non-stable.
|
||||
> [!CAUTION]
|
||||
> Certain components, marked as
|
||||
[pre-release](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#pre-releases),
|
||||
are still work in progress and can undergo breaking changes before stable
|
||||
release. Check the individual `README.md` file for each component to understand its
|
||||
current state.
|
||||
|
||||
See [Spec Compliance
|
||||
Matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md)
|
||||
to understand which portions of the specification has been implemented in this
|
||||
repo.
|
||||
To understand which portions of the [OpenTelemetry
|
||||
Specification](https://github.com/open-telemetry/opentelemetry-specification)
|
||||
have been implemented in OpenTelemetry .NET see: [Spec Compliance
|
||||
Matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md).
|
||||
|
||||
## Getting Started
|
||||
## Getting started
|
||||
|
||||
If you are new here, please read the getting started docs:
|
||||
|
||||
* Logs: [Console](./docs/logs/getting-started-console/README.md)
|
||||
* Metrics: [ASP.NET Core](./docs/metrics/getting-started-aspnetcore/README.md) |
|
||||
[Console](./docs/metrics/getting-started-console/README.md)
|
||||
* Traces: [ASP.NET Core](./docs/trace/getting-started-aspnetcore/README.md) |
|
||||
[Console](./docs/trace/getting-started-console/README.md)
|
||||
### Getting started with Logging
|
||||
|
||||
This repository includes multiple installable components, available on
|
||||
[NuGet](https://www.nuget.org/profiles/OpenTelemetry). Each component has its
|
||||
individual `README.md` file, which covers the instruction on how to install and
|
||||
how to get started. To find all the available components, please take a look at
|
||||
the `src` folder.
|
||||
If you are new to
|
||||
[logging](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/README.md),
|
||||
it is recommended to first follow the [getting started in 5 minutes - ASP.NET
|
||||
Core Application](./docs/logs/getting-started-aspnetcore/README.md) guide or
|
||||
the [getting started in 5 minutes - Console
|
||||
Application](./docs/logs/getting-started-console/README.md) guide to get up
|
||||
and running.
|
||||
|
||||
For general information and best practices see: [OpenTelemetry .NET
|
||||
Logs](./docs/logs/README.md). For a more detailed explanation of SDK logging
|
||||
features see: [Customizing OpenTelemetry .NET SDK for
|
||||
Logs](./docs/logs/customizing-the-sdk/README.md).
|
||||
|
||||
### Getting started with Metrics
|
||||
|
||||
If you are new to
|
||||
[metrics](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/README.md),
|
||||
it is recommended to first follow the [getting started in 5 minutes - ASP.NET
|
||||
Core Application](./docs/metrics/getting-started-aspnetcore/README.md) guide
|
||||
or the [getting started in 5 minutes - Console
|
||||
Application](./docs/metrics/getting-started-console/README.md) guide to get
|
||||
up and running.
|
||||
|
||||
For general information and best practices see: [OpenTelemetry .NET
|
||||
Metrics](./docs/metrics/README.md). For a more detailed explanation of SDK
|
||||
metric features see: [Customizing OpenTelemetry .NET SDK for
|
||||
Metrics](./docs/metrics/customizing-the-sdk/README.md).
|
||||
|
||||
### Getting started with Tracing
|
||||
|
||||
If you are new to
|
||||
[traces](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/README.md),
|
||||
it is recommended to first follow the [getting started in 5 minutes - ASP.NET
|
||||
Core Application](./docs/trace/getting-started-aspnetcore/README.md) guide
|
||||
or the [getting started in 5 minutes - Console
|
||||
Application](./docs/trace/getting-started-console/README.md) guide to get up
|
||||
and running.
|
||||
|
||||
For general information and best practices see: [OpenTelemetry .NET
|
||||
Traces](./docs/trace/README.md). For a more detailed explanation of SDK tracing
|
||||
features see: [Customizing OpenTelemetry .NET SDK for
|
||||
Tracing](./docs/trace/customizing-the-sdk/README.md).
|
||||
|
||||
## Repository structure
|
||||
|
||||
This repository includes only what is defined in the [OpenTelemetry
|
||||
Specification](https://github.com/open-telemetry/opentelemetry-specification)
|
||||
and is shipped as separate packages through
|
||||
[NuGet](https://www.nuget.org/profiles/OpenTelemetry). Each component has an
|
||||
individual `README.md` and `CHANGELOG.md` file which covers the instructions on
|
||||
how to install and get started, and details about the individual changes made
|
||||
(respectively). To find all the available components, please take a look at the
|
||||
`src` folder.
|
||||
|
||||
Here are the most commonly used components:
|
||||
|
||||
* [OpenTelemetry .NET API](./src/OpenTelemetry.Api/README.md)
|
||||
* [OpenTelemetry .NET SDK](./src/OpenTelemetry/README.md)
|
||||
|
||||
Here are the [instrumentation
|
||||
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#instrumentation-library):
|
||||
|
||||
* [ASP.NET Core](./src/OpenTelemetry.Instrumentation.AspNetCore/README.md)
|
||||
* [Grpc.Net.Client](./src/OpenTelemetry.Instrumentation.GrpcNetClient/README.md)
|
||||
* [HTTP clients](./src/OpenTelemetry.Instrumentation.Http/README.md)
|
||||
* [SQL client](./src/OpenTelemetry.Instrumentation.SqlClient/README.md)
|
||||
* [OpenTelemetry API](./src/OpenTelemetry.Api/README.md)
|
||||
* [OpenTelemetry SDK](./src/OpenTelemetry/README.md)
|
||||
* [OpenTelemetry Hosting
|
||||
Extensions](./src/OpenTelemetry.Extensions.Hosting/README.md)
|
||||
|
||||
Here are the [exporter
|
||||
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#exporter-library):
|
||||
|
@ -75,15 +134,19 @@ libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/ma
|
|||
* [Prometheus HttpListener](./src/OpenTelemetry.Exporter.Prometheus.HttpListener/README.md)
|
||||
* [Zipkin](./src/OpenTelemetry.Exporter.Zipkin/README.md)
|
||||
|
||||
See the [OpenTelemetry registry](https://opentelemetry.io/registry/?s=net) and
|
||||
[OpenTelemetry .NET Contrib
|
||||
repo](https://github.com/open-telemetry/opentelemetry-dotnet-contrib) for more
|
||||
components.
|
||||
Additional packages including [instrumentation
|
||||
libraries](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#instrumentation-library),
|
||||
exporters, resource detectors, and extensions can be found in the
|
||||
[opentelemetry-dotnet-contrib
|
||||
repository](https://github.com/open-telemetry/opentelemetry-dotnet-contrib)
|
||||
and/or the [OpenTelemetry
|
||||
registry](https://opentelemetry.io/ecosystem/registry/?language=dotnet).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
See [Troubleshooting](./src/OpenTelemetry/README.md#troubleshooting).
|
||||
Additionally check readme file for the individual components for any additional
|
||||
For general instructions see:
|
||||
[Troubleshooting](./src/OpenTelemetry/README.md#troubleshooting). Additionally
|
||||
`README.md` files for individual components may contain more detailed
|
||||
troubleshooting information.
|
||||
|
||||
## Extensibility
|
||||
|
@ -95,7 +158,7 @@ extension scenarios:
|
|||
library](./docs/trace/extending-the-sdk/README.md#instrumentation-library).
|
||||
* Building a custom exporter for
|
||||
[logs](./docs/logs/extending-the-sdk/README.md#exporter),
|
||||
[metrics](./docs/metrics/extending-the-sdk/README.md#exporter) and
|
||||
[metrics](./docs/metrics/extending-the-sdk/README.md#exporter), and
|
||||
[traces](./docs/trace/extending-the-sdk/README.md#exporter).
|
||||
* Building a custom processor for
|
||||
[logs](./docs/logs/extending-the-sdk/README.md#processor) and
|
||||
|
@ -103,14 +166,64 @@ extension scenarios:
|
|||
* Building a custom sampler for
|
||||
[traces](./docs/trace/extending-the-sdk/README.md#sampler).
|
||||
|
||||
## Releases
|
||||
|
||||
For details about upcoming planned releases see:
|
||||
[Milestones](https://github.com/open-telemetry/opentelemetry-dotnet/milestones).
|
||||
The dates and features described in issues and milestones are estimates and
|
||||
subject to change.
|
||||
|
||||
For highlights and annoucements for stable releases see: [Release
|
||||
Notes](./RELEASENOTES.md).
|
||||
|
||||
To access packages, source code, and/or view a list of changes for all
|
||||
components in a release see:
|
||||
[Releases](https://github.com/open-telemetry/opentelemetry-dotnet/releases).
|
||||
|
||||
Nightly builds from this repo are published to [MyGet](https://www.myget.org),
|
||||
and can be installed using the
|
||||
`https://www.myget.org/F/opentelemetry/api/v3/index.json` source.
|
||||
|
||||
### Digital signing
|
||||
|
||||
Starting with the `1.10.0` release the DLLs included in the packages pushed to
|
||||
NuGet are digitally signed using [Sigstore](https://www.sigstore.dev/). Within
|
||||
each NuGet package the digital signature and its corresponding certificate file
|
||||
are placed alongside the shipped DLL(s) in the `/lib` folder. When a project
|
||||
targets multiple frameworks each target outputs a dedicated DLL and signing
|
||||
artifacts into a sub folder based on the
|
||||
[TFM](https://learn.microsoft.com/dotnet/standard/frameworks).
|
||||
|
||||
The digitial signature and certificate files share the same name prefix as the
|
||||
DLL to ensure easy identification and association.
|
||||
|
||||
To verify the integrity of a DLL inside a NuGet package use the
|
||||
[cosign](https://github.com/sigstore/cosign) tool from Sigstore:
|
||||
|
||||
```bash
|
||||
cosign verify-blob \
|
||||
--signature OpenTelemetry.dll-keyless.sig \
|
||||
--certificate OpenTelemetry.dll-keyless.pem.cer \
|
||||
--certificate-identity "https://github.com/open-telemetry/opentelemetry-dotnet/.github/workflows/publish-packages-1.0.yml@refs/tags/core-1.10.0-rc.1" \
|
||||
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
|
||||
OpenTelemetry.dll
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> A successful verification outputs `Verify OK`.
|
||||
|
||||
For more verification options please refer to the [cosign
|
||||
documentation](https://github.com/sigstore/cosign/blob/main/doc/cosign_verify-blob.md).
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
For information about contributing to the project see:
|
||||
[CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
We meet weekly on Tuesdays, and the time of the meeting alternates between 11AM
|
||||
We meet weekly on Tuesdays, 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)
|
||||
calendar](https://github.com/open-telemetry/community?tab=readme-ov-file#calendar)
|
||||
for specific dates and for Zoom meeting links.
|
||||
|
||||
Meeting notes are available as a public [Google
|
||||
|
@ -118,52 +231,65 @@ doc](https://docs.google.com/document/d/1yjjD6aBcLxlRazYrawukDgrhZMObwHARJbB9glW
|
|||
If you have trouble accessing the doc, please get in touch on
|
||||
[Slack](https://cloud-native.slack.com/archives/C01N3BC2W7Q).
|
||||
|
||||
[Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer)
|
||||
([@open-telemetry/dotnet-maintainers](https://github.com/orgs/open-telemetry/teams/dotnet-maintainers)):
|
||||
The meeting is open for all to join. We invite everyone to join our meeting,
|
||||
regardless of your experience level. Whether you're a seasoned OpenTelemetry
|
||||
developer, just starting your journey, or simply curious about the work we do,
|
||||
you're more than welcome to participate!
|
||||
|
||||
### Maintainers
|
||||
|
||||
* [Alan West](https://github.com/alanwest), New Relic
|
||||
* [Mikel Blanchard](https://github.com/CodeBlanch), Microsoft
|
||||
* [Utkarsh Umesan Pillai](https://github.com/utpilla), Microsoft
|
||||
* [Rajkumar Rangaraj](https://github.com/rajkumar-rangaraj), Microsoft
|
||||
|
||||
[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
|
||||
([@open-telemetry/dotnet-approvers](https://github.com/orgs/open-telemetry/teams/dotnet-approvers)):
|
||||
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
|
||||
|
||||
### Approvers
|
||||
|
||||
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
|
||||
* [Reiley Yang](https://github.com/reyang), Microsoft
|
||||
* [Robert Pająk](https://github.com/pellared), Splunk
|
||||
* [Vishwesh Bankwar](https://github.com/vishweshbankwar), Microsoft
|
||||
* [Martin Costello](https://github.com/martincostello), Grafana Labs
|
||||
* [Mikel Blanchard](https://github.com/CodeBlanch), Microsoft
|
||||
* [Piotr Kiełkowicz](https://github.com/Kielek), Splunk
|
||||
|
||||
[Emeritus
|
||||
Maintainer/Approver/Triager](https://github.com/open-telemetry/community/blob/main/community-membership.md#emeritus-maintainerapprovertriager):
|
||||
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
|
||||
|
||||
### Triagers
|
||||
|
||||
* [Martin Thwaites](https://github.com/martinjt), Honeycomb
|
||||
* [Timothy "Mothra" Lee](https://github.com/TimothyMothra)
|
||||
|
||||
For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
|
||||
|
||||
### Emeritus Maintainers
|
||||
|
||||
* [Mike Goldsmith](https://github.com/MikeGoldsmith)
|
||||
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev)
|
||||
* [Utkarsh Umesan Pillai](https://github.com/utpilla)
|
||||
|
||||
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
|
||||
|
||||
* [Bruno Garcia](https://github.com/bruno-garcia)
|
||||
* [Eddy Nakamura](https://github.com/eddynaka)
|
||||
* [Liudmila Molkova](https://github.com/lmolkova)
|
||||
* [Mike Goldsmith](https://github.com/MikeGoldsmith)
|
||||
* [Paulo Janotti](https://github.com/pjanotti)
|
||||
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev)
|
||||
* [Reiley Yang](https://github.com/reyang)
|
||||
* [Robert Pająk](https://github.com/pellared)
|
||||
* [Vishwesh Bankwar](https://github.com/vishweshbankwar)
|
||||
|
||||
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 Triagers
|
||||
|
||||
* [Victor Lu](https://github.com/victlu)
|
||||
|
||||
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 the people who have contributed
|
||||
|
||||
[](https://github.com/open-telemetry/opentelemetry-dotnet/graphs/contributors)
|
||||
|
||||
## Release Schedule
|
||||
## References
|
||||
|
||||
Only the [core components](./VERSIONING.md#core-components) of the repo have
|
||||
released a stable version. Components which are marked
|
||||
[pre-release](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#pre-releases),
|
||||
are still work in progress and can undergo many breaking changes before stable
|
||||
release.
|
||||
|
||||
See the [release
|
||||
notes](https://github.com/open-telemetry/opentelemetry-dotnet/releases) for
|
||||
existing releases.
|
||||
|
||||
See the [project
|
||||
milestones](https://github.com/open-telemetry/opentelemetry-dotnet/milestones)
|
||||
for details on upcoming releases. The dates and features described in issues and
|
||||
milestones are estimates, and subject to change.
|
||||
|
||||
Daily builds from this repo are published to MyGet, and can be installed from
|
||||
[this source](https://www.myget.org/F/opentelemetry/api/v3/index.json).
|
||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||
* [OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification)
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
# Release Notes
|
||||
|
||||
This file contains highlights and announcements covering all components.
|
||||
For more details see `CHANGELOG.md` files maintained in the root source
|
||||
directory of each individual package.
|
||||
|
||||
## 1.12.0
|
||||
|
||||
Release details: [1.12.0](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.12.0)
|
||||
|
||||
* **Breaking Change**: `OpenTelemetry.Exporter.OpenTelemetryProtocol` now
|
||||
defaults to using OTLP/HTTP instead of OTLP/gRPC when targeting .NET Framework
|
||||
and .NET Standard. This change may cause telemetry export to fail unless
|
||||
appropriate adjustments are made. Explicitly setting OTLP/gRPC may result in a
|
||||
`NotSupportedException` unless further configuration is applied. See
|
||||
[#6209](https://github.com/open-telemetry/opentelemetry-dotnet/issues/6209) for
|
||||
full details and mitigation guidance. [#6229](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6229)
|
||||
|
||||
## 1.11.1
|
||||
|
||||
Release details: [1.11.1](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.11.1)
|
||||
|
||||
* Fixed a bug preventing `OpenTelemetry.Exporter.OpenTelemetryProtocol` from
|
||||
exporting telemetry on .NET Framework.
|
||||
|
||||
## 1.11.0
|
||||
|
||||
Release details: [1.11.0](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.11.0)
|
||||
|
||||
* `OpenTelemetry.Exporter.OpenTelemetryProtocol` no longer depends on the
|
||||
`Google.Protobuf`, `Grpc`, or `Grpc.Net.Client` packages. Serialization and
|
||||
transmission of outgoing data is now performed manually to improve the overall
|
||||
performance.
|
||||
|
||||
## 1.10.0
|
||||
|
||||
Release details: [1.10.0](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.10.0)
|
||||
|
||||
* Bumped the package versions of `System.Diagnostic.DiagnosticSource` and other
|
||||
Microsoft.Extensions.* packages to `9.0.0`.
|
||||
|
||||
* Added support for new APIs introduced in `System.Diagnostics.DiagnosticSource`
|
||||
`9.0.0`:
|
||||
|
||||
* [InstrumentAdvice<T>](https://learn.microsoft.com/dotnet/api/system.diagnostics.metrics.instrumentadvice-1)
|
||||
|
||||
For details see: [Explicit bucket histogram
|
||||
aggregation](./docs/metrics/customizing-the-sdk/README.md#explicit-bucket-histogram-aggregation).
|
||||
|
||||
* [Gauge<T>](https://learn.microsoft.com/dotnet/api/system.diagnostics.metrics.gauge-1)
|
||||
|
||||
* [ActivitySource.Tags](https://learn.microsoft.com/dotnet/api/system.diagnostics.activitysource.tags)
|
||||
(supported in OtlpExporter & ConsoleExporter)
|
||||
|
||||
* Experimental features promoted to stable:
|
||||
|
||||
* `CardinalityLimit` can now be managed for individual metrics via the View
|
||||
API. For details see: [Changing cardinality limit for a
|
||||
Metric](./docs/metrics/customizing-the-sdk/README.md#changing-the-cardinality-limit-for-a-metric).
|
||||
|
||||
* The [overflow
|
||||
attribute](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#overflow-attribute)
|
||||
(`otel.metric.overflow`) behavior is now enabled by default. The
|
||||
`OTEL_DOTNET_EXPERIMENTAL_METRICS_EMIT_OVERFLOW_ATTRIBUTE` environment
|
||||
variable is no longer required. For details see: [Cardinality
|
||||
Limits](./docs/metrics/README.md#cardinality-limits).
|
||||
|
||||
* The MetricPoint reclaim behavior is now enabled by default when Delta
|
||||
aggregation temporality is used. The
|
||||
`OTEL_DOTNET_EXPERIMENTAL_METRICS_RECLAIM_UNUSED_METRIC_POINTS` environment
|
||||
variable is no longer required. For details see: [Cardinality
|
||||
Limits](./docs/metrics/README.md#cardinality-limits).
|
||||
|
||||
* Added `OpenTelemetrySdk.Create` API for configuring OpenTelemetry .NET signals
|
||||
(logging, tracing, and metrics) via a single builder. This new API simplifies
|
||||
bootstrap and teardown, and supports cross-cutting extensions targeting
|
||||
`IOpenTelemetryBuilder`.
|
||||
|
||||
* Removed out of support `net6.0` target and added `net9.0` target.
|
||||
|
||||
## 1.9.0
|
||||
|
||||
Release details: [1.9.0](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.9.0)
|
||||
|
||||
* `Exemplars` are now part of the stable API! For details see: [customizing
|
||||
exemplars
|
||||
collection](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/metrics/customizing-the-sdk#exemplars).
|
||||
|
||||
* `WithLogging` is now part of the stable API! Logging, Metrics, and Tracing can
|
||||
now all be configured using the `With` style and the builders finally have
|
||||
parity in their APIs.
|
||||
|
||||
## 1.8.0
|
||||
|
||||
Release details: [1.8.0](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.8.0)
|
||||
|
||||
* `TracerProvider` sampler can now be configured via the `OTEL_TRACES_SAMPLER` &
|
||||
`OTEL_TRACES_SAMPLER_ARG` envvars.
|
||||
|
||||
* A new `UseOtlpExporter` cross-cutting extension has been added to register the
|
||||
`OtlpExporter` and enable all signals in a single call.
|
||||
|
||||
* `exception.type`, `exception.message`, `exception.stacktrace` will now
|
||||
automatically be included by the `OtlpLogExporter` when logging exceptions.
|
||||
Previously an experimental environment variable had to be set.
|
||||
|
||||
## 1.7.0
|
||||
|
||||
Release details: [1.7.0](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.7.0)
|
||||
|
||||
* Bumped the package versions of System.Diagnostic.DiagnosticSource and other
|
||||
Microsoft.Extensions.* packages to `8.0.0`.
|
||||
|
||||
* Added `net8.0` targets to all the components.
|
||||
|
||||
* OTLP Exporter
|
||||
* Updated to use `ILogger` `CategoryName` as the instrumentation scope for
|
||||
logs.
|
||||
* Added named options support for OTLP Log Exporter.
|
||||
* Added support for instrumentation scope attributes in metrics.
|
||||
* Added support under an experimental flag to emit log exception attributes.
|
||||
* Added support under an experimental flag to emit log eventId and eventName.
|
||||
attributes.
|
||||
|
||||
* Added support for the
|
||||
[IMetricsBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.diagnostics.metrics.imetricsbuilder)
|
||||
API.
|
||||
|
||||
* Added an experimental opt-in metrics feature to reclaim unused MetricPoints
|
||||
which enables a higher number of unique dimension combinations to be emitted.
|
||||
See [reclaim unused metric
|
||||
points](https://github.com/open-telemetry/opentelemetry-dotnet/blob/32c64d04defb5c92d056fd8817638151168b10da/docs/metrics/README.md#cardinality-limits)
|
||||
for more details.
|
|
@ -0,0 +1,48 @@
|
|||
OpenTelemetry .NET uses third-party libraries or other resources that may be
|
||||
distributed under licenses different than the OpenTelemetry .NET software.
|
||||
|
||||
The attached notices are provided for information only.
|
||||
|
||||
License notice for .NET
|
||||
-------------------------------
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) .NET Foundation and Contributors
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
License notice for gRPC for .NET (https://github.com/grpc/grpc-dotnet)
|
||||
----------------------------------------------------------------------------------------------
|
||||
|
||||
Copyright 2019 The gRPC 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.
|
|
@ -56,9 +56,9 @@ without corresponding changes here will result in build breaks - this helps
|
|||
catch any unintended changes to public API from being shipped accidentally. This
|
||||
also helps reviewers quickly understand if a given PR is proposing public API
|
||||
changes. For example,
|
||||
[this](https://github.com/open-telemetry/opentelemetry-dotnet/tree/master/src/OpenTelemetry.Instrumentation.AspNetCore/.publicApi)
|
||||
[this](https://github.com/open-telemetry/opentelemetry-dotnet/tree/master/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/.publicApi)
|
||||
shows the public APIs, per target framework for the
|
||||
`OpenTelemetry.Instrumentation.AspNetCore` package.
|
||||
`OpenTelemetry.Exporter.OpenTelemetryProtocol` package.
|
||||
|
||||
APIs which are released as part of stable packages will be listed in the
|
||||
"Shipped.txt" file, and those APIs which are released as part of
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<Import Project=".\Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<NoWarn>$(NoWarn),1574,1591</NoWarn>
|
||||
<NoWarn>$(NoWarn),CS1574,CS1591</NoWarn>
|
||||
<IsPackable>false</IsPackable>
|
||||
<CodeAnalysisRuleSet>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\OpenTelemetry.test.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DefaultTargetFrameworkForExampleApps>net7.0</DefaultTargetFrameworkForExampleApps>
|
||||
<DefaultTargetFrameworkForExampleApps>net9.0</DefaultTargetFrameworkForExampleApps>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Tests'))">
|
||||
|
@ -19,8 +19,18 @@
|
|||
<Content Include="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\xunit.runner.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<!--Temp workaround to allow using daily dotnet 6 builds-->
|
||||
<!--<PackageReference Include="System.Runtime.CompilerServices.Unsafe" PrivateAssets="All" NoWarn="NU1605" Version="6.0.0-preview.4.21253.7" />-->
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
|
||||
<PackageReference Include="GitHubActionsTestLogger" />
|
||||
<PackageReference Include="JunitXml.TestLogger" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||
<PackageReference Include="xunit" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
|
||||
<Compile Include="$(RepoRoot)\test\Shared\StrongNameTests.cs" Link="StrongNameTests.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -32,4 +42,38 @@
|
|||
<ItemGroup>
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="SkipVSTestForInvalidTargetFramework" BeforeTargets="VSTest" Condition="'$(IsTestProject)' == 'true'">
|
||||
<!-- Note: When running dotnet test from CLI with the framework parameter
|
||||
errors will be generated for projects which do not implement the requested
|
||||
target. In order to enable running tests for a given framework across a
|
||||
solution/project with mixed targets (eg: dotnet test OpenTelemetry.sln -f
|
||||
net462) we convert this into a skip message only. -->
|
||||
<PropertyGroup Condition="$(TargetFrameworks.Contains($(TargetFramework))) != 'true'">
|
||||
<_SkipTests>true</_SkipTests>
|
||||
<IsTestProject>false</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Importance="high" Text="Skipping test execution for '$(TargetPath)' because it does not contain the '$(TargetFramework)' target." Condition="'$(_SkipTests)' == 'true'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ResolveExposedExperimentalFeatures" BeforeTargets="CoreCompile">
|
||||
<!-- Note: What this does is look for $(ProjectReferenceName).BuildFlags.txt
|
||||
files for all the dependencies of the project being compiled. If
|
||||
ExposeExperimentalFeatures=true is found in those files we set compiler
|
||||
constants for each project where experimental features were exposed.
|
||||
Example:
|
||||
OPENTELEMETRY_EXPORTER_INMEMORY_EXPERIMENTAL_FEATURES_EXPOSED;OPENTELEMETRY_EXPERIMENTAL_FEATURES_EXPOSED;OPENTELEMETRY_API_EXPERIMENTAL_FEATURES_EXPOSED;OPENTELEMETRY_API_PROVIDERBUILDEREXTENSIONS_EXPERIMENTAL_FEATURES_EXPOSED
|
||||
-->
|
||||
<ItemGroup>
|
||||
<DependenciesWithExposedExperimentalFeatures
|
||||
Include="@(_ResolvedProjectReferencePaths->'%(Filename)')"
|
||||
Condition="$([System.IO.File]::Exists('%(RootDir)%(Directory)%(Filename).BuildFlags.txt')) AND $([System.IO.File]::ReadAllText('%(RootDir)%(Directory)%(Filename).BuildFlags.txt').Contains('ExposeExperimentalFeatures=true'))" />
|
||||
<CompilerConstantsForDependenciesWithExposedExperimentalFeatures Include="@(DependenciesWithExposedExperimentalFeatures->'$([System.String]::Copy('%(DependenciesWithExposedExperimentalFeatures.Identity)').ToUpper().Replace('.', '_'))_EXPERIMENTAL_FEATURES_EXPOSED')" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'@(CompilerConstantsForDependenciesWithExposedExperimentalFeatures)' != ''">
|
||||
<DefineConstants>$(DefineConstants);@(CompilerConstantsForDependenciesWithExposedExperimentalFeatures)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -1,53 +1,70 @@
|
|||
<Project>
|
||||
<Import Project=".\Common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)/OpenTelemetry.prod.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="BuildFlags">
|
||||
<ExposeExperimentalFeatures Condition="'$(ExposeExperimentalFeatures)' == ''">true</ExposeExperimentalFeatures>
|
||||
<EnablePackageValidation Condition="'$(EnablePackageValidation)' == ''">false</EnablePackageValidation>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="PackageProperties">
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://github.com/open-telemetry/opentelemetry-dotnet</RepositoryUrl>
|
||||
<PackageTags>Observability;OpenTelemetry;Monitoring;Telemetry;Tracing;Metrics;Logging</PackageTags>
|
||||
<PackageIcon>opentelemetry-icon-color.png</PackageIcon>
|
||||
<PackageProjectUrl>https://opentelemetry.io</PackageProjectUrl>
|
||||
<Authors>OpenTelemetry Authors</Authors>
|
||||
<Copyright>Copyright The OpenTelemetry Authors</Copyright>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<PackagePrimaryLicenseFile>$(RepoRoot)\LICENSE.TXT</PackagePrimaryLicenseFile>
|
||||
<PackageThirdPartyNoticesFile>$(RepoRoot)\THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageChangelogFile>CHANGELOG.md</PackageChangelogFile>
|
||||
<PackageReleaseNotesFile>$(RepoRoot)\RELEASENOTES.md</PackageReleaseNotesFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="SourceLinkProperties">
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<ContinuousIntegrationBuild Condition="'$(Deterministic)'=='true'">true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MinVer" PrivateAssets="All" Condition="'$(IntegrationBuild)' != 'true'" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<RunApiCompat>true</RunApiCompat>
|
||||
<ExposeExperimentalFeatures Condition="'$(ExposeExperimentalFeatures)' == ''">true</ExposeExperimentalFeatures>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(MinVerTagPrefix)' == 'core-' AND '$(CheckAPICompatibility)' == 'true' AND '$(RunApiCompat)' == 'true'">
|
||||
<PackageReference Include="Microsoft.DotNet.ApiCompat" PrivateAssets="All" />
|
||||
<ResolvedMatchingContract Include="$(RepoRoot)\build\LastMajorVersionBinaries\$(AssemblyName)\$(OTelLatestStableVer)\lib\$(TargetFramework)\$(AssemblyName).dll" />
|
||||
<ItemGroup>
|
||||
<None Include="$(MSBuildThisFileDirectory)opentelemetry-icon-color.png" Pack="true" PackagePath="\" />
|
||||
<SourceRoot Condition="'$(Deterministic)'=='true'" Include="$(MSBuildThisFileDirectory)/" />
|
||||
<None Include="$(IntermediateOutputPath)$(ProjectName).BuildFlags.txt"
|
||||
Link="$(ProjectName).BuildFlags.txt"
|
||||
CopyToOutputDirectory="PreserveNewest"
|
||||
Visible="false" />
|
||||
<!-- Note: This includes all the PublicApiAnalyzers files in projects to make editing easier in the IDE -->
|
||||
<None Include=".publicApi\**\PublicAPI.*.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="DispatchToInnerBuilds;ValidateApiCompatForSrc" Condition="'$(MinVerTagPrefix)' == 'core-' AND '$(CheckAPICompatibility)' == 'true' AND '$(RunApiCompat)' == 'true'">
|
||||
<!-- Note: DispatchToInnerBuilds is called for projects with multiple
|
||||
targets defined to spawn a build process for each target framework being
|
||||
compiled. Executing BEFORE that step means this runs once for a project
|
||||
instead of in parallel for each target framework defined. If we ever have a
|
||||
project with only a single target, this will NOT run and an alternative
|
||||
solution will be needed. -->
|
||||
<Message Text="ApiCompat: Running the powershell script to download the package for $(MSBuildProjectName)." Importance="High"/>
|
||||
<Exec Command="powershell -ExecutionPolicy Unrestricted -File "$(RepoRoot)\build\PreBuild.ps1" -package $(AssemblyName) -version "$(OTelLatestStableVer)" -workDir "$(RepoRoot)\build\LastMajorVersionBinaries"" />
|
||||
</Target>
|
||||
|
||||
<Target Name="FindContractDependencyPaths" BeforeTargets="ValidateApiCompatForSrc" AfterTargets="ResolveAssemblyReferences" Condition="'$(MinVerTagPrefix)' == 'core-' AND '$(CheckAPICompatibility)' == 'true' AND '$(RunApiCompat)' == 'true'">
|
||||
<Message Text="ApiCompat: Finding the contract dependency path for $(MSBuildProjectName)." Importance="High"/>
|
||||
<Target Name="IncludeSigningSignaturesInPackages" BeforeTargets="_GetTargetFrameworksOutput">
|
||||
<!-- Note: This target adds any signatures found to nuget packages -->
|
||||
<ItemGroup>
|
||||
<_ReferencePathDirectories Include="@(ReferencePath -> '%(RootDir)%(Directory)')" />
|
||||
<SignatureFiles Include="$(RepoRoot)\src\$(MSBuildProjectName)\bin\$(Configuration)\*\$(MSBuildProjectName).dll-keyless.sig" />
|
||||
<Content Include="@(SignatureFiles)" Link="%(RecursiveDir)%(Filename)%(Extension)" PackagePath="lib" />
|
||||
<CertificateFiles Include="$(RepoRoot)\src\$(MSBuildProjectName)\bin\$(Configuration)\*\$(MSBuildProjectName).dll-keyless.pem" />
|
||||
<Content Include="@(CertificateFiles)" Link="%(RecursiveDir)%(Filename)%(Extension)" PackagePath="lib" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<ContractDependencyPaths>@(_ReferencePathDirectories->Distinct())</ContractDependencyPaths>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Importance="high" Text="**IncludeSignaturesInPackagesDebug** SignatureFiles: @(SignatureFiles)" />
|
||||
<Message Importance="high" Text="**IncludeCertificatesInPackagesDebug** SignatureFiles: @(CertificateFiles)" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
|
||||
<DefaultTargetFrameworks>net6.0;netstandard2.0;net462</DefaultTargetFrameworks>
|
||||
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)/OpenTelemetry.prod.ruleset</CodeAnalysisRuleSet>
|
||||
<NoWarn>$(NoWarn),1573,1712</NoWarn>
|
||||
<PackageOutputPath Condition="$(Build_ArtifactStagingDirectory) != ''">$(Build_ArtifactStagingDirectory)</PackageOutputPath>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<ApiCompatExcludeAttributeList>$(RepoRoot)\build\GlobalAttrExclusions.txt</ApiCompatExcludeAttributeList>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="AssemblyVersionTarget" AfterTargets="MinVer" Condition="'$(MinVerVersion)'!='' AND '$(BuildNumber)' != ''">
|
||||
<Target Name="AssemblyVersionTarget" AfterTargets="MinVer" Condition="'$(MinVerVersion)' != '' AND '$(BuildNumber)' != ''">
|
||||
<!-- Note: $(BuildNumber) is typically only set for builds initiated by the
|
||||
publish workflow. The goal here is to set the assembly FileVersion and
|
||||
resolve ExposeExperimentalFeatures based on the version MinVer resolved from
|
||||
|
@ -58,6 +75,10 @@
|
|||
<ExposeExperimentalFeatures Condition="'$(MinVerPreRelease)' == ''">false</ExposeExperimentalFeatures>
|
||||
</PropertyGroup>
|
||||
|
||||
<Error
|
||||
Condition="'$(MinVerTagPrefix)' == 'coreunstable-' AND ('$(MinVerPreRelease)' == '' OR $(MinVerPreRelease.StartsWith('rc')))"
|
||||
Text="Unstable core packages cannot be released stable or as release candidates." />
|
||||
|
||||
<!-- Note: The '$(TargetFramework)' != '' check here is to reduce log spam
|
||||
in builds like dotnet pack which fire MinVer but don't resolve the actual
|
||||
TargetFramework -->
|
||||
|
@ -67,6 +88,72 @@
|
|||
Text="**AssemblyVersionDebug** TargetFramework: $(TargetFramework), MinVerVersion: $(MinVerVersion), BuildNumber: $(BuildNumber), FileVersion: $(FileVersion), ExposeExperimentalFeatures: $(ExposeExperimentalFeatures)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="EnsurePackageValidationBaselineVersion"
|
||||
BeforeTargets="RunPackageValidation"
|
||||
Condition="'$(DisablePackageBaselineValidation)' != 'true' AND '$(PackageValidationBaselineVersion)' == '' AND '$(MinVerTagPrefix)' != 'coreunstable-'">
|
||||
<Error Text="Cannot perform package validation without a baseline package version." />
|
||||
</Target>
|
||||
|
||||
<Target Name="IncludeReadmeAndReleaseNotesInPackages" BeforeTargets="_GetTargetFrameworksOutput">
|
||||
<!-- Note: This target runs during pack to convert relative links in
|
||||
markdowns into github permalinks which will work when rendered on Nuget. -->
|
||||
|
||||
<Exec
|
||||
Command="git rev-parse HEAD"
|
||||
ConsoleToMsBuild="True"
|
||||
IgnoreExitCode="True"
|
||||
StandardOutputImportance="low">
|
||||
<Output PropertyName="GitCommitConsoleOutput" TaskParameter="ConsoleOutput"/>
|
||||
<Output PropertyName="GitCommitExitCode" TaskParameter="ExitCode"/>
|
||||
</Exec>
|
||||
|
||||
<Exec
|
||||
Command="git remote get-url origin"
|
||||
ConsoleToMsBuild="True"
|
||||
IgnoreExitCode="True"
|
||||
StandardOutputImportance="low">
|
||||
<Output PropertyName="GitOriginConsoleOutput" TaskParameter="ConsoleOutput"/>
|
||||
<Output PropertyName="GitOriginExitCode" TaskParameter="ExitCode"/>
|
||||
</Exec>
|
||||
|
||||
<PropertyGroup>
|
||||
<MarkdownCommentRegex>\[([^]]+?)\]\(\.(.+?)\)</MarkdownCommentRegex>
|
||||
<GitHubRepoUrl>$(GitOriginConsoleOutput.Replace('.git',''))</GitHubRepoUrl>
|
||||
<GitHubPermalinkUrl Condition="'$(PackTag)' != ''">$(GitHubRepoUrl)/blob/$(PackTag)</GitHubPermalinkUrl>
|
||||
<GitHubPermalinkUrl Condition="'$(PackTag)' == ''">$(GitHubRepoUrl)/blob/$(GitCommitConsoleOutput)</GitHubPermalinkUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Importance="high" Text="**GitInformationDebug** GitCommitConsoleOutput: $(GitCommitConsoleOutput), GitCommitExitCode: $(GitCommitExitCode), GitOriginConsoleOutput: $(GitOriginConsoleOutput), GitOriginExitCode: $(GitOriginExitCode), GitHubPermalinkUrl: $(GitHubPermalinkUrl)" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageMarkdownFiles Include="README.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageMarkdownFiles Update="@(PackageMarkdownFiles)" Path="$([MSBuild]::ValueOrDefault('%(FullPath)','').Replace('$(RepoRoot)', '').Replace('%(FileName)%(Extension)', ''))" />
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(IntermediateOutputPath)%(PackageMarkdownFiles.Filename)%(PackageMarkdownFiles.Extension)"
|
||||
Lines="$([System.Text.RegularExpressions.Regex]::Replace($([System.IO.File]::ReadAllText(%(PackageMarkdownFiles.FullPath))), '$(MarkdownCommentRegex)', '[$1]($(GitHubPermalinkUrl)%(PackageMarkdownFiles.Path).$2)').Replace('\', '/'))"
|
||||
Overwrite="true"
|
||||
Encoding="UTF-8"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<_PackageReleaseNotesFilePath>$([System.IO.Path]::GetFullPath('$(PackageReleaseNotesFile)').Replace('$(RepoRoot)', '').Replace('\', '/'))</_PackageReleaseNotesFilePath>
|
||||
<_PackageChangelogFilePath>$([System.IO.Path]::GetFullPath('$(PackageChangelogFile)').Replace('$(RepoRoot)', '').Replace('\', '/'))</_PackageChangelogFilePath>
|
||||
<PackageReleaseNotes>
|
||||
For highlights and announcements see: $(GitHubPermalinkUrl)$(_PackageReleaseNotesFilePath).
|
||||
|
||||
For detailed changes see: $(GitHubPermalinkUrl)$(_PackageChangelogFilePath).
|
||||
</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="$(IntermediateOutputPath)*.md" PackagePath="/" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="ResolveExposeExperimentalFeatures" BeforeTargets="CoreCompile" DependsOnTargets="AssemblyVersionTarget">
|
||||
<!-- Note: This runs for all builds. The goal here is to set the
|
||||
EXPOSE_EXPERIMENTAL_FEATURES compiler constant if
|
||||
|
@ -76,10 +163,22 @@
|
|||
<DefineConstants>$(DefineConstants);EXPOSE_EXPERIMENTAL_FEATURES</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Note: We write a file into the output dir which captures the state of
|
||||
ExposeExperimentalFeatures for the current compilation. This is used by
|
||||
consuming projects (tests, benchmarks, examples, etc) to add compiler
|
||||
constants which can be used to detect experimental APIs -->
|
||||
<WriteLinesToFile
|
||||
File="$(IntermediateOutputPath)$(ProjectName).BuildFlags.txt"
|
||||
Lines="ExposeExperimentalFeatures=$(ExposeExperimentalFeatures)"
|
||||
Overwrite="true"/>
|
||||
|
||||
<!-- Note: This selects the correct PublicApiAnalyzers files based on $(ExposeExperimentalFeatures) -->
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include=".publicApi\Stable\PublicAPI.*.txt" />
|
||||
<AdditionalFiles Include=".publicApi\Stable\$(TargetFramework)\PublicAPI.*.txt" />
|
||||
<AdditionalFiles Include=".publicApi\Experimental\PublicAPI.*.txt" Condition="'$(ExposeExperimentalFeatures)' == 'true'" />
|
||||
<AdditionalFiles Include=".publicApi\Experimental\$(TargetFramework)\PublicAPI.*.txt" Condition="'$(ExposeExperimentalFeatures)' == 'true'" />
|
||||
<AdditionalFiles Include=".publicApi\PublicAPI.*.txt" />
|
||||
<AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.*.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -92,40 +191,4 @@
|
|||
Text="**ResolveExposeExperimentalFeaturesDebug** TargetFramework: $(TargetFramework), DefineConstants: $(DefineConstants)" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://github.com/open-telemetry/opentelemetry-dotnet</RepositoryUrl>
|
||||
<PackageTags>Observability;OpenTelemetry;Monitoring;Telemetry;Tracing</PackageTags>
|
||||
<PackageIcon>opentelemetry-icon-color.png</PackageIcon>
|
||||
<PackageProjectUrl>https://opentelemetry.io</PackageProjectUrl>
|
||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||
<Authors>OpenTelemetry Authors</Authors>
|
||||
<Copyright>Copyright The OpenTelemetry Authors</Copyright>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="$(MSBuildThisFileDirectory)opentelemetry-icon-color.png" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Label="SourceLink">
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Deterministic)'=='true'">
|
||||
<SourceRoot Include="$(MSBuildThisFileDirectory)/" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Deterministic)'=='true'">
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Note: This includes all the PublicApiAnalyzers files in projects to make editing easier in the IDE -->
|
||||
<ItemGroup>
|
||||
<None Include=".publicApi\**\PublicAPI.*.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -4,13 +4,48 @@
|
|||
<SignAssembly>true</SignAssembly>
|
||||
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName)</RepoRoot>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)debug.snk</AssemblyOriginatorKeyFile>
|
||||
<DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
|
||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<!--temporarily disable. See 3958-->
|
||||
<!--<AnalysisLevel>latest-All</AnalysisLevel>-->
|
||||
<NuGetAudit>true</NuGetAudit>
|
||||
<NuGetAuditMode>all</NuGetAuditMode>
|
||||
<NuGetAuditLevel>low</NuGetAuditLevel>
|
||||
<!-- Suppress warnings for repo code using experimental features -->
|
||||
<NoWarn>$(NoWarn);OTEL1000;OTEL1001;OTEL1002;OTEL1004</NoWarn>
|
||||
<AnalysisLevel>latest-All</AnalysisLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(SignAssembly)' == 'true' ">
|
||||
<StrongNamePublicKey>002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898</StrongNamePublicKey>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="BuildFlags">
|
||||
<RunningDotNetPack Condition="'$(RunningDotNetPack)' == ''">false</RunningDotNetPack>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
|
||||
<PropertyGroup>
|
||||
<NetFrameworkMinimumSupportedVersion>net462</NetFrameworkMinimumSupportedVersion>
|
||||
<NetFrameworkSupportedVersions>net481;net48;net472;net471;net47;net462</NetFrameworkSupportedVersions>
|
||||
|
||||
<!-- production TFMs -->
|
||||
<TargetFrameworksForLibraries>net9.0;net8.0;netstandard2.0;$(NetFrameworkMinimumSupportedVersion)</TargetFrameworksForLibraries>
|
||||
<TargetFrameworksForLibrariesExtended>net9.0;net8.0;netstandard2.1;netstandard2.0;$(NetFrameworkMinimumSupportedVersion)</TargetFrameworksForLibrariesExtended>
|
||||
<TargetFrameworksForPrometheusAspNetCore>net9.0;net8.0</TargetFrameworksForPrometheusAspNetCore>
|
||||
<TargetFrameworksRequiringSystemTextJsonDirectReference>net8.0;netstandard2.1;netstandard2.0;$(NetFrameworkMinimumSupportedVersion)</TargetFrameworksRequiringSystemTextJsonDirectReference>
|
||||
|
||||
<!-- non-production TFMs -->
|
||||
<TargetFrameworksForAspNetCoreTests>net9.0;net8.0</TargetFrameworksForAspNetCoreTests>
|
||||
<TargetFrameworksForAotCompatibilityTests>net9.0;net8.0</TargetFrameworksForAotCompatibilityTests>
|
||||
<TargetFrameworksForDocs>net9.0;net8.0</TargetFrameworksForDocs>
|
||||
<TargetFrameworksForDocs Condition="$(OS) == 'Windows_NT' And '$(UsingMicrosoftNETSdkWeb)' != 'True'">
|
||||
$(TargetFrameworksForDocs);$(NetFrameworkSupportedVersions)
|
||||
</TargetFrameworksForDocs>
|
||||
<TargetFrameworksForTests>net9.0;net8.0</TargetFrameworksForTests>
|
||||
<TargetFrameworksForTests Condition="$(OS) == 'Windows_NT'">
|
||||
$(TargetFrameworksForTests);$(NetFrameworkMinimumSupportedVersion)
|
||||
</TargetFrameworksForTests>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
|
@ -20,6 +55,7 @@
|
|||
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -29,26 +65,13 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" />
|
||||
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" Condition="'$(SkipAnalysis)'!='true'" />
|
||||
<PackageReference Include="Microsoft.CodeCoverage" PrivateAssets="All" Condition="'$(Configuration)'=='Release'" />
|
||||
<!--
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" PrivateAssets="All" Condition="'$(SkipAnalysis)'!='true'" />
|
||||
-->
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(IncludeDiagnosticSourceInstrumentationHelpers)'=='true'">
|
||||
<Compile Include="$(RepoRoot)\src\Shared\ActivityInstrumentationHelper.cs" Link="Includes\ActivityInstrumentationHelper.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceListener.cs" Link="Includes\DiagnosticSourceListener.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs" Link="Includes\DiagnosticSourceSubscriber.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\DiagnosticSourceInstrumentation\ListenerHandler.cs" Link="Includes\ListenerHandler.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs" Link="Includes\PropertyFetcher.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(IncludeInstrumentationHelpers)'=='true' Or '$(IncludeDiagnosticSourceInstrumentationHelpers)'=='true'">
|
||||
<ItemGroup Condition="'$(IncludeInstrumentationHelpers)'=='true'">
|
||||
<Compile Include="$(RepoRoot)\src\Shared\ActivityHelperExtensions.cs" Link="Includes\ActivityHelperExtensions.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\ExceptionExtensions.cs" Link="Includes\ExceptionExtensions.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\SemanticConventions.cs" Link="Includes\SemanticConventions.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\SpanAttributeConstants.cs" Link="Includes\SpanAttributeConstants.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\SpanHelper.cs" Link="Includes\SpanHelper.cs" />
|
||||
<Compile Include="$(RepoRoot)\src\Shared\StatusHelper.cs" Link="Includes\StatusHelper.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<Project>
|
||||
|
||||
<ItemGroup Condition="'$(ReferenceSystemTextJsonPackages)' == 'true' AND $(TargetFrameworksRequiringSystemTextJsonDirectReference.Contains('$(TargetFramework)'))">
|
||||
<!-- Note: System.Text.Encodings.Web is referenced on NET Framework & NET
|
||||
Standard targets because System.Text.Json v4.7.2 uses
|
||||
System.Text.Encodings.Web >= v4.7.1 but System.Text.Encodings.Web needs to
|
||||
be at v4.7.2 to be safe. -->
|
||||
<PackageReference Include="System.Text.Encodings.Web" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
|
||||
<PackageReference Include="System.Text.Json" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,9 +0,0 @@
|
|||
<Project>
|
||||
<ItemGroup>
|
||||
<SolutionProjects Include="..\**\OpenTelemetry.Instrumentation*.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
<MSBuild Projects="@(SolutionProjects)" Targets="Restore;Build" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,34 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName)</RepoRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SolutionProjects Include="$(RepoRoot)\**\*.csproj" />
|
||||
<PackProjects Include="$(RepoRoot)\src\**\*.csproj" />
|
||||
<TestProjects Include="$(RepoRoot)\test\**\*.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(RunningDotNetPack)' == 'true'">
|
||||
<!-- Skip building these projects when publish packages workflow runs -->
|
||||
<SolutionProjects Remove="$(RepoRoot)\docs\**\*.csproj" />
|
||||
<SolutionProjects Remove="$(RepoRoot)\examples\**\*.csproj" />
|
||||
<SolutionProjects Remove="@(TestProjects)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
<MSBuild Projects="@(SolutionProjects)" Targets="Build" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Restore">
|
||||
<MSBuild Projects="@(SolutionProjects)" Targets="Restore" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
|
||||
<Target Name="VSTest">
|
||||
<MSBuild Projects="@(TestProjects)" Targets="VSTest" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Pack">
|
||||
<MSBuild Projects="@(PackProjects)" Targets="Pack" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,46 +0,0 @@
|
|||
param(
|
||||
[string]$package,
|
||||
[string]$version,
|
||||
[string]$workDir = ".\LastMajorVersionBinaries"
|
||||
)
|
||||
|
||||
if (-Not (Test-Path $workDir))
|
||||
{
|
||||
Write-Host "Working directory for compatibility check packages '$workDir' not found, creating..."
|
||||
New-Item -Path $workDir -ItemType "directory" | Out-Null
|
||||
}
|
||||
|
||||
if (Test-Path -Path "$workDir\$package.$version.zip")
|
||||
{
|
||||
Write-Host "Previous package $package@$version already downloaded for compatibility check"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "Retrieving package $package@$version for compatibility check"
|
||||
try
|
||||
{
|
||||
$Response = Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/$package/$version -Outfile "$workDir\$package.$version.zip"
|
||||
}
|
||||
catch
|
||||
{
|
||||
$StatusCode = $_.Exception.Response.StatusCode.value__
|
||||
throw "Error downloading the package $package@$version. Status code of the received response: $StatusCode"
|
||||
}
|
||||
}
|
||||
|
||||
if (Test-Path -Path "$workDir\$package\$version\lib")
|
||||
{
|
||||
Write-Host "Previous package $package@$version already extracted to '$workDir\$package\$version\lib'"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "Extracting package $package@$version from '$workDir\$package.$version.zip' to '$workDir\$package\$version' for compatibility check"
|
||||
try
|
||||
{
|
||||
Expand-Archive -LiteralPath "$workDir\$package.$version.zip" -DestinationPath "$workDir\$package\$version" -Force
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw "Error extracting $package@$version.zip"
|
||||
}
|
||||
}
|
|
@ -1,132 +1,218 @@
|
|||
# Release process
|
||||
|
||||
Only for Maintainers.
|
||||
**Note: Approvers (collaborators) can perform much of the release process but
|
||||
Maintainers (admins) are needed to merge PRs and for the push to NuGet.**
|
||||
|
||||
1. Decide the tag name (version name) to be released. e.g. 1.4.0-beta.1,
|
||||
1.0.0-rc9.7 etc.
|
||||
|
||||
2. Run the following PowerShell from the root of the repo to get combined
|
||||
changelog (to be used later).
|
||||
|
||||
```powershell
|
||||
$changelogs = Get-ChildItem -Path . -Recurse -Filter changelog.md
|
||||
foreach ($changelog in $changelogs)
|
||||
{
|
||||
Add-Content -Path .\combinedchangelog.md -Value "**$($changelog.Directory.Name)**"
|
||||
$lines = Get-Content -Path $changelog.FullName
|
||||
$started = $false
|
||||
$ended = $false
|
||||
foreach ($line in $lines)
|
||||
{
|
||||
if($line -like "## Unreleased" -and $started -ne $true)
|
||||
{
|
||||
$started = $true
|
||||
}
|
||||
elseif($line -like "## *" -and $started -eq $true)
|
||||
{
|
||||
$ended = $true
|
||||
break
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($started -eq $true)
|
||||
{
|
||||
Add-Content -Path .\combinedchangelog.md $line
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This generates combined changelog to be used in GitHub release. Once
|
||||
contents of combined changelog is saved somewhere, delete the file.
|
||||
|
||||
3. Run the following PowerShell script from the root of the repo. This updates
|
||||
all the changelog to have release date for the current version being
|
||||
released. Replace the version with actual version. In the script below,
|
||||
replace `1.4.0-beta.1` with the tag name chosen for the package in Step 1.
|
||||
|
||||
```powershell
|
||||
$changelogs = Get-ChildItem -Path . -Recurse -Filter changelog.md
|
||||
foreach ($changelog in $changelogs)
|
||||
{
|
||||
(Get-Content -Path $changelog.FullName) -replace "Unreleased", "Unreleased
|
||||
|
||||
## 1.4.0-beta.1
|
||||
|
||||
Released $(Get-Date -UFormat '%Y-%b-%d')" | Set-Content -Path $changelog.FullName
|
||||
}
|
||||
```
|
||||
|
||||
4. Normalize PublicApi files (Stable Release Only): Run the PowerShell script
|
||||
`.\build\finalize-publicapi.ps1`. This will merge the contents of
|
||||
Unshipped.txt into the Shipped.txt.
|
||||
|
||||
5. Submit PR with the above changes, and get it merged.
|
||||
|
||||
6. Tag Git with version to be released. We use
|
||||
1. Decide the component(s) and tag name (version name) to be released. We use
|
||||
[MinVer](https://github.com/adamralph/minver) to do versioning, which
|
||||
produces version numbers based on git tags.
|
||||
|
||||
Note: If releasing only core components, only add and push the tag prefixed
|
||||
with `core-`. For example:
|
||||
Notes:
|
||||
|
||||
```sh
|
||||
git tag -a core-1.4.0-beta.1 -m "1.4.0-beta.1 of all core components"
|
||||
git push origin core-1.4.0-beta.1
|
||||
```
|
||||
* There are different categories of packages. Check the project file for
|
||||
what you want to release and look for `MinVerTagPrefix`.
|
||||
|
||||
If releasing only non-core components, only add and push the tags without
|
||||
prefix. For example:
|
||||
* `core-`: Core packages. These packages are defined\goverened by the
|
||||
OpenTelemetry Specification or are part of fundamental infrastructure
|
||||
and have released stable versions. They may be released as `alpha`,
|
||||
`beta`, `rc`, or stable.
|
||||
|
||||
```sh
|
||||
git tag -a 1.0.0-rc9.7 -m "1.0.0-rc9.7 of all non-core components"
|
||||
git push origin 1.0.0-rc9.7
|
||||
```
|
||||
* `OpenTelemetry.Api` - Defined by spec (API)
|
||||
* `OpenTelemetry.Api.ProviderBuilderExtensions` - Fundamental
|
||||
infrastructure
|
||||
* `OpenTelemetry` - Defined by spec (SDK)
|
||||
* `OpenTelemetry.Exporter.Console` - Defined by spec
|
||||
* `OpenTelemetry.Exporter.InMemory` - Defined by spec
|
||||
* `OpenTelemetry.Exporter.OpenTelemetryProtocol` - Defined by spec
|
||||
* `OpenTelemetry.Exporter.Zipkin` - Defined by spec
|
||||
* `OpenTelemetry.Extensions.Hosting` - Fundamental infrastructure
|
||||
* `OpenTelemetry.Extensions.Propagators` - Defined by spec
|
||||
|
||||
If releasing both, push both tags above.
|
||||
* `coreunstable-`: Core unstable packages. These packages are
|
||||
defined\goverened by the OpenTelemetry Specification or are part of
|
||||
fundamental infrastructure but have not released stable versions. As
|
||||
of the `1.9.0` release cycle they may only be released as `alpha` or
|
||||
`beta`.
|
||||
|
||||
7. Go to the [list of
|
||||
tags](https://github.com/open-telemetry/opentelemetry-dotnet/tags)
|
||||
and find the tag created for the core components. Click the three
|
||||
dots next to the tag and choose `Create release`.
|
||||
* Give the release a name based on the tags created
|
||||
(e.g., `1.4.0-beta.1 / 1.0.0-rc9.7`).
|
||||
* Paste the contents of combined changelog from Step 2.
|
||||
* Check "This is a pre-release" if applicable.
|
||||
* Click "Publish release". This will kick off the [Pack and publish to
|
||||
MyGet workflow](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/publish-packages-1.0.yml).
|
||||
* `OpenTelemetry.Exporter.Prometheus.AspNetCore` - Defined by spec
|
||||
(experimental)
|
||||
* `OpenTelemetry.Exporter.Prometheus.HttpListener` - Defined by spec
|
||||
(experimental)
|
||||
* `OpenTelemetry.Shims.OpenTracing` - Defined by spec (stable but
|
||||
incomplete implementation)
|
||||
|
||||
8. Validate using MyGet packages. Basic sanity checks :)
|
||||
* As of the `1.9.0` release cycle core unstable packages always depend on
|
||||
the stable versions of core packages. Before releasing a non-core
|
||||
component ensure the `OTelLatestStableVer` property in
|
||||
`Directory.Packages.props` has been updated to the latest stable core
|
||||
version.
|
||||
|
||||
9. From the above build, get the artifacts from the drop, which has all the
|
||||
NuGet packages.
|
||||
2. Run the [Prepare for a
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
|
||||
workflow. Specify the `tag-prefix` and the `version` for the release. Make
|
||||
sure to run the workflow on the branch being released. This is typically
|
||||
`main` but could be some other branch for hotfix (eg `main-1.8.0`). The
|
||||
workflow will open a PR to update `CHANGELOG.md` files for the projects
|
||||
being released. If a stable version is specified as the `version` parameter,
|
||||
the workflow will also merge the contents of any detected
|
||||
`PublicAPI.Unshipped.txt` files in the `.publicApi` folder into the
|
||||
corresponding `PublicAPI.Shipped.txt` files for the projects being released.
|
||||
|
||||
10. Copy all the NuGet files and symbols into a local folder. If only releasing
|
||||
core packages, only copy them over.
|
||||
<details>
|
||||
<summary>Instructions for preparing for a release manually</summary>
|
||||
|
||||
11. Download latest [nuget.exe](https://www.nuget.org/downloads) into the same
|
||||
folder from Step 9.
|
||||
* Update CHANGELOG files
|
||||
|
||||
12. Obtain the API key from nuget.org (Only maintainers have access)
|
||||
Run the PowerShell script `.\build\scripts\update-changelogs.ps1
|
||||
-minVerTagPrefix [MinVerTagPrefix] -version [Version]`. Where
|
||||
`[MinVerTagPrefix]` is the tag prefix (eg `core-`) for the components
|
||||
being released and `[Version]` is the version being released (eg
|
||||
`1.9.0`). This will update `CHANGELOG.md` files for the projects being
|
||||
released.
|
||||
|
||||
13. Run the following commands from PowerShell from local folder used in Step 9:
|
||||
* **Stable releases only**: Normalize PublicApi files
|
||||
|
||||
```powershell
|
||||
.\nuget.exe setApiKey <actual api key>
|
||||
Run the PowerShell script `.\build\scripts\finalize-publicapi.ps1
|
||||
-minVerTagPrefix [MinVerTagPrefix]`. Where `[MinVerTagPrefix]` is the tag
|
||||
prefix (eg `core-`) for the components being released. This will merge
|
||||
the contents of any detected `PublicAPI.Unshipped.txt` files in the
|
||||
`.publicApi` folder into the corresponding `PublicAPI.Shipped.txt` files
|
||||
for the projects being released.
|
||||
</details
|
||||
|
||||
get-childitem -Recurse | where {$_.extension -eq ".nupkg"} | foreach ($_) {.\nuget.exe push $_.fullname -Source https://api.nuget.org/v3/index.json}
|
||||
```
|
||||
3. For stable releases, use the `/UpdateReleaseNotes` command on the PR opened
|
||||
by [Prepare for a
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
|
||||
workflow in step 2 to update [Release Notes](../RELEASENOTES.md) with any
|
||||
big or interesting new features.
|
||||
|
||||
14. Packages would be available in nuget.org in few minutes. Validate that the
|
||||
package is uploaded.
|
||||
* The `/UpdateReleaseDates` command may also be used to update dates in
|
||||
`CHANGELOG.md` files. This is useful when the PR is opened a few days
|
||||
before the planned release date to review public API changes.
|
||||
|
||||
15. Delete the API key generated in Step 11.
|
||||
4. :stop_sign: The PR opened by [Prepare for a
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
|
||||
workflow in step 2 has to be merged.
|
||||
|
||||
16. Update the OpenTelemetry.io document
|
||||
[here](https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/net)
|
||||
by sending a Pull Request.
|
||||
5. Once the PR opened by [Prepare for a
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
|
||||
workflow in step 2 has been merged a trigger will automatically add a
|
||||
comment and lock the PR. Post a comment with "/CreateReleaseTag" in the
|
||||
body. This will tell the [Prepare for a
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
|
||||
workflow to push the tag for the merge commit of the PR which will trigger
|
||||
the [Build, pack, and publish to
|
||||
MyGet](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/publish-packages-1.0.yml)
|
||||
workflow.
|
||||
|
||||
17. If a new stable version of the core packages were released, update
|
||||
`OTelLatestStableVer` in Directory.Packages.props to the just released
|
||||
stable version.
|
||||
<details>
|
||||
<summary>Instructions for pushing tags manually</summary>
|
||||
|
||||
Note: In the below examples `git push origin` is used. If running in a fork,
|
||||
add the main repo as `upstream` and use `git push upstream` instead. Pushing
|
||||
a tag to `origin` in a fork pushes the tag to the fork.
|
||||
|
||||
* If releasing core components, add and push the tag prefixed with `core-`.
|
||||
For example:
|
||||
|
||||
```sh
|
||||
git tag -a core-1.4.0-beta.1 -m "1.4.0-beta.1 of all core components"
|
||||
git push origin core-1.4.0-beta.1
|
||||
```
|
||||
|
||||
* If releasing core unstable components, push the tag prefixed with
|
||||
`coreunstable-`. For example:
|
||||
|
||||
```sh
|
||||
git tag -a coreunstable-1.9.0-beta.1 -m "1.9.0-beta.1 of all core unstable components"
|
||||
git push origin coreunstable-1.9.0-beta.1
|
||||
```
|
||||
|
||||
Pushing the tag will kick off the [Build, pack, and publish to
|
||||
MyGet](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/publish-packages-1.0.yml)
|
||||
workflow.
|
||||
</details>
|
||||
|
||||
6. :stop_sign: Wait for the [Build, pack, and publish to
|
||||
MyGet](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/publish-packages-1.0.yml)
|
||||
workflow to complete. When complete a trigger will automatically add a
|
||||
comment on the PR opened by [Prepare for a
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
|
||||
workflow in step 2. Use MyGet or download the packages using the provided
|
||||
link to validate locally everything works. After validation has been
|
||||
performed have a maintainer post a comment with "/PushPackages" in the body.
|
||||
This will trigger the [Complete
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
|
||||
workflow to push the packages to NuGet and publish the draft release created
|
||||
by the [Build, pack, and publish to
|
||||
MyGet](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/publish-packages-1.0.yml)
|
||||
workflow. Comments will automatically be added on the PR opened by [Prepare
|
||||
for a
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/prepare-release.yml)
|
||||
workflow in step 2 as the process is run and the PR will be unlocked.
|
||||
|
||||
<details>
|
||||
<summary>Instructions for pushing packages to NuGet manually</summary>
|
||||
|
||||
1. The [Build, pack, and publish to
|
||||
MyGet](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/publish-packages-1.0.yml)
|
||||
workflow pushes the packages to MyGet and attaches them as artifacts on
|
||||
the workflow run.
|
||||
|
||||
2. Validate locally everything works using the packages pushed to MyGet or
|
||||
downloaded from the drop attached to the workflow run. Basic sanity
|
||||
checks :)
|
||||
|
||||
3. Download the artifacts from the drop attached to the workflow run. The
|
||||
artifacts archive (`.zip`) contains all the NuGet packages (`.nupkg`) and
|
||||
symbols (`.snupkg`) from the build which were pushed to MyGet.
|
||||
|
||||
4. Extract the artifacts from the archive (`.zip`) into a local folder.
|
||||
|
||||
5. Download latest [nuget.exe](https://www.nuget.org/downloads) into the
|
||||
same folder from step 4.
|
||||
|
||||
6. Create or regenerate an API key from nuget.org (only maintainers have
|
||||
access). When creating API keys make sure it is set to expire in 1 day or
|
||||
less.
|
||||
|
||||
7. Run the following commands from PowerShell from local folder used in step
|
||||
4:
|
||||
|
||||
```powershell
|
||||
.\nuget.exe setApiKey <actual api key>
|
||||
|
||||
get-childitem -Recurse | where {$_.extension -eq ".nupkg"} | foreach ($_) {.\nuget.exe push $_.fullname -Source https://api.nuget.org/v3/index.json}
|
||||
```
|
||||
|
||||
8. Validate that the package(s) are uploaded. Packages are available
|
||||
immediately to maintainers on nuget.org but aren't publicly visible until
|
||||
scanning completes. This process usually takes a few minutes.
|
||||
|
||||
9. Open the
|
||||
[Releases](https://github.com/open-telemetry/opentelemetry-dotnet/releases)
|
||||
page on the GitHub repository. The [Build, pack, and publish to
|
||||
MyGet](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/publish-packages-1.0.yml)
|
||||
workflow creates a draft release for the tag which was pushed. Edit the
|
||||
draft Release and click `Publish release`.
|
||||
</details>
|
||||
|
||||
7. If a new stable version of the core packages was released, a PR should have
|
||||
been automatically created by the [Complete
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/post-release.yml)
|
||||
workflow to update the `OTelLatestStableVer` property in
|
||||
`Directory.Packages.props` to the just released stable version. Merge that
|
||||
PR once the build passes (this requires the packages be available on NuGet).
|
||||
|
||||
8. The [Complete
|
||||
release](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/post-release.yml)
|
||||
workflow should have invoked the [Core version
|
||||
update](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/actions/workflows/core-version-update.yml)
|
||||
workflow on the
|
||||
[opentelemetry-dotnet-contrib](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/)
|
||||
repository which opens a PR to update dependencies. Verify this PR was
|
||||
opened successfully.
|
||||
|
||||
9. For stable releases post an announcement in the [Slack
|
||||
channel](https://cloud-native.slack.com/archives/C01N3BC2W7Q) announcing the
|
||||
release and link to the release notes.
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName)</RepoRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SolutionProjects Include="$(RepoRoot)\**\OpenTelemetry.Exporter.Prometheus.AspNetCore*.csproj" />
|
||||
<SolutionProjects Include="$(RepoRoot)\**\OpenTelemetry.Exporter.Prometheus.HttpListener*.csproj" />
|
||||
<SolutionProjects Include="$(RepoRoot)\**\OpenTelemetry.Shims.OpenTracing*.csproj" />
|
||||
|
||||
<TestProjects Include="$(RepoRoot)\test\**\OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests.csproj" />
|
||||
<TestProjects Include="$(RepoRoot)\test\**\OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj" />
|
||||
<TestProjects Include="$(RepoRoot)\test\**\OpenTelemetry.Shims.OpenTracing.Tests.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
<MSBuild Projects="@(SolutionProjects)" Targets="Build" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Restore">
|
||||
<MSBuild Projects="@(SolutionProjects)" Targets="Restore" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
|
||||
<Target Name="VSTest">
|
||||
<MSBuild Projects="@(TestProjects)" Targets="VSTest" ContinueOnError="ErrorAndStop" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,9 +0,0 @@
|
|||
version: '3.7'
|
||||
|
||||
services:
|
||||
tests:
|
||||
build:
|
||||
args:
|
||||
PUBLISH_FRAMEWORK: net6.0
|
||||
TEST_SDK_VERSION: "6.0"
|
||||
BUILD_SDK_VERSION: "7.0"
|
|
@ -1,9 +0,0 @@
|
|||
version: '3.7'
|
||||
|
||||
services:
|
||||
tests:
|
||||
build:
|
||||
args:
|
||||
PUBLISH_FRAMEWORK: net7.0
|
||||
TEST_SDK_VERSION: "7.0"
|
||||
BUILD_SDK_VERSION: "7.0"
|
|
@ -0,0 +1,7 @@
|
|||
services:
|
||||
tests:
|
||||
build:
|
||||
args:
|
||||
PUBLISH_FRAMEWORK: net8.0
|
||||
TEST_SDK_VERSION: "8.0"
|
||||
BUILD_SDK_VERSION: "9.0"
|
|
@ -0,0 +1,7 @@
|
|||
services:
|
||||
tests:
|
||||
build:
|
||||
args:
|
||||
PUBLISH_FRAMEWORK: net9.0
|
||||
TEST_SDK_VERSION: "9.0"
|
||||
BUILD_SDK_VERSION: "9.0"
|
|
@ -1,31 +0,0 @@
|
|||
# After every stable release, all PublicApi text files (Shipped & Unshipped) should be merged.
|
||||
$path = "src\*\.publicApi\**\";
|
||||
$directory = Split-Path -Path $PSScriptRoot -Parent;
|
||||
|
||||
$searchPath = Join-Path -Path $directory -ChildPath $path;
|
||||
Write-Host "Search Directory: $searchPath";
|
||||
Write-Host "";
|
||||
|
||||
Get-ChildItem -Path $searchPath -Recurse -Filter *.Shipped.txt |
|
||||
ForEach-Object {
|
||||
Write-Host $_.FullName;
|
||||
|
||||
[string]$shipped = $_.FullName;
|
||||
[string]$unshipped = $shipped -replace ".shipped.txt", ".Unshipped.txt";
|
||||
|
||||
if (Test-Path $unshipped) {
|
||||
Write-Host $unshipped;
|
||||
|
||||
Get-Content $shipped, $unshipped | # get contents of both text files
|
||||
Where-Object {$_ -ne ""} | # filter empty lines
|
||||
Sort-Object | # sort lines
|
||||
Get-Unique | # filter duplicates
|
||||
Set-Content $shipped; # write to shipped.txt
|
||||
|
||||
Clear-Content $unshipped; # empty unshipped.txt
|
||||
|
||||
Write-Host "...MERGED and SORTED";
|
||||
}
|
||||
|
||||
Write-Host "";
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
$rootDirectory = Split-Path $PSScriptRoot -Parent
|
||||
[xml]$commonProps = Get-Content -Path $rootDirectory\Directory.Packages.props
|
||||
|
||||
$packages = $commonProps.Project.ItemGroup.PackageVersion
|
||||
$microsoftCodeCoveragePkgVer = [string]($packages | Where-Object {$_.Include -eq "Microsoft.CodeCoverage"}).Version # This is collected in the format: "[17.4.1]"
|
||||
$microsoftCodeCoveragePkgVer = $microsoftCodeCoveragePkgVer.Trim();
|
||||
$microsoftCodeCoveragePkgVer = $microsoftCodeCoveragePkgVer.SubString(1, $microsoftCodeCoveragePkgVer.Length - 2) # Removing square brackets
|
||||
|
||||
$files = Get-ChildItem "TestResults" -Filter "*.coverage" -Recurse
|
||||
Write-Host $env:USERPROFILE
|
||||
foreach ($file in $files)
|
||||
{
|
||||
$command = $env:USERPROFILE+ '\.nuget\packages\microsoft.codecoverage\' + $microsoftCodeCoveragePkgVer + '\build\netstandard2.0\CodeCoverage\CodeCoverage.exe analyze /output:' + $file.DirectoryName + '\' + $file.Name + '.xml '+ $file.FullName
|
||||
Write-Host $command
|
||||
Invoke-Expression $command
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
function AddLabelsOnIssuesForPackageFoundInBody {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][int]$issueNumber,
|
||||
[Parameter(Mandatory=$true)][string]$issueBody
|
||||
)
|
||||
|
||||
$match = [regex]::Match($issueBody, '^[#]+ Package\s*(OpenTelemetry(?:\.\w+)*)')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
Return
|
||||
}
|
||||
|
||||
gh issue edit $issueNumber --add-label $("pkg:" + $match.Groups[1].Value)
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function AddLabelsOnIssuesForPackageFoundInBody
|
||||
|
||||
function AddLabelsOnPullRequestsBasedOnFilesChanged {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][int]$pullRequestNumber,
|
||||
[Parameter(Mandatory=$true)][string]$labelPackagePrefix # 'pkg:' on main repo, 'comp:' on contrib repo
|
||||
)
|
||||
|
||||
# Note: This function is intended to work on main repo and on contrib. Please
|
||||
# keep them in sync.
|
||||
|
||||
$repoLabels = gh label list --json name,id -L 200 | ConvertFrom-Json
|
||||
|
||||
$filesChangedOnPullRequest = gh pr diff $pullRequestNumber --name-only
|
||||
|
||||
$labelsOnPullRequest = (gh pr view $pullRequestNumber --json labels | ConvertFrom-Json).labels
|
||||
|
||||
$visitedProjects = New-Object System.Collections.Generic.HashSet[string]
|
||||
$labelsToAdd = New-Object System.Collections.Generic.HashSet[string]
|
||||
$labelsToRemove = New-Object System.Collections.Generic.HashSet[string]
|
||||
|
||||
# Note: perf label may be added but it is kind of a guess so we don't remove
|
||||
# it automatically in order to also allow manual inclusion after reviewing files
|
||||
$managedLabels = 'infra', 'documentation', 'dependencies'
|
||||
$rootInfraFiles = 'global.json', 'NuGet.config', 'codeowners'
|
||||
$documentationFiles = 'readme.md', 'contributing.md', 'releasing.md', 'versioning.md', 'releasenotes.md'
|
||||
|
||||
foreach ($fileChanged in $filesChangedOnPullRequest)
|
||||
{
|
||||
$fileChanged = $fileChanged.ToLower()
|
||||
$fullFileName = [System.IO.Path]::GetFileName($fileChanged)
|
||||
$fileName = [System.IO.Path]::GetFileNameWithoutExtension($fileChanged)
|
||||
$fileExtension = [System.IO.Path]::GetExtension($fileChanged)
|
||||
|
||||
if ($fileChanged.StartsWith('src/') -or $fileChanged.StartsWith('test/'))
|
||||
{
|
||||
$match = [regex]::Match($fileChanged, '^(?:(?:src)|(?:test))\/(.*?)\/.+$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
continue
|
||||
}
|
||||
$rawProjectName = $match.Groups[1].Value
|
||||
if ($rawProjectName.Contains(".benchmarks") -or $rawProjectName.Contains(".stress"))
|
||||
{
|
||||
$added = $labelsToAdd.Add("perf")
|
||||
}
|
||||
|
||||
$projectName = $rawProjectName.Replace(".tests", "").Replace(".benchmarks", "").Replace(".stress", "")
|
||||
if ($visitedProjects.Contains($projectName))
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
$added = $visitedProjects.Add($projectName);
|
||||
|
||||
foreach ($repoLabel in $repoLabels)
|
||||
{
|
||||
if ($repoLabel.name.StartsWith($labelPackagePrefix))
|
||||
{
|
||||
$package = $repoLabel.name.Substring($labelPackagePrefix.Length).ToLower()
|
||||
if ($package.StartsWith('opentelemetry') -eq $false)
|
||||
{
|
||||
# Note: On contrib labels don't have "OpenTelemetry." prefix
|
||||
$package = 'opentelemetry.' + $package
|
||||
}
|
||||
if ($package -eq $projectName)
|
||||
{
|
||||
$added = $labelsToAdd.Add($repoLabel.name)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($documentationFiles.Contains($fullFileName) -or
|
||||
$fileChanged.StartsWith('docs/') -or
|
||||
$fileChanged.StartsWith('examples/'))
|
||||
{
|
||||
$added = $labelsToAdd.Add("documentation")
|
||||
}
|
||||
|
||||
if ($fileChanged.StartsWith('build/') -or
|
||||
$fileChanged.StartsWith('.github/') -or
|
||||
$rootInfraFiles.Contains($fullFileName) -or
|
||||
$fileExtension -eq ".props" -or
|
||||
$fileExtension -eq ".targets" -or
|
||||
$fileChanged.StartsWith('test/openTelemetry.aotcompatibility'))
|
||||
{
|
||||
$added = $labelsToAdd.Add("infra")
|
||||
}
|
||||
|
||||
if ($fileChanged.StartsWith('test/benchmarks'))
|
||||
{
|
||||
$added = $labelsToAdd.Add("perf")
|
||||
}
|
||||
|
||||
if ($fullFileName -eq 'directory.packages.props')
|
||||
{
|
||||
$added = $labelsToAdd.Add("dependencies")
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($labelOnPullRequest in $labelsOnPullRequest)
|
||||
{
|
||||
if ($labelsToAdd.Contains($labelOnPullRequest.name))
|
||||
{
|
||||
$removed = $labelsToAdd.Remove($labelOnPullRequest.name)
|
||||
}
|
||||
elseif ($labelOnPullRequest.name.StartsWith($labelPackagePrefix) -or
|
||||
$managedLabels.Contains($labelOnPullRequest.name))
|
||||
{
|
||||
$added = $labelsToRemove.Add($labelOnPullRequest.name)
|
||||
}
|
||||
}
|
||||
|
||||
if ($labelsToAdd.Count -gt 0)
|
||||
{
|
||||
foreach ($label in $labelsToAdd)
|
||||
{
|
||||
gh pr edit $pullRequestNumber --add-label $label
|
||||
}
|
||||
}
|
||||
|
||||
if ($labelsToRemove.Count -gt 0)
|
||||
{
|
||||
foreach ($label in $labelsToRemove)
|
||||
{
|
||||
gh pr edit $pullRequestNumber --remove-label $label
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function AddLabelsOnPullRequestsBasedOnFilesChanged
|
|
@ -0,0 +1,39 @@
|
|||
param(
|
||||
[Parameter(Mandatory=$true)][string]$minVerTagPrefix
|
||||
)
|
||||
|
||||
# For stable releases "Unshipped" PublicApi text files are merged into "Shipped" versions.
|
||||
|
||||
$projectDirs = Get-ChildItem -Path src/**/*.csproj | Select-String "<MinVerTagPrefix>$minVerTagPrefix</MinVerTagPrefix>" -List | Select Path | Split-Path -Parent
|
||||
|
||||
$path = "\.publicApi\**\PublicAPI.Shipped.txt";
|
||||
|
||||
foreach ($projectDir in $projectDirs) {
|
||||
$searchPath = Join-Path -Path $projectDir -ChildPath $path;
|
||||
|
||||
Write-Host "Search glob: $searchPath";
|
||||
|
||||
Get-ChildItem -Path $searchPath -Recurse |
|
||||
ForEach-Object {
|
||||
Write-Host "Shipped: $_";
|
||||
|
||||
[string]$shipped = $_.FullName;
|
||||
[string]$unshipped = $shipped -replace ".shipped.txt", ".Unshipped.txt";
|
||||
|
||||
if (Test-Path $unshipped) {
|
||||
Write-Host "Unshipped: $unshipped";
|
||||
|
||||
Get-Content $shipped, $unshipped | # get contents of both text files
|
||||
Where-Object {$_ -ne ""} | # filter empty lines
|
||||
Sort-Object | # sort lines
|
||||
Get-Unique | # filter duplicates
|
||||
Set-Content $shipped; # write to shipped.txt
|
||||
|
||||
Clear-Content $unshipped; # empty unshipped.txt
|
||||
|
||||
Write-Host "...MERGED and SORTED";
|
||||
}
|
||||
|
||||
Write-Host "";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,598 @@
|
|||
function CreateDraftRelease {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$tag,
|
||||
[Parameter()][string]$releaseFiles
|
||||
)
|
||||
|
||||
$match = [regex]::Match($tag, '^(.*?-)(.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse prefix or version from tag'
|
||||
}
|
||||
|
||||
$tagPrefix = $match.Groups[1].Value
|
||||
$version = $match.Groups[2].Value
|
||||
$isPrerelease = $version -match '-alpha' -or $version -match '-beta' -or $version -match '-rc'
|
||||
|
||||
$projects = @(Get-ChildItem -Path src/**/*.csproj | Select-String "<MinVerTagPrefix>$tagPrefix</MinVerTagPrefix>" -List | Select Path)
|
||||
|
||||
if ($projects.Length -eq 0)
|
||||
{
|
||||
throw 'No projects found with MinVerTagPrefix matching prefix from tag'
|
||||
}
|
||||
|
||||
$notes = ''
|
||||
$previousVersion = ''
|
||||
|
||||
foreach ($project in $projects)
|
||||
{
|
||||
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($project.Path)
|
||||
|
||||
$changelogContent = Get-Content -Path "src/$projectName/CHANGELOG.md"
|
||||
|
||||
$started = $false
|
||||
$content = ""
|
||||
|
||||
foreach ($line in $changelogContent)
|
||||
{
|
||||
if ($line -like "## $version" -and $started -ne $true)
|
||||
{
|
||||
$started = $true
|
||||
}
|
||||
elseif ($line -like "Released *" -and $started -eq $true)
|
||||
{
|
||||
continue
|
||||
}
|
||||
elseif ($line -like "## *" -and $started -eq $true)
|
||||
{
|
||||
$match = [regex]::Match($line, '^##\s*(.*)$')
|
||||
if ($match.Success -eq $true)
|
||||
{
|
||||
$previousVersion = $match.Groups[1].Value
|
||||
}
|
||||
break
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($started -eq $true -and ([string]::IsNullOrWhitespace($line) -eq $false -or $content.Length -gt 0))
|
||||
{
|
||||
$content += " " + $line + "`r`n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhitespace($content) -eq $true)
|
||||
{
|
||||
$content = " No notable changes."
|
||||
}
|
||||
|
||||
$content = $content.trimend()
|
||||
|
||||
$notes +=
|
||||
@"
|
||||
* NuGet: [$projectName v$version](https://www.nuget.org/packages/$projectName/$version)
|
||||
|
||||
$content
|
||||
|
||||
See [CHANGELOG](https://github.com/$gitRepository/blob/$tag/src/$projectName/CHANGELOG.md) for details.
|
||||
|
||||
|
||||
"@
|
||||
}
|
||||
|
||||
if ($isPrerelease -eq $true)
|
||||
{
|
||||
$notes =
|
||||
@"
|
||||
The following changes are from the previous release [$previousVersion](https://github.com/$gitRepository/releases/tag/$tagPrefix$previousVersion).
|
||||
|
||||
|
||||
"@ + $notes
|
||||
|
||||
gh release create $tag $releaseFiles `
|
||||
--title $tag `
|
||||
--verify-tag `
|
||||
--notes $notes `
|
||||
--prerelease `
|
||||
--draft
|
||||
}
|
||||
else
|
||||
{
|
||||
$notes =
|
||||
@"
|
||||
For highlights and announcements pertaining to this release see: [Release Notes > $version](https://github.com/$gitRepository/blob/main/RELEASENOTES.md#$($version.Replace('.',''))).
|
||||
|
||||
The following changes are from the previous release [$previousVersion](https://github.com/$gitRepository/releases/tag/$tagPrefix$previousVersion).
|
||||
|
||||
|
||||
"@ + $notes
|
||||
|
||||
gh release create $tag $releaseFiles `
|
||||
--title $tag `
|
||||
--verify-tag `
|
||||
--notes $notes `
|
||||
--latest `
|
||||
--draft
|
||||
}
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function CreateDraftRelease
|
||||
|
||||
function TryPostPackagesReadyNoticeOnPrepareReleasePullRequest {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$tag,
|
||||
[Parameter(Mandatory=$true)][string]$tagSha,
|
||||
[Parameter(Mandatory=$true)][string]$packagesUrl,
|
||||
[Parameter(Mandatory=$true)][string]$botUserName
|
||||
)
|
||||
|
||||
$prListResponse = gh pr list --search $tagSha --state merged --json number,author,title,comments | ConvertFrom-Json
|
||||
|
||||
if ($prListResponse.Length -eq 0)
|
||||
{
|
||||
Write-Host 'No prepare release PR found for tag & commit skipping post notice'
|
||||
return
|
||||
}
|
||||
|
||||
foreach ($pr in $prListResponse)
|
||||
{
|
||||
if ($pr.author.login -ne $botUserName -or $pr.title -ne "[release] Prepare release $tag")
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
$foundComment = $false
|
||||
foreach ($comment in $pr.comments)
|
||||
{
|
||||
if ($comment.author.login -eq $botUserName -and $comment.body.StartsWith("I just pushed the [$tag]"))
|
||||
{
|
||||
$foundComment = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if ($foundComment -eq $false)
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
$body =
|
||||
@"
|
||||
The packages for [$tag](https://github.com/$gitRepository/releases/tag/$tag) are now available: $packagesUrl.
|
||||
|
||||
Once these packages have been validated have a maintainer post a comment with "/PushPackages" in the body if you would like me to push to NuGet.
|
||||
"@
|
||||
|
||||
$pullRequestNumber = $pr.number
|
||||
|
||||
gh pr comment $pullRequestNumber --body $body
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host 'No prepare release PR found matched author and title with a valid comment'
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function TryPostPackagesReadyNoticeOnPrepareReleasePullRequest
|
||||
|
||||
function PushPackagesPublishReleaseUnlockAndPostNoticeOnPrepareReleasePullRequest {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$pullRequestNumber,
|
||||
[Parameter(Mandatory=$true)][string]$botUserName,
|
||||
[Parameter(Mandatory=$true)][string]$commentUserName,
|
||||
[Parameter(Mandatory=$true)][string]$artifactDownloadPath,
|
||||
[Parameter(Mandatory=$true)][string]$pushToNuget
|
||||
)
|
||||
|
||||
$prViewResponse = gh pr view $pullRequestNumber --json author,title,comments | ConvertFrom-Json
|
||||
|
||||
if ($prViewResponse.author.login -ne $botUserName)
|
||||
{
|
||||
throw 'PR author was unexpected'
|
||||
}
|
||||
|
||||
$match = [regex]::Match($prViewResponse.title, '^\[release\] Prepare release (.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse tag from PR title'
|
||||
}
|
||||
|
||||
$tag = $match.Groups[1].Value
|
||||
|
||||
$commentUserPermission = gh api "repos/$gitRepository/collaborators/$commentUserName/permission" | ConvertFrom-Json
|
||||
if ($commentUserPermission.permission -ne 'admin')
|
||||
{
|
||||
gh pr comment $pullRequestNumber `
|
||||
--body "I'm sorry @$commentUserName but you don't have permission to push packages. Only maintainers can push to NuGet."
|
||||
return
|
||||
}
|
||||
|
||||
$foundComment = $false
|
||||
$packagesUrl = ''
|
||||
foreach ($comment in $prViewResponse.comments)
|
||||
{
|
||||
if ($comment.author.login -eq $botUserName -and $comment.body.StartsWith("The packages for [$tag](https://github.com/$gitRepository/releases/tag/$tag) are now available:"))
|
||||
{
|
||||
$foundComment = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if ($foundComment -eq $false)
|
||||
{
|
||||
throw 'Could not find package push comment on pr'
|
||||
}
|
||||
|
||||
gh release download $tag `
|
||||
-p "$tag-packages.zip" `
|
||||
-D "$artifactDownloadPath"
|
||||
|
||||
Expand-Archive -LiteralPath "$artifactDownloadPath/$tag-packages.zip" -DestinationPath "$artifactDownloadPath\"
|
||||
|
||||
if ($pushToNuget -eq 'true')
|
||||
{
|
||||
gh pr comment $pullRequestNumber `
|
||||
--body "I am uploading the packages for ``$tag`` to NuGet and then I will publish the release."
|
||||
|
||||
nuget push "$artifactDownloadPath/**/*.nupkg" -Source https://api.nuget.org/v3/index.json -ApiKey "$env:NUGET_TOKEN" -SymbolApiKey "$env:NUGET_TOKEN"
|
||||
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
gh pr comment $pullRequestNumber `
|
||||
--body "Something went wrong uploading the packages for ``$tag`` to NuGet."
|
||||
|
||||
throw 'nuget push failure'
|
||||
}
|
||||
}
|
||||
else {
|
||||
gh pr comment $pullRequestNumber `
|
||||
--body "I am publishing the release without uploading the packages to NuGet because a token wasn't configured."
|
||||
}
|
||||
|
||||
gh release edit $tag --draft=false
|
||||
|
||||
gh pr unlock $pullRequestNumber
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function PushPackagesPublishReleaseUnlockAndPostNoticeOnPrepareReleasePullRequest
|
||||
|
||||
function CreateStableVersionUpdatePullRequest {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$tag,
|
||||
[Parameter()][string]$targetBranch="main",
|
||||
[Parameter()][string]$lineEnding="`n",
|
||||
[Parameter()][string]$gitUserName,
|
||||
[Parameter()][string]$gitUserEmail
|
||||
)
|
||||
|
||||
$match = [regex]::Match($tag, '.*?-(.*)')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse version from tag'
|
||||
}
|
||||
|
||||
$version = $match.Groups[1].Value
|
||||
|
||||
$branch="release/post-stable-${tag}-update"
|
||||
|
||||
if ([string]::IsNullOrEmpty($gitUserName) -eq $false)
|
||||
{
|
||||
git config user.name $gitUserName
|
||||
}
|
||||
if ([string]::IsNullOrEmpty($gitUserEmail) -eq $false)
|
||||
{
|
||||
git config user.email $gitUserEmail
|
||||
}
|
||||
|
||||
git switch --create $branch origin/$targetBranch --no-track 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git switch failure'
|
||||
}
|
||||
|
||||
$projectsAndDependenciesBefore = GetCoreDependenciesForProjects
|
||||
|
||||
(Get-Content Directory.Packages.props) `
|
||||
-replace '<OTelLatestStableVer>.*<\/OTelLatestStableVer>', "<OTelLatestStableVer>$version</OTelLatestStableVer>" |
|
||||
Set-Content Directory.Packages.props
|
||||
|
||||
$projectsAndDependenciesAfter = GetCoreDependenciesForProjects
|
||||
|
||||
$changedProjects = @{}
|
||||
|
||||
$projectsAndDependenciesBefore.GetEnumerator() | ForEach-Object {
|
||||
$projectDir = $_.Key
|
||||
$projectDependenciesBefore = $_.Value
|
||||
$projectDependenciesAfter = $projectsAndDependenciesAfter[$projectDir]
|
||||
|
||||
$projectDependenciesBefore.GetEnumerator() | ForEach-Object {
|
||||
$packageName = $_.Key
|
||||
$packageVersionBefore = $_.Value
|
||||
if ($projectDependenciesAfter[$packageName] -ne $packageVersionBefore)
|
||||
{
|
||||
$changedProjects[$projectDir] = $true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
git add Directory.Packages.props 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git add failure'
|
||||
}
|
||||
|
||||
git commit -m "Update OTelLatestStableVer in Directory.Packages.props to $version." 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git commit failure'
|
||||
}
|
||||
|
||||
git push -u origin $branch 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git push failure'
|
||||
}
|
||||
|
||||
$body =
|
||||
@"
|
||||
Note: This PR was opened automatically by the [post-release workflow](https://github.com/$gitRepository/actions/workflows/post-release.yml).
|
||||
|
||||
Merge once packages are available on NuGet and the build passes.
|
||||
|
||||
## Changes
|
||||
|
||||
* Sets ``OTelLatestStableVer`` in ``Directory.Packages.props`` to ``$version``.
|
||||
"@
|
||||
|
||||
$createPullRequestResponse = gh pr create `
|
||||
--title "[release] Core stable release $version updates" `
|
||||
--body $body `
|
||||
--base $targetBranch `
|
||||
--head $branch `
|
||||
--label release
|
||||
|
||||
Write-Host $createPullRequestResponse
|
||||
|
||||
$match = [regex]::Match($createPullRequestResponse, "\/pull\/(.*)$")
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse pull request number from gh pr create response'
|
||||
}
|
||||
|
||||
$pullRequestNumber = $match.Groups[1].Value
|
||||
|
||||
if ($changedProjects.Count -eq 0)
|
||||
{
|
||||
Return
|
||||
}
|
||||
|
||||
$entry = @"
|
||||
* Updated OpenTelemetry core component version(s) to ``$version``.
|
||||
([#$pullRequestNumber](https://github.com/$gitRepository/pull/$pullRequestNumber))
|
||||
|
||||
|
||||
"@
|
||||
|
||||
$lastLineBlank = $true
|
||||
$changelogFilesUpdated = 0
|
||||
|
||||
foreach ($projectDir in $changedProjects.Keys)
|
||||
{
|
||||
$path = Join-Path -Path $projectDir -ChildPath "CHANGELOG.md"
|
||||
|
||||
if ([System.IO.File]::Exists($path) -eq $false)
|
||||
{
|
||||
Write-Host "No CHANGELOG found in $projectDir"
|
||||
continue
|
||||
}
|
||||
|
||||
$changelogContent = Get-Content -Path $path
|
||||
|
||||
$started = $false
|
||||
$isRemoving = $false
|
||||
$content = ""
|
||||
|
||||
foreach ($line in $changelogContent)
|
||||
{
|
||||
if ($line -like "## Unreleased" -and $started -ne $true)
|
||||
{
|
||||
$started = $true
|
||||
}
|
||||
elseif ($line -like "## *" -and $started -eq $true)
|
||||
{
|
||||
if ($lastLineBlank -eq $false)
|
||||
{
|
||||
$content += $lineEnding
|
||||
}
|
||||
$content += $entry
|
||||
$started = $false
|
||||
$isRemoving = $false
|
||||
}
|
||||
elseif ($started -eq $true -and ($line -like '*Update* OpenTelemetry SDK version to*' -or $line -like '*Updated OpenTelemetry core component version(s) to*'))
|
||||
{
|
||||
$isRemoving = $true
|
||||
continue
|
||||
}
|
||||
|
||||
if ($line.StartsWith('* '))
|
||||
{
|
||||
if ($isRemoving -eq $true)
|
||||
{
|
||||
$isRemoving = $false
|
||||
}
|
||||
|
||||
if ($lastLineBlank -eq $false)
|
||||
{
|
||||
$content += $lineEnding
|
||||
}
|
||||
}
|
||||
|
||||
if ($isRemoving -eq $true)
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
$content += $line + $lineEnding
|
||||
|
||||
$lastLineBlank = [string]::IsNullOrWhitespace($line)
|
||||
}
|
||||
|
||||
if ($started -eq $true)
|
||||
{
|
||||
# Note: If we never wrote the entry it means the file ended in the unreleased section
|
||||
if ($lastLineBlank -eq $false)
|
||||
{
|
||||
$content += $lineEnding
|
||||
}
|
||||
$content += $entry
|
||||
}
|
||||
|
||||
Set-Content -Path $path -Value $content.TrimEnd()
|
||||
|
||||
git add $path 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git add failure'
|
||||
}
|
||||
|
||||
$changelogFilesUpdated++
|
||||
}
|
||||
|
||||
if ($changelogFilesUpdated -gt 0)
|
||||
{
|
||||
git commit -m "Update CHANGELOGs for projects using OTelLatestStableVer." 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git commit failure'
|
||||
}
|
||||
|
||||
git push -u origin $branch 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git push failure'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function CreateStableVersionUpdatePullRequest
|
||||
|
||||
function GetCoreDependenciesForProjects {
|
||||
$projects = @(Get-ChildItem -Path 'src/*/*.csproj')
|
||||
|
||||
$projectsAndDependencies = @{}
|
||||
|
||||
foreach ($project in $projects)
|
||||
{
|
||||
# Note: dotnet restore may fail if the core packages aren't available yet but that is fine, we just want to generate project.assets.json for these projects.
|
||||
$output = dotnet restore $project -p:RunningDotNetPack=true
|
||||
|
||||
$projectDir = $project | Split-Path -Parent
|
||||
|
||||
$content = (Get-Content "$projectDir/obj/project.assets.json" -Raw)
|
||||
|
||||
$projectDependencies = @{}
|
||||
|
||||
$matches = [regex]::Matches($content, '"(OpenTelemetry(?:.*))?": {[\S\s]*?"target": "Package",[\S\s]*?"version": "(.*)"[\S\s]*?}')
|
||||
foreach ($match in $matches)
|
||||
{
|
||||
$packageName = $match.Groups[1].Value
|
||||
$packageVersion = $match.Groups[2].Value
|
||||
if ($packageName -eq 'OpenTelemetry' -or
|
||||
$packageName -eq 'OpenTelemetry.Api' -or
|
||||
$packageName -eq 'OpenTelemetry.Api.ProviderBuilderExtensions' -or
|
||||
$packageName -eq 'OpenTelemetry.Extensions.Hosting' -or
|
||||
$packageName -eq 'OpenTelemetry.Extensions.Propagators')
|
||||
{
|
||||
$projectDependencies[$packageName.ToString()] = $packageVersion.ToString()
|
||||
}
|
||||
}
|
||||
$projectsAndDependencies[$projectDir.ToString()] = $projectDependencies
|
||||
}
|
||||
|
||||
return $projectsAndDependencies
|
||||
}
|
||||
|
||||
function InvokeCoreVersionUpdateWorkflowInRemoteRepository {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$remoteGitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$tag,
|
||||
[Parameter()][string]$targetBranch="main"
|
||||
)
|
||||
|
||||
$match = [regex]::Match($tag, '^(.*?-)(.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse prefix or version from tag'
|
||||
}
|
||||
|
||||
gh workflow run "core-version-update.yml" `
|
||||
--repo $remoteGitRepository `
|
||||
--ref $targetBranch `
|
||||
--field "tag=$tag"
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function InvokeCoreVersionUpdateWorkflowInRemoteRepository
|
||||
|
||||
function TryPostReleasePublishedNoticeOnPrepareReleasePullRequest {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$botUserName,
|
||||
[Parameter(Mandatory=$true)][string]$tag
|
||||
)
|
||||
|
||||
$tagSha = git rev-list -n 1 $tag 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git rev-list failure'
|
||||
}
|
||||
|
||||
$prListResponse = gh pr list --search $tagSha --state merged --json number,author,title,comments | ConvertFrom-Json
|
||||
|
||||
if ($prListResponse.Length -eq 0)
|
||||
{
|
||||
Write-Host 'No prepare release PR found for tag & commit skipping post notice'
|
||||
return
|
||||
}
|
||||
|
||||
foreach ($pr in $prListResponse)
|
||||
{
|
||||
if ($pr.author.login -ne $botUserName -or $pr.title -ne "[release] Prepare release $tag")
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
$foundComment = $false
|
||||
foreach ($comment in $pr.comments)
|
||||
{
|
||||
if ($comment.author.login -eq $botUserName -and $comment.body.StartsWith("The packages for [$tag](https://github.com/$gitRepository/releases/tag/$tag) are now available:"))
|
||||
{
|
||||
$foundComment = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if ($foundComment -eq $false)
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
$body =
|
||||
@"
|
||||
The release [$tag](https://github.com/$gitRepository/releases/tag/$tag) has been published and packages should be available on NuGet momentarily.
|
||||
|
||||
Have a nice day!
|
||||
"@
|
||||
|
||||
$pullRequestNumber = $pr.number
|
||||
|
||||
gh pr comment $pullRequestNumber --body $body
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host 'No prepare release PR found matched author and title with a valid comment'
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function TryPostReleasePublishedNoticeOnPrepareReleasePullRequest
|
|
@ -0,0 +1,463 @@
|
|||
function CreatePullRequestToUpdateChangelogsAndPublicApis {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$minVerTagPrefix,
|
||||
[Parameter(Mandatory=$true)][string]$version,
|
||||
[Parameter(Mandatory=$true)][string]$requestedByUserName,
|
||||
[Parameter()][string]$targetBranch="main",
|
||||
[Parameter()][string]$gitUserName,
|
||||
[Parameter()][string]$gitUserEmail
|
||||
)
|
||||
|
||||
$match = [regex]::Match($version, '^(\d+\.\d+\.\d+)(?:-((?:alpha)|(?:beta)|(?:rc))\.(\d+))?$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Input version did not match expected format'
|
||||
}
|
||||
|
||||
$isPrerelease = $version -match '-alpha' -or $version -match '-beta' -or $version -match '-rc'
|
||||
$tag="${minVerTagPrefix}${version}"
|
||||
$branch="release/prepare-${tag}-release"
|
||||
|
||||
if ([string]::IsNullOrEmpty($gitUserName) -eq $false)
|
||||
{
|
||||
git config user.name $gitUserName
|
||||
}
|
||||
if ([string]::IsNullOrEmpty($gitUserEmail) -eq $false)
|
||||
{
|
||||
git config user.email $gitUserEmail
|
||||
}
|
||||
|
||||
git switch --create $branch 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git switch failure'
|
||||
}
|
||||
|
||||
$body =
|
||||
@"
|
||||
Note: This PR was opened automatically by the [prepare release workflow](https://github.com/$gitRepository/actions/workflows/prepare-release.yml).
|
||||
|
||||
Requested by: @$requestedByUserName
|
||||
|
||||
## Changes
|
||||
|
||||
* CHANGELOG files updated for projects being released.
|
||||
"@
|
||||
|
||||
# Update CHANGELOGs
|
||||
& ./build/scripts/update-changelogs.ps1 -minVerTagPrefix $minVerTagPrefix -version $version
|
||||
|
||||
# Update publicApi files for stable releases
|
||||
if ($isPrerelease -ne $true)
|
||||
{
|
||||
& ./build/scripts/finalize-publicapi.ps1 -minVerTagPrefix $minVerTagPrefix
|
||||
|
||||
$body += "`r`n* Public API files updated for projects being released (only performed for stable releases)."
|
||||
}
|
||||
|
||||
$body +=
|
||||
@"
|
||||
|
||||
## Commands
|
||||
|
||||
``/UpdateReleaseDates``: Use to update release dates in CHANGELOGs before merging [``approvers``, ``maintainers``]
|
||||
"@
|
||||
|
||||
if ($minVerTagPrefix -eq 'core-' -and $isPrerelease -ne $true)
|
||||
{
|
||||
$body +=
|
||||
@"
|
||||
|
||||
``/UpdateReleaseNotes``: Use to update ``RELEASENOTES.md`` before merging [``approvers``, ``maintainers``]
|
||||
"@
|
||||
}
|
||||
|
||||
$body +=
|
||||
@"
|
||||
|
||||
``/CreateReleaseTag``: Use after merging to push the release tag and trigger the job to create packages [``approvers``, ``maintainers``]
|
||||
``/PushPackages``: Use after the created packages have been validated to push to NuGet [``maintainers``]
|
||||
"@
|
||||
|
||||
git commit -a -m "Prepare repo to release $tag." 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git commit failure'
|
||||
}
|
||||
|
||||
git push -u origin $branch 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git push failure'
|
||||
}
|
||||
|
||||
$createPullRequestResponse = gh pr create `
|
||||
--title "[release] Prepare release $tag" `
|
||||
--body $body `
|
||||
--base $targetBranch `
|
||||
--head $branch `
|
||||
--label release
|
||||
|
||||
Write-Host $createPullRequestResponse
|
||||
|
||||
$match = [regex]::Match($createPullRequestResponse, "\/pull\/(.*)$")
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse pull request number from gh pr create response'
|
||||
}
|
||||
|
||||
$pullRequestNumber = $match.Groups[1].Value
|
||||
|
||||
if ($minVerTagPrefix -eq 'core-' -and $isPrerelease -ne $true)
|
||||
{
|
||||
$found = Select-String -Path "RELEASENOTES.md" -Pattern "## $version" -Quiet
|
||||
if ($found -eq $false)
|
||||
{
|
||||
$body =
|
||||
@"
|
||||
I noticed this PR is releasing a stable version of core packages but there isn't any content in ``RELEASENOTES.md`` for the version being released.
|
||||
|
||||
It is important to update ``RELEASENOTES.md`` before creating the release tag because a permalink will become part of the package(s).
|
||||
|
||||
Post a comment with "/UpdateReleaseNotes" in the body if you would like me to update release notes.
|
||||
|
||||
Note: In the comment everything below "/UpdateReleaseNotes" will be added to ``RELEASENOTES.md`` for the version being released. If something is already there it will be replaced.
|
||||
"@
|
||||
|
||||
gh pr comment $pullRequestNumber --body $body
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function CreatePullRequestToUpdateChangelogsAndPublicApis
|
||||
|
||||
function LockPullRequestAndPostNoticeToCreateReleaseTag {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$pullRequestNumber,
|
||||
[Parameter(Mandatory=$true)][string]$botUserName
|
||||
)
|
||||
|
||||
$prViewResponse = gh pr view $pullRequestNumber --json mergeCommit,author,title | ConvertFrom-Json
|
||||
|
||||
if ($prViewResponse.author.login -ne $botUserName)
|
||||
{
|
||||
throw 'PR author was unexpected'
|
||||
}
|
||||
|
||||
$match = [regex]::Match($prViewResponse.title, '^\[release\] Prepare release (.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse tag from PR title'
|
||||
}
|
||||
|
||||
$tag = $match.Groups[1].Value
|
||||
|
||||
$commit = $prViewResponse.mergeCommit.oid
|
||||
if ([string]::IsNullOrEmpty($commit) -eq $true)
|
||||
{
|
||||
throw 'Could not find merge commit'
|
||||
}
|
||||
|
||||
$body =
|
||||
@"
|
||||
I noticed this PR was merged.
|
||||
|
||||
Post a comment with "/CreateReleaseTag" in the body if you would like me to create the release tag ``$tag`` for [the merge commit](https://github.com/$gitRepository/commit/$commit) which will trigger the package workflow.
|
||||
"@
|
||||
|
||||
gh pr comment $pullRequestNumber --body $body
|
||||
|
||||
gh pr lock $pullRequestNumber
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function LockPullRequestAndPostNoticeToCreateReleaseTag
|
||||
|
||||
function CreateReleaseTagAndPostNoticeOnPullRequest {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$pullRequestNumber,
|
||||
[Parameter(Mandatory=$true)][string]$botUserName,
|
||||
[Parameter()][string]$gitUserName,
|
||||
[Parameter()][string]$gitUserEmail
|
||||
)
|
||||
|
||||
$prViewResponse = gh pr view $pullRequestNumber --json mergeCommit,author,title | ConvertFrom-Json
|
||||
|
||||
if ($prViewResponse.author.login -ne $botUserName)
|
||||
{
|
||||
throw 'PR author was unexpected'
|
||||
}
|
||||
|
||||
$match = [regex]::Match($prViewResponse.title, '^\[release\] Prepare release (.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse tag from PR title'
|
||||
}
|
||||
|
||||
$tag = $match.Groups[1].Value
|
||||
|
||||
$commit = $prViewResponse.mergeCommit.oid
|
||||
if ([string]::IsNullOrEmpty($commit) -eq $true)
|
||||
{
|
||||
throw 'Could not find merge commit'
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrEmpty($gitUserName) -eq $false)
|
||||
{
|
||||
git config user.name $gitUserName
|
||||
}
|
||||
if ([string]::IsNullOrEmpty($gitUserEmail) -eq $false)
|
||||
{
|
||||
git config user.email $gitUserEmail
|
||||
}
|
||||
|
||||
git tag -a $tag -m "$tag" $commit 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git tag failure'
|
||||
}
|
||||
|
||||
git push origin $tag 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git push failure'
|
||||
}
|
||||
|
||||
$body =
|
||||
@"
|
||||
I just pushed the [$tag](https://github.com/$gitRepository/releases/tag/$tag) tag.
|
||||
|
||||
The [package workflow](https://github.com/$gitRepository/actions/workflows/publish-packages-1.0.yml) should begin momentarily.
|
||||
"@
|
||||
|
||||
gh pr comment $pullRequestNumber --body $body
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function CreateReleaseTagAndPostNoticeOnPullRequest
|
||||
|
||||
function UpdateChangelogReleaseDatesAndPostNoticeOnPullRequest {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$pullRequestNumber,
|
||||
[Parameter(Mandatory=$true)][string]$botUserName,
|
||||
[Parameter(Mandatory=$true)][string]$commentUserName,
|
||||
[Parameter()][string]$gitUserName,
|
||||
[Parameter()][string]$gitUserEmail
|
||||
)
|
||||
|
||||
$prViewResponse = gh pr view $pullRequestNumber --json headRefName,author,title | ConvertFrom-Json
|
||||
|
||||
if ($prViewResponse.author.login -ne $botUserName)
|
||||
{
|
||||
throw 'PR author was unexpected'
|
||||
}
|
||||
|
||||
$match = [regex]::Match($prViewResponse.title, '^\[release\] Prepare release (.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse tag from PR title'
|
||||
}
|
||||
|
||||
$tag = $match.Groups[1].Value
|
||||
|
||||
$match = [regex]::Match($tag, '^(.*?-)(.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse prefix or version from tag'
|
||||
}
|
||||
|
||||
$tagPrefix = $match.Groups[1].Value
|
||||
$version = $match.Groups[2].Value
|
||||
|
||||
$commentUserPermission = gh api "repos/$gitRepository/collaborators/$commentUserName/permission" | ConvertFrom-Json
|
||||
if ($commentUserPermission.permission -ne 'admin' -and $commentUserPermission.permission -ne 'write')
|
||||
{
|
||||
gh pr comment $pullRequestNumber `
|
||||
--body "I'm sorry @$commentUserName but you don't have permission to update this PR. Only maintainers and approvers can update this PR."
|
||||
return
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrEmpty($gitUserName) -eq $false)
|
||||
{
|
||||
git config user.name $gitUserName
|
||||
}
|
||||
if ([string]::IsNullOrEmpty($gitUserEmail) -eq $false)
|
||||
{
|
||||
git config user.email $gitUserEmail
|
||||
}
|
||||
|
||||
git switch $prViewResponse.headRefName 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git switch failure'
|
||||
}
|
||||
|
||||
$updatedFiles = 0
|
||||
$newHeader =
|
||||
@"
|
||||
## $version
|
||||
|
||||
Released $(Get-Date -UFormat '%Y-%b-%d')
|
||||
"@
|
||||
|
||||
$projectDirs = Get-ChildItem -Path src/**/*.csproj | Select-String "<MinVerTagPrefix>$tagPrefix</MinVerTagPrefix>" -List | Select Path | Split-Path -Parent
|
||||
|
||||
foreach ($projectDir in $projectDirs)
|
||||
{
|
||||
$content = (Get-Content "$projectDir/CHANGELOG.md" -Raw)
|
||||
|
||||
$newContent = $content -replace "## $version\s*Released .*", $newHeader
|
||||
|
||||
if ($content -ne $newContent)
|
||||
{
|
||||
$updatedFiles++
|
||||
Set-Content -Path "$projectDir/CHANGELOG.md" $newContent.Trim()
|
||||
}
|
||||
}
|
||||
|
||||
if ($updatedFiles -eq 0)
|
||||
{
|
||||
gh pr comment $pullRequestNumber --body "All of the CHANGELOG files have valid release dates."
|
||||
return
|
||||
}
|
||||
|
||||
git commit -a -m "Update CHANGELOG release dates for $tag." 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git commit failure'
|
||||
}
|
||||
|
||||
git push -u origin $prViewResponse.headRefName 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git push failure'
|
||||
}
|
||||
|
||||
gh pr comment $pullRequestNumber --body "I updated the CHANGELOG release dates."
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function UpdateChangelogReleaseDatesAndPostNoticeOnPullRequest
|
||||
|
||||
function UpdateReleaseNotesAndPostNoticeOnPullRequest {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$gitRepository,
|
||||
[Parameter(Mandatory=$true)][string]$pullRequestNumber,
|
||||
[Parameter(Mandatory=$true)][string]$botUserName,
|
||||
[Parameter(Mandatory=$true)][string]$commentUserName,
|
||||
[Parameter(Mandatory=$true)][string]$commentBody,
|
||||
[Parameter()][string]$gitUserName,
|
||||
[Parameter()][string]$gitUserEmail
|
||||
)
|
||||
|
||||
$prViewResponse = gh pr view $pullRequestNumber --json headRefName,author,title | ConvertFrom-Json
|
||||
|
||||
if ($prViewResponse.author.login -ne $botUserName)
|
||||
{
|
||||
throw 'PR author was unexpected'
|
||||
}
|
||||
|
||||
$match = [regex]::Match($prViewResponse.title, '^\[release\] Prepare release (.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse tag from PR title'
|
||||
}
|
||||
|
||||
$tag = $match.Groups[1].Value
|
||||
|
||||
$match = [regex]::Match($tag, '^(.*?-)(.*)$')
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not parse prefix or version from tag'
|
||||
}
|
||||
|
||||
$tagPrefix = $match.Groups[1].Value
|
||||
$version = $match.Groups[2].Value
|
||||
$isPrerelease = $version -match '-alpha' -or $version -match '-beta' -or $version -match '-rc'
|
||||
|
||||
$commentUserPermission = gh api "repos/$gitRepository/collaborators/$commentUserName/permission" | ConvertFrom-Json
|
||||
if ($commentUserPermission.permission -ne 'admin' -and $commentUserPermission.permission -ne 'write')
|
||||
{
|
||||
gh pr comment $pullRequestNumber `
|
||||
--body "I'm sorry @$commentUserName but you don't have permission to update this PR. Only maintainers and approvers can update this PR."
|
||||
return
|
||||
}
|
||||
|
||||
if ($tagPrefix -ne 'core-' -or $isPrerelease -eq $true)
|
||||
{
|
||||
gh pr comment $pullRequestNumber `
|
||||
--body "I'm sorry @$commentUserName but we don't typically add release notes for prereleases or unstable packages."
|
||||
return
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrEmpty($gitUserName) -eq $false)
|
||||
{
|
||||
git config user.name $gitUserName
|
||||
}
|
||||
if ([string]::IsNullOrEmpty($gitUserEmail) -eq $false)
|
||||
{
|
||||
git config user.email $gitUserEmail
|
||||
}
|
||||
|
||||
git switch $prViewResponse.headRefName 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git switch failure'
|
||||
}
|
||||
|
||||
$releaseNotesContent = (Get-Content -Path "RELEASENOTES.md" -Raw)
|
||||
|
||||
$match = [regex]::Match($commentBody, '[\w\W\s]*\/UpdateReleaseNotes.*$([\w\W\s]*)', [Text.RegularExpressions.RegexOptions]::Multiline)
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not find release notes content'
|
||||
}
|
||||
|
||||
$content = $match.Groups[1].Value.Trim() -replace "`r`n", "`n"
|
||||
|
||||
$body =
|
||||
@"
|
||||
## $version
|
||||
|
||||
Release details: [$version](https://github.com/$gitRepository/releases/tag/$tagPrefix$version)
|
||||
|
||||
$content
|
||||
|
||||
##
|
||||
"@
|
||||
|
||||
$match = [regex]::Match($releaseNotesContent, "(## $version[\w\W\s]*?)##", [Text.RegularExpressions.RegexOptions]::Multiline)
|
||||
if ($match.Success -eq $true)
|
||||
{
|
||||
$content = [regex]::Replace($releaseNotesContent, "(## $version[\w\W\s]*?)##", $body, [Text.RegularExpressions.RegexOptions]::Multiline)
|
||||
Set-Content -Path "RELEASENOTES.md" -Value $content.TrimEnd()
|
||||
}
|
||||
else {
|
||||
$match = [regex]::Match($releaseNotesContent, '(# Release Notes[\w\W\s]*?)##', [Text.RegularExpressions.RegexOptions]::Multiline)
|
||||
if ($match.Success -eq $false)
|
||||
{
|
||||
throw 'Could not find release notes header'
|
||||
}
|
||||
|
||||
$body = $match.Groups[1].Value + $body
|
||||
$content = [regex]::Replace($releaseNotesContent, '(# Release Notes[\w\W\s]*?)##', $body, [Text.RegularExpressions.RegexOptions]::Multiline)
|
||||
Set-Content -Path "RELEASENOTES.md" -Value $content.TrimEnd()
|
||||
}
|
||||
|
||||
git commit -a -m "Update RELEASENOTES for $tag." 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git commit failure'
|
||||
}
|
||||
|
||||
git push -u origin $prViewResponse.headRefName 2>&1 | % ToString
|
||||
if ($LASTEXITCODE -gt 0)
|
||||
{
|
||||
throw 'git push failure'
|
||||
}
|
||||
|
||||
gh pr comment $pullRequestNumber --body "I updated ``RELEASENOTES.md``."
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function UpdateReleaseNotesAndPostNoticeOnPullRequest
|
|
@ -0,0 +1,49 @@
|
|||
param([string]$targetNetFramework)
|
||||
|
||||
$rootDirectory = Get-Location
|
||||
|
||||
$publishOutput = dotnet publish $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj --framework $targetNetFramework -nodeReuse:false /p:UseSharedCompilation=false /p:ExposeExperimentalFeatures=true
|
||||
|
||||
$actualWarningCount = 0
|
||||
|
||||
foreach ($line in $($publishOutput -split "`r`n"))
|
||||
{
|
||||
if (($line -like "*analysis warning IL*") -or ($line -like "*analysis error IL*"))
|
||||
{
|
||||
Write-Host $line
|
||||
$actualWarningCount += 1
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Actual warning count is:", $actualWarningCount
|
||||
$expectedWarningCount = 0
|
||||
|
||||
if ($LastExitCode -ne 0)
|
||||
{
|
||||
Write-Host "There was an error while publishing AotCompatibility Test App. LastExitCode is:", $LastExitCode
|
||||
Write-Host $publishOutput
|
||||
}
|
||||
|
||||
$app = $IsWindows ? "./OpenTelemetry.AotCompatibility.TestApp.exe" : "./OpenTelemetry.AotCompatibility.TestApp"
|
||||
|
||||
Push-Location $rootDirectory/artifacts/publish/OpenTelemetry.AotCompatibility.TestApp/release_$targetNetFramework
|
||||
|
||||
Write-Host "Executing test App..."
|
||||
$app
|
||||
Write-Host "Finished executing test App"
|
||||
|
||||
if ($LastExitCode -ne 0)
|
||||
{
|
||||
Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
|
||||
$testPassed = 0
|
||||
if ($actualWarningCount -ne $expectedWarningCount)
|
||||
{
|
||||
$testPassed = 1
|
||||
Write-Host "Actual warning count:", $actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount
|
||||
}
|
||||
|
||||
Exit $testPassed
|
|
@ -0,0 +1,51 @@
|
|||
param(
|
||||
[Parameter()][string]$coyoteVersion="1.7.11",
|
||||
[Parameter(Mandatory=$true)][string]$testProjectName,
|
||||
[Parameter(Mandatory=$true)][string]$targetFramework,
|
||||
[Parameter()][string]$categoryName="CoyoteConcurrencyTests",
|
||||
[Parameter()][string]$configuration="Release"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$env:OTEL_RUN_COYOTE_TESTS = 'true'
|
||||
|
||||
$rootDirectory = Get-Location
|
||||
|
||||
Write-Host "Install Coyote CLI."
|
||||
dotnet tool install --global Microsoft.Coyote.CLI --version $coyoteVersion
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Microsoft.Coyote.CLI installation failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Write-Host "Build $testProjectName project."
|
||||
dotnet build "$rootDirectory/test/$testProjectName/$testProjectName.csproj" --configuration $configuration
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "dotnet build failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
$artifactsPath = Join-Path $rootDirectory "artifacts/bin/$testProjectName/$($configuration.ToLowerInvariant())_$targetFramework"
|
||||
|
||||
Write-Host "Generate Coyote rewriting options JSON file."
|
||||
$assemblies = Get-ChildItem $artifactsPath -Filter OpenTelemetry*.dll | ForEach-Object {$_.Name}
|
||||
|
||||
$RewriteOptionsJson = @{}
|
||||
[void]$RewriteOptionsJson.Add("AssembliesPath", $artifactsPath)
|
||||
[void]$RewriteOptionsJson.Add("Assemblies", $assemblies)
|
||||
$RewriteOptionsJson | ConvertTo-Json -Compress | Set-Content -Path "$rootDirectory/test/$testProjectName/rewrite.coyote.json"
|
||||
|
||||
Write-Host "Run Coyote rewrite."
|
||||
coyote rewrite "$rootDirectory/test/$testProjectName/rewrite.coyote.json"
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "coyote rewrite failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Write-Host "Execute re-written binary."
|
||||
dotnet test "$artifactsPath/$testProjectName.dll" --framework $targetFramework --filter CategoryName=$categoryName
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "dotnet test failed with exit code $LASTEXITCODE"
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
param(
|
||||
[Parameter(Mandatory=$true)][string]$minVerTagPrefix,
|
||||
[Parameter(Mandatory=$true)][string]$version
|
||||
)
|
||||
|
||||
$projectDirs = Get-ChildItem -Path src/**/*.csproj | Select-String "<MinVerTagPrefix>$minVerTagPrefix</MinVerTagPrefix>" -List | Select Path | Split-Path -Parent
|
||||
|
||||
$content = "Unreleased
|
||||
|
||||
## $version
|
||||
|
||||
Released $(Get-Date -UFormat '%Y-%b-%d')"
|
||||
|
||||
foreach ($projectDir in $projectDirs) {
|
||||
$path = Join-Path -Path $projectDir -ChildPath "CHANGELOG.md"
|
||||
|
||||
Write-Host "Updating $path"
|
||||
|
||||
(Get-Content -Path $path) -replace "Unreleased", $content | Set-Content -Path $path
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||
"settings": {
|
||||
"documentationRules": {
|
||||
"companyName": "OpenTelemetry Authors",
|
||||
"copyrightText": "Copyright The OpenTelemetry Authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License."
|
||||
"copyrightText": "Copyright The OpenTelemetry Authors\nSPDX-License-Identifier: Apache-2.0",
|
||||
"xmlHeader": false
|
||||
},
|
||||
"orderingRules": {
|
||||
"usingDirectivesPlacement": "outsideNamespace"
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
param([string]$targetNetFramework)
|
||||
|
||||
$rootDirectory = Split-Path $PSScriptRoot -Parent
|
||||
$publishOutput = dotnet publish $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/OpenTelemetry.AotCompatibility.TestApp.csproj -nodeReuse:false /p:UseSharedCompilation=false /p:ExposeExperimentalFeatures=true
|
||||
|
||||
$actualWarningCount = 0
|
||||
|
||||
foreach ($line in $($publishOutput -split "`r`n"))
|
||||
{
|
||||
if ($line -like "*analysis warning IL*")
|
||||
{
|
||||
Write-Host $line
|
||||
|
||||
$actualWarningCount += 1
|
||||
}
|
||||
}
|
||||
|
||||
pushd $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Debug/$targetNetFramework/linux-x64
|
||||
|
||||
Write-Host "Executing test App..."
|
||||
./OpenTelemetry.AotCompatibility.TestApp
|
||||
Write-Host "Finished executing test App"
|
||||
|
||||
if ($LastExitCode -ne 0)
|
||||
{
|
||||
Write-Host "There was an error while executing AotCompatibility Test App. LastExitCode is:", $LastExitCode
|
||||
}
|
||||
|
||||
popd
|
||||
|
||||
Write-Host "Actual warning count is:", $actualWarningCount
|
||||
$expectedWarningCount = 16
|
||||
|
||||
$testPassed = 0
|
||||
if ($actualWarningCount -ne $expectedWarningCount)
|
||||
{
|
||||
$testPassed = 1
|
||||
Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount
|
||||
}
|
||||
|
||||
Exit $testPassed
|
|
@ -1,12 +1,11 @@
|
|||
<Project>
|
||||
<Import Project="$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), '..', 'Directory.Build.props'))" />
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Common.nonprod.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<!-- https://dotnet.microsoft.com/download/dotnet-core -->
|
||||
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
|
||||
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
|
||||
<!-- https://dotnet.microsoft.com/download/dotnet-framework -->
|
||||
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net462;net47;net471;net472;net48</TargetFrameworks>
|
||||
<TargetFrameworks>$(TargetFrameworksForDocs)</TargetFrameworks>
|
||||
<!-- Opt-out of Artifacts Output for docs as there are duplicated project names -->
|
||||
<UseArtifactsOutput>false</UseArtifactsOutput>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
<Project>
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Packages.props, $(MSBuildThisFileDirectory)..))" />
|
||||
<ItemGroup>
|
||||
<PackageVersion Update="Microsoft.Extensions.Logging" Version="[6.0.0,)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
# OpenTelemetry .NET SDK
|
||||
|
||||
## Initialize the SDK
|
||||
|
||||
There are two different common initialization styles supported by OpenTelemetry.
|
||||
|
||||
### Initialize the SDK using a host
|
||||
|
||||
Users building applications based on
|
||||
[Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting)
|
||||
should utilize the
|
||||
[OpenTelemetry.Extensions.Hosting](../src/OpenTelemetry.Extensions.Hosting/README.md)
|
||||
package to initialize OpenTelemetry. This style provides a deep integration
|
||||
between the host infrastructure (`IServiceCollection`, `IServiceProvider`,
|
||||
`IConfiguration`, etc.) and OpenTelemetry.
|
||||
|
||||
[AspNetCore](https://learn.microsoft.com/aspnet/core/fundamentals/host/web-host)
|
||||
applications are the most common to use the hosting model but there is also a
|
||||
[Generic Host](https://learn.microsoft.com/dotnet/core/extensions/generic-host)
|
||||
which may be used in console, service, and worker applications.
|
||||
|
||||
> [!NOTE]
|
||||
> When using `OpenTelemetry.Extensions.Hosting` only a single pipeline will be
|
||||
> created for each configured signal (logging, metrics, and/or tracing). Users
|
||||
> who need more granular control can create additional pipelines using the
|
||||
> manual style below.
|
||||
|
||||
First install the
|
||||
[OpenTelemetry.Extensions.Hosting](../src/OpenTelemetry.Extensions.Hosting/README.md)
|
||||
package.
|
||||
|
||||
Second call the `AddOpenTelemetry` extension using the host
|
||||
`IServiceCollection`:
|
||||
|
||||
```csharp
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Clear the default logging providers added by the host
|
||||
builder.Logging.ClearProviders();
|
||||
|
||||
// Initialize OpenTelemetry
|
||||
builder.Services.AddOpenTelemetry()
|
||||
.ConfigureResource(resource => /* Resource configuration goes here */)
|
||||
.WithLogging(logging => /* Logging configuration goes here */)
|
||||
.WithMetrics(metrics => /* Metrics configuration goes here */)
|
||||
.WithTracing(tracing => /* Tracing configuration goes here */));
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Calling `WithLogging` automatically registers the OpenTelemetry
|
||||
> `ILoggerProvider` and enables `ILogger` integration.
|
||||
|
||||
### Initialize the SDK manually
|
||||
|
||||
Users running on .NET Framework or running without a host may initialize
|
||||
OpenTelemetry manually.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> When initializing OpenTelemetry manually make sure to ALWAYS dispose the SDK
|
||||
> and/or providers when the application is shutting down. Disposing
|
||||
> OpenTelemetry gives the SDK a chance to flush any telemetry held in memory.
|
||||
> Skipping this step may result in data loss.
|
||||
|
||||
First install the [OpenTelemetry SDK](../src/OpenTelemetry/README.md) package or
|
||||
an exporter package such as
|
||||
[OpenTelemetry.Exporter.OpenTelemetryProtocol](../src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md).
|
||||
Exporter packages typically reference the SDK and will make it available via
|
||||
transitive reference.
|
||||
|
||||
Second use one of the following initialization APIs (depending on the SDK
|
||||
version being used):
|
||||
|
||||
#### Using 1.10.0 or newer
|
||||
|
||||
The `OpenTelemetrySdk.Create` API can be used to initialize all signals off a
|
||||
single root builder and supports cross-cutting extensions such as
|
||||
`ConfigureResource` which configures a `Resource` to be used by all enabled
|
||||
signals. An `OpenTelemetrySdk` instance is returned which may be used to access
|
||||
providers for each signal. Calling `Dispose` on the returned instance will
|
||||
gracefully shutdown the SDK and flush any telemetry held in memory.
|
||||
|
||||
> [!NOTE]
|
||||
> When calling `OpenTelemetrySdk.Create` a dedicated `IServiceCollection` and
|
||||
> `IServiceProvider` will be created for the SDK and shared by all signals. An
|
||||
> `IConfiguration` is created automatically from environment variables.
|
||||
|
||||
```csharp
|
||||
using OpenTelemetry;
|
||||
|
||||
var sdk = OpenTelemetrySdk.Create(builder => builder
|
||||
.ConfigureResource(resource => /* Resource configuration goes here */)
|
||||
.WithLogging(logging => /* Logging configuration goes here */)
|
||||
.WithMetrics(metrics => /* Metrics configuration goes here */)
|
||||
.WithTracing(tracing => /* Tracing configuration goes here */));
|
||||
|
||||
// During application shutdown
|
||||
sdk.Dispose();
|
||||
```
|
||||
|
||||
To obtain an `ILogger` instance for emitting logs when using the
|
||||
`OpenTelemetrySdk.Create` API call the `GetLoggerFactory` extension method using
|
||||
the returned `OpenTelemetrySdk` instance:
|
||||
|
||||
```csharp
|
||||
var logger = sdk.GetLoggerFactory().CreateLogger<Program>();
|
||||
logger.LogInformation("Application started");
|
||||
```
|
||||
|
||||
#### Using 1.9.0 or older
|
||||
|
||||
The following shows how to create providers for each individual signal. Each
|
||||
provider is independent and must be managed and disposed explicitly. There is no
|
||||
mechanism using this style to perform cross-cutting actions across signals.
|
||||
|
||||
```csharp
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OpenTelemetry;
|
||||
|
||||
var tracerProvider = Sdk.CreateTracerProviderBuilder()
|
||||
/* Tracing configuration goes here */
|
||||
.Build();
|
||||
|
||||
var meterProvider = Sdk.CreateMeterProviderBuilder()
|
||||
/* Metrics configuration goes here */
|
||||
.Build();
|
||||
|
||||
var loggerFactory = LoggerFactory.Create(builder => builder
|
||||
.AddOpenTelemetry(options => /* Logging configuration goes here */));
|
||||
|
||||
// During application shutdown
|
||||
tracerProvider.Dispose();
|
||||
meterProvider.Dispose();
|
||||
loggerFactory.Dispose();
|
||||
```
|
|
@ -0,0 +1,24 @@
|
|||
# OpenTelemetry Diagnostics
|
||||
|
||||
This document describes the diagnostic categories used in OpenTelemetry .NET
|
||||
components. Diagnostics are used by the compiler to report information to users
|
||||
about experimental and/or obsolete code being invoked or to suggest improvements
|
||||
to specific code patterns identified through static analysis.
|
||||
|
||||
## Experimental APIs
|
||||
|
||||
Range: OTEL1000 - OTEL1999
|
||||
|
||||
Experimental APIs exposed in OpenTelemetry .NET pre-relase builds. APIs are
|
||||
exposed experimentally when either the OpenTelemetry Specification has
|
||||
explicitly marked some feature as
|
||||
[experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/document-status.md)
|
||||
or when the SIG members are still working through the design for a feature and
|
||||
want to solicit feedback from the community.
|
||||
|
||||
> [!NOTE]
|
||||
> Experimental APIs are exposed as `public` in pre-release builds and `internal`
|
||||
in stable builds.
|
||||
|
||||
For defined diagnostics see: [OpenTelemetry .NET Experimental
|
||||
APIs](./experimental-apis/README.md)
|
|
@ -0,0 +1,48 @@
|
|||
# OpenTelemetry .NET Diagnostic: OTEL1000
|
||||
|
||||
## Overview
|
||||
|
||||
This is an Experimental API diagnostic covering the following APIs:
|
||||
|
||||
* `ILoggingBuilder.UseOpenTelemetry`
|
||||
|
||||
Experimental APIs may be changed or removed in the future.
|
||||
|
||||
The following portions of `OTEL1000` were released stable in `1.9.0` and are no
|
||||
longer considered experimental:
|
||||
|
||||
* `LoggerProviderBuilder`
|
||||
* `LoggerProvider`
|
||||
* `IDeferredLoggerProviderBuilder`
|
||||
* `OpenTelemetryBuilder.WithLogging`
|
||||
|
||||
## Details
|
||||
|
||||
The OpenTelemetry Specification defines a `LoggerProvider` as part of its
|
||||
[API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md)
|
||||
&
|
||||
[SDK](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md)
|
||||
components.
|
||||
|
||||
The SDK allows calling `Shutdown` and `ForceFlush` on the `LoggerProvider` and
|
||||
also allows processors to be added dynamically to a pipeline after its creation.
|
||||
|
||||
Today the OpenTelemetry .NET log pipeline is built on top of the
|
||||
Microsoft.Extensions.Logging `ILogger` \ `ILoggerProvider` \ `ILoggerFactory`
|
||||
APIs which do not expose such features.
|
||||
|
||||
We also have an issue with the `ILoggingBuilder.AddOpenTelemetry` API in that it
|
||||
interacts with the `OpenTelemetryLoggerOptions` class. Options classes are NOT
|
||||
available until the `IServiceProvider` is available and services can no longer
|
||||
be registered at that point. This prevents the current logging pipeline from
|
||||
exposing the same dependency injection surface we have for traces and metrics.
|
||||
|
||||
We are exposing these APIs to solve these issues and gather feedback about their
|
||||
usefulness.
|
||||
|
||||
## Logs Bridge API
|
||||
|
||||
The OpenTelemetry Specification defines a Logs Bridge API which is rooted off of
|
||||
the `LoggerProvider` (`GetLogger`) and exposes a `Logger` API to submit log
|
||||
records. See [OTEL1001](./OTEL1001.md) for details about the Logs Bridge API
|
||||
implementation status.
|
|
@ -0,0 +1,36 @@
|
|||
# OpenTelemetry .NET Diagnostic: OTEL1001
|
||||
|
||||
## Overview
|
||||
|
||||
This is an Experimental API diagnostic covering the following APIs:
|
||||
|
||||
* `LoggerProvider.GetLogger`
|
||||
* `Logger`
|
||||
* `LogRecordAttributeList`
|
||||
* `LogRecordData`
|
||||
* `LogRecordSeverity`
|
||||
* `Sdk.CreateLoggerProviderBuilder`
|
||||
|
||||
Experimental APIs may be changed or removed in the future.
|
||||
|
||||
## Details
|
||||
|
||||
The OpenTelemetry Specification defines a [Logs Bridge
|
||||
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md).
|
||||
|
||||
The Logs Bridge API is used by library authors to build log appenders which
|
||||
route messages from different log frameworks into OpenTelemetry.
|
||||
|
||||
Today the OpenTelemetry .NET log pipeline is built on top of the
|
||||
Microsoft.Extensions.Logging `ILogger` \ `ILoggerProvider` \ `ILoggerFactory`
|
||||
APIs.
|
||||
|
||||
We are exposing these APIs gather feedback about their usefulness. An
|
||||
alternative approach may be taken which would be to append into `ILogger`
|
||||
instead of OpenTelemetry directly.
|
||||
|
||||
## LoggerProvider API
|
||||
|
||||
The OpenTelemetry Specification defines a `LoggerProvider` API. See
|
||||
[OTEL1000](./OTEL1000.md) for details about the `LoggerProvider` implementation
|
||||
status.
|
|
@ -0,0 +1,62 @@
|
|||
# OpenTelemetry .NET Diagnostic: OTEL1004
|
||||
|
||||
## Overview
|
||||
|
||||
This is an Experimental API diagnostic covering the following APIs:
|
||||
|
||||
* `ExemplarReservoir`
|
||||
* `FixedSizeExemplarReservoir`
|
||||
* `ExemplarMeasurement<T>`
|
||||
* `MetricStreamConfiguration.ExemplarReservoirFactory.get`
|
||||
* `MetricStreamConfiguration.ExemplarReservoirFactory.set`
|
||||
|
||||
Experimental APIs may be changed or removed in the future.
|
||||
|
||||
## Details
|
||||
|
||||
The OpenTelemetry Specification defines an [ExemplarReservoir
|
||||
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplarreservoir)
|
||||
and a mechanism for configuring `ExemplarReservoir` via the [View
|
||||
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#stream-configuration)
|
||||
in the Metrics SDK.
|
||||
|
||||
From the specification:
|
||||
|
||||
> The SDK MUST provide a mechanism for SDK users to provide their own
|
||||
> ExemplarReservoir implementation. This extension MUST be configurable on a
|
||||
> metric View, although individual reservoirs MUST still be instantiated per
|
||||
> metric-timeseries...
|
||||
|
||||
We are exposing these APIs experimentally for the following reasons:
|
||||
|
||||
* `FixedSizeExemplarReservoir` is not part of the spec. It is meant to help
|
||||
custom reservoir authors and takes care of correctly creating & updating
|
||||
`struct Exemplar`s (managing tag filtering when views are used), handles
|
||||
`Exemplar` collection, and ensures all operations are safe to be called
|
||||
concurrency (spec requirement). We want to see if this is helpful and meets
|
||||
the needs of users.
|
||||
|
||||
* There is currently no way to use
|
||||
`MetricStreamConfiguration.ExemplarReservoirFactory` to switch a metric to a
|
||||
different built-in reservoir (`AlignedHistogramBucketExemplarReservoir` or
|
||||
`SimpleFixedSizeExemplarReservoir`). This is something supported by the spec
|
||||
but we want to understand the use cases and needs before exposing these types.
|
||||
Also it seems the default reservoirs may change.
|
||||
|
||||
* There is currently no way to get access to the bucket index inside a reservoir
|
||||
when a measurement is recorded against a histogram with explicit bounds. The
|
||||
spec says the reservoir should calculate this given the
|
||||
definition/configuration of the bounds but the SDK has already done this
|
||||
computation. It seems unncessarily complicated to expose the configuration and
|
||||
wasteful to do the work twice. We want to understand the types of algorithms
|
||||
which users will want to implement before exposing something.
|
||||
|
||||
**TL;DR** We want to gather feedback on the usability of the API and for the
|
||||
need(s) in general for custom reservoirs before exposing a stable API.
|
||||
|
||||
## Provide feedback
|
||||
|
||||
Please provide feedback on [this
|
||||
issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/5629) if
|
||||
you need stable support for custom `ExemplarReservoir`s. The feedback will help
|
||||
inform decisions about what to expose stable and when.
|
|
@ -0,0 +1,62 @@
|
|||
# OpenTelemetry .NET Experimental APIs
|
||||
|
||||
This document describes experimental APIs exposed in OpenTelemetry .NET
|
||||
pre-relase builds. APIs are exposed experimentally when either the OpenTelemetry
|
||||
Specification has explicitly marked some feature as
|
||||
[experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/document-status.md)
|
||||
or when the SIG members are still working through the design for a feature and
|
||||
want to solicit feedback from the community.
|
||||
|
||||
> [!NOTE]
|
||||
> Experimental APIs are exposed as `public` in pre-release builds and `internal`
|
||||
in stable builds.
|
||||
|
||||
## Active
|
||||
|
||||
Experimental APIs available in the pre-release builds:
|
||||
|
||||
### OTEL1000
|
||||
|
||||
Description: `LoggerProvider` and `LoggerProviderBuilder`
|
||||
|
||||
Details: [OTEL1000](./OTEL1000.md)
|
||||
|
||||
### OTEL1001
|
||||
|
||||
Description: Logs Bridge API
|
||||
|
||||
Details: [OTEL1001](./OTEL1001.md)
|
||||
|
||||
### OTEL1004
|
||||
|
||||
Description: ExemplarReservoir Support
|
||||
|
||||
Details: [OTEL1004](./OTEL1004.md)
|
||||
|
||||
## Inactive
|
||||
|
||||
Experimental APIs which have been released stable or removed:
|
||||
|
||||
<!-- When an experimental API is released or removed:
|
||||
1) Move the section from above down here.
|
||||
2) Delete the individual file from the repo and switch the link here to a
|
||||
permalink to the last version.
|
||||
3) Add the version info for when the API was released stable or removed. If
|
||||
removed add details for alternative solution or reasoning.
|
||||
-->
|
||||
|
||||
### OTEL1002
|
||||
|
||||
Description: Metrics Exemplar Support
|
||||
|
||||
Details: [OTEL1002](https://github.com/open-telemetry/opentelemetry-dotnet/blob/b8ea807bae1a5d9b0f3d6d23b1e1e10f5e096a25/docs/diagnostics/experimental-apis/OTEL1002.md)
|
||||
|
||||
Released stable: `1.9.0`
|
||||
|
||||
### OTEL1003
|
||||
|
||||
Description: MetricStreamConfiguration CardinalityLimit Support
|
||||
|
||||
Details: [OTEL1003](https://github.com/open-telemetry/opentelemetry-dotnet/blob/9f41eadf03f3dcc5e76c686b61fb39849f046312/docs/diagnostics/experimental-apis/OTEL1003.md)
|
||||
|
||||
Released stable: `1.10.0`
|
|
@ -29,7 +29,10 @@
|
|||
{
|
||||
"files": [
|
||||
".editorconfig",
|
||||
"**.cs"
|
||||
"**.cs",
|
||||
"Directory.Packages.props",
|
||||
"LICENSE.TXT",
|
||||
"THIRD-PARTY-NOTICES.TXT"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -0,0 +1,383 @@
|
|||
# OpenTelemetry .NET Logs
|
||||
|
||||
<details>
|
||||
<summary>Table of Contents</summary>
|
||||
|
||||
* [Best Practices](#best-practices)
|
||||
* [Package Version](#package-version)
|
||||
* [Logging API](#logging-api)
|
||||
* [ILogger](#ilogger)
|
||||
* [LoggerFactory](#loggerfactory)
|
||||
* [Log Correlation](#log-correlation)
|
||||
* [Log Enrichment](#log-enrichment)
|
||||
* [Log Filtering](#log-filtering)
|
||||
* [Log Redaction](#log-redaction)
|
||||
|
||||
</details>
|
||||
|
||||
## Best Practices
|
||||
|
||||
The following tutorials have demonstrated the best practices for logging with
|
||||
OpenTelemetry .NET:
|
||||
|
||||
* [Getting Started - ASP.NET Core
|
||||
Application](./getting-started-aspnetcore/README.md)
|
||||
* [Getting Started - Console Application](./getting-started-console/README.md)
|
||||
* [Logging with Complex Objects](./complex-objects/README.md)
|
||||
|
||||
## Logging API
|
||||
|
||||
### ILogger
|
||||
|
||||
.NET supports high performance, structured logging via the
|
||||
[`Microsoft.Extensions.Logging.ILogger`](https://docs.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger)
|
||||
interface (including
|
||||
[`ILogger<TCategoryName>`](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger-1))
|
||||
to help monitor application behavior and diagnose issues.
|
||||
|
||||
#### Package Version
|
||||
|
||||
:heavy_check_mark: You should always use the
|
||||
[`ILogger`](https://docs.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger)
|
||||
interface (including
|
||||
[`ILogger<TCategoryName>`](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger-1))
|
||||
from the latest stable version of
|
||||
[Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging/)
|
||||
package, regardless of the .NET runtime version being used:
|
||||
|
||||
* If you are using the latest stable version of [OpenTelemetry .NET
|
||||
SDK](../../src/OpenTelemetry/README.md), you do not have to worry about the
|
||||
version of `Microsoft.Extensions.Logging` package because it is already taken
|
||||
care of for you via [package dependency](../../Directory.Packages.props).
|
||||
* Starting from version `3.1.0`, the .NET runtime team is holding a high bar for
|
||||
backward compatibility on `Microsoft.Extensions.Logging` even during major
|
||||
version bumps, so compatibility is not a concern here.
|
||||
|
||||
#### Get Logger
|
||||
|
||||
In order to use the `ILogger` interface, you need to first get a logger. How to
|
||||
get a logger depends on two things:
|
||||
|
||||
* The type of application you are building.
|
||||
* The place where you want to log.
|
||||
|
||||
Here is the rule of thumb:
|
||||
|
||||
* If you are building an application with [dependency injection
|
||||
(DI)](https://learn.microsoft.com/dotnet/core/extensions/dependency-injection)
|
||||
(e.g. [ASP.NET Core](https://learn.microsoft.com/aspnet/core) and [.NET
|
||||
Worker](https://learn.microsoft.com/dotnet/core/extensions/workers)), in most
|
||||
cases you should use the logger provided by DI, there are special cases when
|
||||
you want log before DI logging pipeline is available or after DI logging
|
||||
pipeline is disposed. Refer to the [.NET official
|
||||
document](https://learn.microsoft.com/dotnet/core/extensions/logging#integration-with-hosts-and-dependency-injection)
|
||||
and [Getting Started with OpenTelemetry .NET Logs in 5 Minutes - ASP.NET Core
|
||||
Application](./getting-started-aspnetcore/README.md) tutorial to learn more.
|
||||
* If you are building an application without DI, create a
|
||||
[LoggerFactory](#loggerfactory) instance and configure OpenTelemetry to work
|
||||
with it. Refer to the [Getting Started with OpenTelemetry .NET Logs in 5
|
||||
Minutes - Console Application](./getting-started-console/README.md) tutorial
|
||||
to learn more.
|
||||
|
||||
:heavy_check_mark: You should use dot-separated
|
||||
[UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case) as the log category
|
||||
name, which makes it convenient to [filter logs](#log-filtering). A common
|
||||
practice is to use fully qualified class name, and if further categorization is
|
||||
desired, append a subcategory name. Refer to the [.NET official
|
||||
document](https://learn.microsoft.com/dotnet/core/extensions/logging#log-category)
|
||||
to learn more.
|
||||
|
||||
```csharp
|
||||
loggerFactory.CreateLogger<MyClass>(); // this is equivalent to CreateLogger("MyProduct.MyLibrary.MyClass")
|
||||
loggerFactory.CreateLogger("MyProduct.MyLibrary.MyClass"); // use the fully qualified class name
|
||||
loggerFactory.CreateLogger("MyProduct.MyLibrary.MyClass.DatabaseOperations"); // append a subcategory name
|
||||
loggerFactory.CreateLogger("MyProduct.MyLibrary.MyClass.FileOperations"); // append another subcategory name
|
||||
```
|
||||
|
||||
:stop_sign: You should avoid creating loggers too frequently. Although loggers
|
||||
are not super expensive, they still come with CPU and memory cost, and are meant
|
||||
to be reused throughout the application. Refer to the [logging performance
|
||||
benchmark](../../test/Benchmarks/Logs/LogBenchmarks.cs) for more details.
|
||||
|
||||
#### Write log messages
|
||||
|
||||
:heavy_check_mark: You should use structured logging.
|
||||
|
||||
* Structured logging is more efficient than unstructured logging.
|
||||
* Filtering and redaction can happen on individual key-value pairs instead of
|
||||
the entire log message.
|
||||
* Storage and indexing are more efficient.
|
||||
* Structured logging makes it easier to manage and consume logs.
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
logger.LogInformation("Hello from {food} {price}.", food, price);
|
||||
```
|
||||
|
||||
:stop_sign: You should avoid string interpolation.
|
||||
|
||||
> [!WARNING]
|
||||
> The following code has bad performance due to [string
|
||||
interpolation](https://learn.microsoft.com/dotnet/csharp/tutorials/string-interpolation):
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
logger.LogInformation($"Hello from {food} {price}.");
|
||||
```
|
||||
|
||||
Refer to the [logging performance
|
||||
benchmark](../../test/Benchmarks/Logs/LogBenchmarks.cs) for more details.
|
||||
|
||||
:heavy_check_mark: You should use [compile-time logging source
|
||||
generation](https://docs.microsoft.com/dotnet/core/extensions/logger-message-generator)
|
||||
pattern to achieve the best performance.
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
logger.SayHello(food, price);
|
||||
|
||||
internal static partial class LoggerExtensions
|
||||
{
|
||||
[LoggerMessage(Level = LogLevel.Information, Message = "Hello from {food} {price}.")]
|
||||
public static partial void SayHello(this ILogger logger, string food, double price);
|
||||
}
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> There is no need to pass in an explicit
|
||||
[EventId](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.eventid)
|
||||
while using
|
||||
[LoggerMessageAttribute](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.loggermessageattribute).
|
||||
A durable `EventId` will be automatically assigned based on the hash of the
|
||||
method name during code generation.
|
||||
|
||||
:heavy_check_mark: You can use
|
||||
[LogPropertiesAttribute](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.logpropertiesattribute)
|
||||
from
|
||||
[Microsoft.Extensions.Telemetry.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Telemetry.Abstractions/)
|
||||
if you need to log complex objects. Check out the [Logging with Complex
|
||||
Objects](./complex-objects/README.md) tutorial for more details.
|
||||
|
||||
:stop_sign: You should avoid the extension methods from
|
||||
[LoggerExtensions](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.loggerextensions),
|
||||
these methods are not optimized for performance.
|
||||
|
||||
> [!WARNING]
|
||||
> The following code has bad performance due to
|
||||
[boxing](https://learn.microsoft.com/dotnet/csharp/programming-guide/types/boxing-and-unboxing):
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
logger.LogInformation("Hello from {food} {price}.", food, price);
|
||||
```
|
||||
|
||||
Refer to the [logging performance
|
||||
benchmark](../../test/Benchmarks/Logs/LogBenchmarks.cs) for more details.
|
||||
|
||||
:heavy_check_mark: You should hold a high bar while using
|
||||
[`ILogger.IsEnabled`](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger.isenabled).
|
||||
|
||||
The logging API is highly optimized for the scenario where most loggers are
|
||||
**disabled** for certain log levels. Making an extra call to `IsEnabled` before
|
||||
logging will not give you any performance gain.
|
||||
|
||||
> [!WARNING]
|
||||
> The `logger.IsEnabled(LogLevel.Information)` call in the following code is not
|
||||
going to give any performance gain. Refer to the [logging performance
|
||||
benchmark](../../test/Benchmarks/Logs/LogBenchmarks.cs) for more details.
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
if (logger.IsEnabled(LogLevel.Information)) // do not do this, there is no perf gain
|
||||
{
|
||||
logger.SayHello(food, price);
|
||||
}
|
||||
|
||||
internal static partial class LoggerExtensions
|
||||
{
|
||||
[LoggerMessage(Level = LogLevel.Information, Message = "Hello from {food} {price}.")]
|
||||
public static partial void SayHello(this ILogger logger, string food, double price);
|
||||
}
|
||||
```
|
||||
|
||||
`IsEnabled` can give performance benefits when it is expensive to evaluate the
|
||||
arguments. For example, in the following code the `Database.GetFoodPrice`
|
||||
invocation will be skipped if the logger is not enabled:
|
||||
|
||||
```csharp
|
||||
if (logger.IsEnabled(LogLevel.Information))
|
||||
{
|
||||
logger.SayHello(food, Database.GetFoodPrice(food));
|
||||
}
|
||||
```
|
||||
|
||||
Although `IsEnabled` can give some performance benefits in the above scenario,
|
||||
for most users it can cause more problems. For example, the performance of the
|
||||
code is now depending on which logger is being enabled, not to mention the
|
||||
argument evaluation might have significant side effects that are now depending
|
||||
on the logging configuration.
|
||||
|
||||
:heavy_check_mark: You should use a dedicated parameter to log exceptions when
|
||||
using the compile-time source generator.
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
try
|
||||
{
|
||||
// Execute some logic
|
||||
|
||||
logger.SayHello(food, price);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.SayHelloFailure(ex, food, price);
|
||||
}
|
||||
|
||||
internal static partial class LoggerExtensions
|
||||
{
|
||||
[LoggerMessage(Level = LogLevel.Information, Message = "Hello from {food} {price}.")]
|
||||
public static partial void SayHello(this ILogger logger, string food, double price);
|
||||
|
||||
[LoggerMessage(Level = LogLevel.Error, Message = "Could not say hello from {food} {price}.")]
|
||||
public static partial void SayHelloFailure(this ILogger logger, Exception exception, string food, double price);
|
||||
}
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> When using the compile-time source generator the first `Exception` parameter
|
||||
> detected is automatically given special handling. It **SHOULD NOT** be part of
|
||||
> the message template. For details see: [Log method
|
||||
> anatomy](https://learn.microsoft.com/dotnet/core/extensions/logger-message-generator#log-method-anatomy).
|
||||
|
||||
:heavy_check_mark: You should use the dedicated overloads to log exceptions when
|
||||
using the logging extensions methods.
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
try
|
||||
{
|
||||
// Execute some logic
|
||||
|
||||
logger.LogInformation("Hello from {food} {price}.", food, price);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.LogError(ex, "Could not say hello from {food} {price}.", food, price);
|
||||
}
|
||||
```
|
||||
|
||||
:stop_sign: You should avoid adding exception details into the message template.
|
||||
|
||||
You want to use the correct `Exception` APIs because the OpenTelemetry
|
||||
Specification [defines dedicated
|
||||
attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/exceptions/exceptions-logs.md)
|
||||
for `Exception` details. The following examples show what **NOT** to do. In
|
||||
these cases the details won't be lost, but the dedicated attributes also won't
|
||||
be added.
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
try
|
||||
{
|
||||
// Execute some logic
|
||||
|
||||
logger.SayHello(food, price);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.SayHelloFailure(food, price, ex.Message);
|
||||
}
|
||||
|
||||
internal static partial class LoggerExtensions
|
||||
{
|
||||
[LoggerMessage(Level = LogLevel.Information, Message = "Hello from {food} {price}.")]
|
||||
public static partial void SayHello(this ILogger logger, string food, double price);
|
||||
|
||||
// BAD - Exception should not be part of the message template. Use the dedicated parameter.
|
||||
[LoggerMessage(Level = LogLevel.Error, Message = "Could not say hello from {food} {price} {message}.")]
|
||||
public static partial void SayHelloFailure(this ILogger logger, string food, double price, string message);
|
||||
}
|
||||
```
|
||||
|
||||
```csharp
|
||||
var food = "tomato";
|
||||
var price = 2.99;
|
||||
|
||||
try
|
||||
{
|
||||
// Execute some logic
|
||||
|
||||
logger.LogInformation("Hello from {food} {price}.", food, price);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// BAD - Exception should not be part of the message template. Use the dedicated parameter.
|
||||
logger.LogError("Could not say hello from {food} {price} {message}.", food, price, ex.Message);
|
||||
}
|
||||
```
|
||||
|
||||
## LoggerFactory
|
||||
|
||||
In many cases, you can use [ILogger](#ilogger) without having to interact with
|
||||
[Microsoft.Extensions.Logging.LoggerFactory](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.loggerfactory)
|
||||
directly. This section is intended for users who need to create and manage
|
||||
`LoggerFactory` explicitly.
|
||||
|
||||
:stop_sign: You should avoid creating `LoggerFactory` instances too frequently,
|
||||
`LoggerFactory` is fairly expensive and meant to be reused throughout the
|
||||
application. For most applications, one `LoggerFactory` instance per process
|
||||
would be sufficient.
|
||||
|
||||
:heavy_check_mark: You should properly manage the lifecycle of
|
||||
[LoggerFactory](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.loggerfactory)
|
||||
instances if they are created by you.
|
||||
|
||||
* If you forget to dispose the `LoggerFactory` instance before the application
|
||||
ends, logs might get dropped due to the lack of proper flush.
|
||||
* If you dispose the `LoggerFactory` instance too early, any subsequent logging
|
||||
API invocation associated with the logger factory could become no-op (i.e. no
|
||||
logs will be emitted).
|
||||
|
||||
## Log Correlation
|
||||
|
||||
In OpenTelemetry, logs are automatically correlated to
|
||||
[traces](../trace/README.md). Check the [Log
|
||||
Correlation](./correlation/README.md) tutorial to learn more.
|
||||
|
||||
## Log Enrichment
|
||||
|
||||
TBD
|
||||
|
||||
## Log Filtering
|
||||
|
||||
The [Customizing OpenTelemetry .NET SDK for
|
||||
Logs](./customizing-the-sdk/README.md#log-filtering) document has provided
|
||||
instructions for basic filtering based on logger category name and severity
|
||||
level.
|
||||
|
||||
For more advanced filtering and sampling, the .NET team has a plan to cover it
|
||||
in .NET 9 timeframe, please use this [runtime
|
||||
issue](https://github.com/dotnet/runtime/issues/82465) to track the progress or
|
||||
provide feedback and suggestions.
|
||||
|
||||
## Log Redaction
|
||||
|
||||
Logs might contain sensitive information such as passwords and credit card
|
||||
numbers, proper redaction is required to prevent privacy and security incidents.
|
||||
Check the [Log Redaction](./redaction/README.md) tutorial to learn more.
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
namespace ComplexObjects;
|
||||
|
||||
internal struct FoodRecallNotice
|
||||
{
|
||||
public string? BrandName { get; set; }
|
||||
|
||||
public string? ProductDescription { get; set; }
|
||||
|
||||
public string? ProductType { get; set; }
|
||||
|
||||
public string? RecallReasonDescription { get; set; }
|
||||
|
||||
public string? CompanyName { get; set; }
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
using ComplexObjects;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OpenTelemetry.Logs;
|
||||
|
||||
var loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
builder.AddOpenTelemetry(logging =>
|
||||
{
|
||||
logging.AddConsoleExporter();
|
||||
});
|
||||
});
|
||||
|
||||
var logger = loggerFactory.CreateLogger<Program>();
|
||||
|
||||
var foodRecallNotice = new FoodRecallNotice
|
||||
{
|
||||
BrandName = "Contoso",
|
||||
ProductDescription = "Salads",
|
||||
ProductType = "Food & Beverages",
|
||||
RecallReasonDescription = "due to a possible health risk from Listeria monocytogenes",
|
||||
CompanyName = "Contoso Fresh Vegetables, Inc.",
|
||||
};
|
||||
|
||||
logger.FoodRecallNotice(foodRecallNotice);
|
||||
|
||||
// Dispose logger factory before the application ends.
|
||||
// This will flush the remaining logs and shutdown the logging pipeline.
|
||||
loggerFactory.Dispose();
|
||||
|
||||
internal static partial class LoggerExtensions
|
||||
{
|
||||
[LoggerMessage(LogLevel.Critical)]
|
||||
public static partial void FoodRecallNotice(
|
||||
this ILogger logger,
|
||||
[LogProperties(OmitReferenceName = true)] in FoodRecallNotice foodRecallNotice);
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
# Logging with Complex Objects
|
||||
|
||||
In the [Getting Started with OpenTelemetry .NET Logs in 5 Minutes - Console
|
||||
Application](../getting-started-console/README.md) tutorial, we've learned how
|
||||
to log primitive data types. In this tutorial, we'll learn how to log complex
|
||||
objects.
|
||||
|
||||
Complex objects logging was introduced in .NET 8.0 via
|
||||
[LogPropertiesAttribute](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.logpropertiesattribute).
|
||||
This attribute and the corresponding code generation logic are provided by an
|
||||
extension package called
|
||||
[Microsoft.Extensions.Telemetry.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Telemetry.Abstractions/).
|
||||
|
||||
> [!NOTE]
|
||||
> Although `Microsoft.Extensions.Telemetry.Abstractions` was introduced in .NET
|
||||
8.0, it supports previous versions of the target framework (e.g. .NET 6.0).
|
||||
Refer to the [compatible target
|
||||
frameworks](https://www.nuget.org/packages/Microsoft.Extensions.Telemetry.Abstractions/#supportedframeworks-body-tab)
|
||||
for more information.
|
||||
|
||||
First, complete the [getting started](../getting-started-console/README.md)
|
||||
tutorial, then install the
|
||||
[Microsoft.Extensions.Telemetry.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Telemetry.Abstractions/)
|
||||
package:
|
||||
|
||||
```sh
|
||||
dotnet add package Microsoft.Extensions.Telemetry.Abstractions
|
||||
```
|
||||
|
||||
Define a new complex data type, as shown in [FoodRecallNotice.cs](./FoodRecallNotice.cs):
|
||||
|
||||
```csharp
|
||||
public struct FoodRecallNotice
|
||||
{
|
||||
public string? BrandName { get; set; }
|
||||
public string? ProductDescription { get; set; }
|
||||
public string? ProductType { get; set; }
|
||||
public string? RecallReasonDescription { get; set; }
|
||||
public string? CompanyName { get; set; }
|
||||
}
|
||||
```
|
||||
|
||||
Update the `Program.cs` file with the code from [Program.cs](./Program.cs). Note
|
||||
that the following code is added which uses the `LogPropertiesAttribute` to log
|
||||
the `FoodRecallNotice` object:
|
||||
|
||||
```csharp
|
||||
internal static partial class LoggerExtensions
|
||||
{
|
||||
[LoggerMessage(LogLevel.Critical)]
|
||||
public static partial void FoodRecallNotice(
|
||||
this ILogger logger,
|
||||
[LogProperties(OmitReferenceName = true)] in FoodRecallNotice foodRecallNotice);
|
||||
}
|
||||
```
|
||||
|
||||
The following code is used to create a `FoodRecallNotice` object and log it:
|
||||
|
||||
```csharp
|
||||
var foodRecallNotice = new FoodRecallNotice
|
||||
{
|
||||
BrandName = "Contoso",
|
||||
ProductDescription = "Salads",
|
||||
ProductType = "Food & Beverages",
|
||||
RecallReasonDescription = "due to a possible health risk from Listeria monocytogenes",
|
||||
CompanyName = "Contoso Fresh Vegetables, Inc.",
|
||||
};
|
||||
|
||||
logger.FoodRecallNotice(foodRecallNotice);
|
||||
```
|
||||
|
||||
Run the application again (using `dotnet run`) and you should see the log output
|
||||
on the console.
|
||||
|
||||
```text
|
||||
LogRecord.Timestamp: 2024-01-12T19:01:16.0604084Z
|
||||
LogRecord.CategoryName: Program
|
||||
LogRecord.Severity: Fatal
|
||||
LogRecord.SeverityText: Critical
|
||||
LogRecord.FormattedMessage:
|
||||
LogRecord.Body:
|
||||
LogRecord.Attributes (Key:Value):
|
||||
CompanyName: Contoso Fresh Vegetables, Inc.
|
||||
RecallReasonDescription: due to a possible health risk from Listeria monocytogenes
|
||||
ProductType: Food & Beverages
|
||||
ProductDescription: Salads
|
||||
BrandName: Contoso
|
||||
LogRecord.EventId: 252550133
|
||||
LogRecord.EventName: FoodRecallNotice
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> In this tutorial we've used
|
||||
[LogPropertiesAttribute.OmitReferenceName](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.logpropertiesattribute.omitreferencename)
|
||||
which changed the style of attribute names. There are more options available,
|
||||
check out the [learn more](#learn-more) section for more information.
|
||||
|
||||
## Learn more
|
||||
|
||||
* [Microsoft.Extensions.Logging.LogPropertiesAttribute](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.logpropertiesattribute)
|
||||
* [Microsoft.Extensions.Telemetry.Abstractions](https://github.com/dotnet/extensions/blob/main/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/README.md)
|
||||
* [Strong-type support feature
|
||||
request](https://github.com/dotnet/runtime/issues/61947)
|
||||
* [LogPropertiesAttribute design
|
||||
proposal](https://github.com/dotnet/runtime/issues/81730)
|
|
@ -0,0 +1,10 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Telemetry.Abstractions" />
|
||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
internal static partial class LoggerExtensions
|
||||
{
|
||||
[LoggerMessage(LogLevel.Information, "Food `{name}` price changed to `{price}`.")]
|
||||
public static partial void FoodPriceChanged(this ILogger logger, string name, double price);
|
||||
}
|
|
@ -1,18 +1,5 @@
|
|||
// <copyright file="Program.cs" company="OpenTelemetry Authors">
|
||||
// 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.
|
||||
// </copyright>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
@ -22,38 +9,39 @@ using OpenTelemetry.Trace;
|
|||
|
||||
namespace Correlation;
|
||||
|
||||
public class Program
|
||||
internal sealed class Program
|
||||
{
|
||||
private static readonly ActivitySource MyActivitySource = new(
|
||||
"MyCompany.MyProduct.MyLibrary");
|
||||
private static readonly ActivitySource MyActivitySource = new("MyCompany.MyProduct.MyLibrary");
|
||||
|
||||
public static void Main()
|
||||
{
|
||||
// Setup Logging
|
||||
using var loggerFactory = LoggerFactory.Create(builder =>
|
||||
var tracerProvider = Sdk.CreateTracerProviderBuilder()
|
||||
.AddSource("MyCompany.MyProduct.MyLibrary")
|
||||
.AddConsoleExporter()
|
||||
.Build();
|
||||
|
||||
var loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
builder.AddOpenTelemetry(options =>
|
||||
builder.AddOpenTelemetry(logging =>
|
||||
{
|
||||
options.AddConsoleExporter();
|
||||
logging.AddConsoleExporter();
|
||||
});
|
||||
});
|
||||
|
||||
var logger = loggerFactory.CreateLogger<Program>();
|
||||
|
||||
// Setup Traces
|
||||
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
|
||||
.AddSource("MyCompany.MyProduct.MyLibrary")
|
||||
.AddConsoleExporter()
|
||||
.Build();
|
||||
|
||||
// Emit activity
|
||||
using (var activity = MyActivitySource.StartActivity("SayHello"))
|
||||
{
|
||||
activity?.SetTag("foo", 1);
|
||||
|
||||
// emit logs within the context
|
||||
// of activity
|
||||
logger.LogInformation("Hello from {name} {price}.", "tomato", 2.99);
|
||||
// Write a log within the context of an activity
|
||||
logger.FoodPriceChanged("artichoke", 9.99);
|
||||
}
|
||||
|
||||
// Dispose logger factory before the application ends.
|
||||
// This will flush the remaining logs and shutdown the logging pipeline.
|
||||
loggerFactory.Dispose();
|
||||
|
||||
// Dispose tracer provider before the application ends.
|
||||
// This will flush the remaining spans and shutdown the tracing pipeline.
|
||||
tracerProvider.Dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Logs correlation
|
||||
# Log Correlation
|
||||
|
||||
The getting started docs for [logs](../getting-started-console/README.md) and
|
||||
[traces](../../trace/getting-started-console/README.md) showed how to emit logs
|
||||
|
@ -27,29 +27,32 @@ of an active `Activity`. Running the application will show the following output
|
|||
on the console:
|
||||
|
||||
```text
|
||||
LogRecord.Timestamp: 2022-05-18T18:51:16.4348626Z
|
||||
LogRecord.TraceId: d7aca5b2422ed8d15f56b6a93be4537d
|
||||
LogRecord.SpanId: c90ac2ad41ab4d46
|
||||
LogRecord.Timestamp: 2024-01-26T17:55:39.2273475Z
|
||||
LogRecord.TraceId: aed89c3b250fb9d8e16ccab1a4a9bbb5
|
||||
LogRecord.SpanId: bd44308753200c58
|
||||
LogRecord.TraceFlags: Recorded
|
||||
LogRecord.CategoryName: Correlation.Program
|
||||
LogRecord.LogLevel: Information
|
||||
LogRecord.State: Hello from tomato 2.99.
|
||||
LogRecord.CategoryName: Program
|
||||
LogRecord.Severity: Info
|
||||
LogRecord.SeverityText: Information
|
||||
LogRecord.Body: Food `{name}` price changed to `{price}`.
|
||||
LogRecord.Attributes (Key:Value):
|
||||
name: artichoke
|
||||
price: 9.99
|
||||
OriginalFormat (a.k.a Body): Food `{name}` price changed to `{price}`.
|
||||
LogRecord.EventId: 344095174
|
||||
LogRecord.EventName: FoodPriceChanged
|
||||
|
||||
Resource associated with LogRecord:
|
||||
service.name: unknown_service:correlation
|
||||
...
|
||||
|
||||
Activity.TraceId: d7aca5b2422ed8d15f56b6a93be4537d
|
||||
Activity.SpanId: c90ac2ad41ab4d46
|
||||
Activity.TraceFlags: Recorded
|
||||
Activity.TraceId: aed89c3b250fb9d8e16ccab1a4a9bbb5
|
||||
Activity.SpanId: bd44308753200c58
|
||||
Activity.TraceFlags: Recorded
|
||||
Activity.ActivitySourceName: MyCompany.MyProduct.MyLibrary
|
||||
Activity.DisplayName: SayHello
|
||||
Activity.Kind: Internal
|
||||
Activity.StartTime: 2022-05-18T18:51:16.3427411Z
|
||||
Activity.Duration: 00:00:00.2248932
|
||||
Activity.Tags:
|
||||
foo: 1
|
||||
Resource associated with Activity:
|
||||
service.name: unknown_service:correlation
|
||||
Activity.DisplayName: SayHello
|
||||
Activity.Kind: Internal
|
||||
Activity.StartTime: 2024-01-26T17:55:39.2223849Z
|
||||
Activity.Duration: 00:00:00.0361682
|
||||
...
|
||||
```
|
||||
|
||||
As you can see, the `LogRecord` automatically had the `TraceId`, `SpanId` fields
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" />
|
||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,54 +1,56 @@
|
|||
// <copyright file="Program.cs" company="OpenTelemetry Authors">
|
||||
// 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.
|
||||
// </copyright>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OpenTelemetry.Logs;
|
||||
using OpenTelemetry.Resources;
|
||||
|
||||
namespace CustomizingTheSdk;
|
||||
|
||||
public class Program
|
||||
var loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
public static void Main()
|
||||
builder.AddOpenTelemetry(logging =>
|
||||
{
|
||||
using var loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
builder.AddOpenTelemetry(options =>
|
||||
{
|
||||
options.IncludeScopes = true;
|
||||
options.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(
|
||||
serviceName: "MyService",
|
||||
serviceVersion: "1.0.0"));
|
||||
options.AddConsoleExporter();
|
||||
});
|
||||
});
|
||||
logging.IncludeScopes = true;
|
||||
logging.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(
|
||||
serviceName: "MyService",
|
||||
serviceVersion: "1.0.0"));
|
||||
logging.AddConsoleExporter();
|
||||
});
|
||||
});
|
||||
|
||||
var logger = loggerFactory.CreateLogger<Program>();
|
||||
var logger = loggerFactory.CreateLogger<Program>();
|
||||
|
||||
logger.LogInformation("Hello from {name} {price}.", "tomato", 2.99);
|
||||
logger.LogWarning("Hello from {name} {price}.", "tomato", 2.99);
|
||||
logger.LogError("Hello from {name} {price}.", "tomato", 2.99);
|
||||
logger.FoodPriceChanged("artichoke", 9.99);
|
||||
|
||||
// log with scopes
|
||||
using (logger.BeginScope(new List<KeyValuePair<string, object>>
|
||||
{
|
||||
new KeyValuePair<string, object>("store", "Seattle"),
|
||||
}))
|
||||
{
|
||||
logger.LogInformation("Hello from {food} {price}.", "tomato", 2.99);
|
||||
}
|
||||
}
|
||||
using (logger.BeginScope(new List<KeyValuePair<string, object>>
|
||||
{
|
||||
new KeyValuePair<string, object>("store", "Seattle"),
|
||||
}))
|
||||
{
|
||||
logger.FoodPriceChanged("truffle", 999.99);
|
||||
}
|
||||
|
||||
logger.FoodRecallNotice(
|
||||
brandName: "Contoso",
|
||||
productDescription: "Salads",
|
||||
productType: "Food & Beverages",
|
||||
recallReasonDescription: "due to a possible health risk from Listeria monocytogenes",
|
||||
companyName: "Contoso Fresh Vegetables, Inc.");
|
||||
|
||||
// Dispose logger factory before the application ends.
|
||||
// This will flush the remaining logs and shutdown the logging pipeline.
|
||||
loggerFactory.Dispose();
|
||||
|
||||
internal static partial class LoggerExtensions
|
||||
{
|
||||
[LoggerMessage(LogLevel.Information, "Food `{name}` price changed to `{price}`.")]
|
||||
public static partial void FoodPriceChanged(this ILogger logger, string name, double price);
|
||||
|
||||
[LoggerMessage(LogLevel.Critical, "A `{productType}` recall notice was published for `{brandName} {productDescription}` produced by `{companyName}` ({recallReasonDescription}).")]
|
||||
public static partial void FoodRecallNotice(
|
||||
this ILogger logger,
|
||||
string brandName,
|
||||
string productDescription,
|
||||
string productType,
|
||||
string recallReasonDescription,
|
||||
string companyName);
|
||||
}
|
||||
|
|
|
@ -14,9 +14,10 @@ TODO
|
|||
|
||||
### IncludeScopes
|
||||
|
||||
A "[scope](https://docs.microsoft.com/dotnet/core/extensions/logging#log-scopes)"
|
||||
is an `ILogger` concept that can group a set of logical operations and attach
|
||||
data to each log created as part of a set.
|
||||
Log
|
||||
[scope](https://docs.microsoft.com/dotnet/core/extensions/logging#log-scopes) is
|
||||
an `ILogger` concept that can group a set of logical operations and attach data
|
||||
to each log created as part of a set.
|
||||
|
||||
`IncludeScopes` is off by default. Setting this to `true` will include all
|
||||
scopes with the exported `LogRecord`. Consult the individual `Exporter`
|
||||
|
@ -24,6 +25,14 @@ docs to learn more about how scopes will be processed.
|
|||
|
||||
See [Program.cs](Program.cs) for an example.
|
||||
|
||||
> [!NOTE]
|
||||
> When using [`ILogger.BeginScope<TState>(TState
|
||||
state)`](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger.beginscope),
|
||||
it is highly recommended to use `IReadOnlyList<KeyValue<string, object?>>` or
|
||||
`List<KeyValuePair<string, object?>>` as the `TState` for the best performance.
|
||||
When performance is not a critical requirement,
|
||||
`IEnumerable<KeyValuePair<string, object?>>` can be used.
|
||||
|
||||
### IncludeFormattedMessage
|
||||
|
||||
`IncludeFormattedMessage` indicates if the `LogRecord.FormattedMessage` will be
|
||||
|
@ -36,16 +45,16 @@ TODO
|
|||
|
||||
### AddProcessor
|
||||
|
||||
[Processors](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/logging-library-sdk.md#logprocessor)
|
||||
[Processors](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#logrecordprocessor)
|
||||
must be added using `OpenTelemetryLoggerOptions.AddProcessor()`.
|
||||
It is not supported to add Processors after building the `LoggerFactory`.
|
||||
|
||||
```csharp
|
||||
var loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
builder.AddOpenTelemetry(options =>
|
||||
builder.AddOpenTelemetry(logging =>
|
||||
{
|
||||
options.AddProcessor(...)
|
||||
logging.AddProcessor(...);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
@ -56,9 +65,12 @@ For more information on Processors, please review [Extending the SDK](../extendi
|
|||
|
||||
[Resource](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md)
|
||||
is the immutable representation of the entity producing the telemetry.
|
||||
If no `Resource` is explicitly configured, the default is to use a resource
|
||||
indicating this [Telemetry
|
||||
SDK](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/resource/semantic_conventions#telemetry-sdk).
|
||||
If no `Resource` is explicitly configured, the
|
||||
[default](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#semantic-attributes-with-sdk-provided-default-value)
|
||||
is to use a resource indicating this
|
||||
[Service](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#service)
|
||||
and [Telemetry
|
||||
SDK](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#telemetry-sdk).
|
||||
The `SetResourceBuilder` method on `OpenTelemetryLoggerOptions` can be used to
|
||||
set a single `ResourceBuilder`. If `SetResourceBuilder` is called multiple
|
||||
times, only the last is kept. It is not possible to change the resource builder
|
||||
|
@ -69,9 +81,9 @@ The snippet below shows configuring a custom `ResourceBuilder` to the provider.
|
|||
```csharp
|
||||
var loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
builder.AddOpenTelemetry(options =>
|
||||
builder.AddOpenTelemetry(logging =>
|
||||
{
|
||||
options.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(
|
||||
logging.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(
|
||||
serviceName: "MyService",
|
||||
serviceVersion: "1.0.0"));
|
||||
});
|
||||
|
@ -104,8 +116,8 @@ and also defines "Warning" as the minimum `LogLevel` for a user defined category
|
|||
These rules as defined only apply to the `OpenTelemetryLoggerProvider`.
|
||||
|
||||
```csharp
|
||||
ILoggingBuilder.AddFilter<OpenTelemetryLoggerProvider>("*", LogLevel.Error);
|
||||
ILoggingBuilder.AddFilter<OpenTelemetryLoggerProvider>("category name", LogLevel.Warning);
|
||||
builder.AddFilter<OpenTelemetryLoggerProvider>("*", LogLevel.Error);
|
||||
builder.AddFilter<OpenTelemetryLoggerProvider>("MyProduct.MyLibrary.MyClass", LogLevel.Warning);
|
||||
```
|
||||
|
||||
## Learn more
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" />
|
||||
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using OpenTelemetry.Logs;
|
||||
|
||||
namespace DedicatedLogging;
|
||||
|
||||
internal static class DedicatedLoggingServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddDedicatedLogging(
|
||||
this IServiceCollection services,
|
||||
IConfiguration configuration,
|
||||
Action<LoggerProviderBuilder> configureOpenTelemetry)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(configureOpenTelemetry);
|
||||
|
||||
services.TryAddSingleton(_ =>
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddLogging(builder =>
|
||||
{
|
||||
builder.AddConfiguration(configuration);
|
||||
|
||||
builder.AddOpenTelemetry();
|
||||
});
|
||||
|
||||
services.ConfigureOpenTelemetryLoggerProvider(configureOpenTelemetry);
|
||||
|
||||
var sp = services.BuildServiceProvider();
|
||||
|
||||
return new DedicatedLoggerFactory(sp);
|
||||
});
|
||||
|
||||
services.TryAdd(ServiceDescriptor.Singleton(typeof(IDedicatedLogger<>), typeof(DedicatedLogger<>)));
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
private sealed class DedicatedLogger<T> : IDedicatedLogger<T>
|
||||
{
|
||||
private readonly ILogger innerLogger;
|
||||
|
||||
public DedicatedLogger(DedicatedLoggerFactory loggerFactory)
|
||||
{
|
||||
this.innerLogger = loggerFactory.CreateLogger(typeof(T).FullName!);
|
||||
}
|
||||
|
||||
public IDisposable? BeginScope<TState>(TState state)
|
||||
where TState : notnull
|
||||
=> this.innerLogger.BeginScope(state);
|
||||
|
||||
public bool IsEnabled(LogLevel logLevel)
|
||||
=> this.innerLogger.IsEnabled(logLevel);
|
||||
|
||||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
|
||||
=> this.innerLogger.Log(logLevel, eventId, state, exception, formatter);
|
||||
}
|
||||
|
||||
private sealed class DedicatedLoggerFactory : ILoggerFactory
|
||||
{
|
||||
private readonly ServiceProvider serviceProvider;
|
||||
private readonly ILoggerFactory innerLoggerFactory;
|
||||
|
||||
public DedicatedLoggerFactory(ServiceProvider serviceProvider)
|
||||
{
|
||||
this.serviceProvider = serviceProvider;
|
||||
this.innerLoggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
|
||||
}
|
||||
|
||||
public void AddProvider(ILoggerProvider provider)
|
||||
=> this.innerLoggerFactory.AddProvider(provider);
|
||||
|
||||
public ILogger CreateLogger(string categoryName)
|
||||
=> this.innerLoggerFactory.CreateLogger(categoryName);
|
||||
|
||||
public void Dispose()
|
||||
=> this.serviceProvider.Dispose();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
namespace DedicatedLogging;
|
||||
|
||||
internal interface IDedicatedLogger : ILogger
|
||||
{
|
||||
}
|
||||
|
||||
internal interface IDedicatedLogger<out TCategoryName> : IDedicatedLogger
|
||||
{
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue