Compare commits
1508 Commits
v0.6.0-bet
...
main
Author | SHA1 | Date |
---|---|---|
|
afe4530337 | |
|
2121a69813 | |
|
c7061ac931 | |
|
f7277e6bb4 | |
|
7fae1f363b | |
|
5e2cf883f9 | |
|
919413c659 | |
|
8b9910d70d | |
|
ac04668887 | |
|
f566c03436 | |
|
c72c43824a | |
|
f7874c366e | |
|
f9cb8df859 | |
|
4644b6ed63 | |
|
17cc3f8aea | |
|
fd2fe4a155 | |
|
5cecd74f77 | |
|
1ddcb79581 | |
|
186e653ad1 | |
|
b3752aafdd | |
|
e92c17244d | |
|
0ff77d4691 | |
|
45f39a56e5 | |
|
821ce27c11 | |
|
8519da1702 | |
|
2ca57732ad | |
|
8c34202dc1 | |
|
465c376fc4 | |
|
eb82c7d296 | |
|
2ef1d65ce1 | |
|
6f753a8b90 | |
|
b01a36711b | |
|
6bc6c388b0 | |
|
802963fd78 | |
|
aa697cbebb | |
|
0d56e2ee1a | |
|
aa4b823c37 | |
|
10edef540e | |
|
b7c89bfeba | |
|
e623eb1421 | |
|
e238fc304d | |
|
4c4aaafda2 | |
|
9600a75381 | |
|
92c6457806 | |
|
4dd5d1a9cd | |
|
bf3f0e9ea5 | |
|
2c09c87e24 | |
|
5435fb6734 | |
|
1192b71273 | |
|
6528fb6db9 | |
|
0cbdc9b809 | |
|
f69c88349c | |
|
c1ee202968 | |
|
8393d9398a | |
|
14fb33e510 | |
|
e24da9406b | |
|
0cd1e1ad98 | |
|
0ee6ad13cd | |
|
9fdfa398cf | |
|
7ce0c16aba | |
|
a197ad373c | |
|
2fbefc096f | |
|
3724a3849f | |
|
b8f1c516dd | |
|
18b40c75eb | |
|
c91bb04567 | |
|
6fbf15a5d1 | |
|
377ac31402 | |
|
a417b97856 | |
|
ca32c98a4b | |
|
d0d6275f77 | |
|
598aa8b611 | |
|
0ebf79e8bd | |
|
918f101509 | |
|
f20e15751b | |
|
602a0a1d97 | |
|
c6dc8ad435 | |
|
6ced31c578 | |
|
07acf39331 | |
|
d7768e6e31 | |
|
2a224429c0 | |
|
34161bec4e | |
|
9a3b98c78f | |
|
a7d6e6986b | |
|
be1da70722 | |
|
a2aacdca4c | |
|
bab0147e51 | |
|
daa298f976 | |
|
9334f1bd4e | |
|
9ab582c0c9 | |
|
3b9b9e6f25 | |
|
71190c003c | |
|
0d9033b3d1 | |
|
bbef4323cf | |
|
b6eb9e3c4e | |
|
751d8464cd | |
|
7629e22431 | |
|
498078e300 | |
|
15e3654cc5 | |
|
7a72bd2c67 | |
|
3b13a06932 | |
|
f3a9463067 | |
|
da86013e7c | |
|
143beb3b20 | |
|
d4c5678dc7 | |
|
00b0b09b07 | |
|
35a67247ef | |
|
c4cf063b46 | |
|
f181263107 | |
|
4cd321f61a | |
|
92bf213d61 | |
|
7086b88f3e | |
|
fe6972fba8 | |
|
3d58d8f9dc | |
|
9ea47c5f24 | |
|
2455713b81 | |
|
620965eaca | |
|
7aa709aec2 | |
|
ac414b1e08 | |
|
82726339a7 | |
|
1d6e3ba2cd | |
|
91b7db2e7f | |
|
3d979db341 | |
|
9baf2ee0e4 | |
|
35c0aff2c1 | |
|
6b09c26ab3 | |
|
30c64e218e | |
|
d25d14a3da | |
|
671afe6324 | |
|
2d0b7d6d82 | |
|
f117169757 | |
|
677cfe816b | |
|
aedf7017d0 | |
|
2b5ffe91b2 | |
|
1c5cf35364 | |
|
49f4fde687 | |
|
cef3077cd8 | |
|
e07d5e3592 | |
|
d6434ebe10 | |
|
b79caf55ff | |
|
71f2b0eb51 | |
|
485fabcfcf | |
|
8879b61bd3 | |
|
6e307db05b | |
|
35976eafc7 | |
|
735740a926 | |
|
567c177ad6 | |
|
d982003c9a | |
|
4c89bcd1e0 | |
|
1b2069fc10 | |
|
09081e8f3c | |
|
5cd22403a8 | |
|
7142cf8104 | |
|
0977282a3b | |
|
4969a7e010 | |
|
cffb3203ce | |
|
3d91f450d1 | |
|
1ed0a48a5b | |
|
6811b8768b | |
|
5100167eee | |
|
215e0a5144 | |
|
9b13d228a1 | |
|
e412f7a781 | |
|
6c462a7e3d | |
|
cac92f707b | |
|
9e45427d8b | |
|
06202354ed | |
|
20edb74c75 | |
|
098c7d5cc5 | |
|
96194af048 | |
|
d0ee78d196 | |
|
f6d9368abc | |
|
cd5ba9dcc8 | |
|
ce049eb48e | |
|
b4c5016c97 | |
|
ef6212dcd6 | |
|
ba7a1f3e30 | |
|
963b170bc4 | |
|
ffc39a95a8 | |
|
651ca69a1f | |
|
b1699b551a | |
|
7e9b17144b | |
|
c561cbbca9 | |
|
7c35286c06 | |
|
5ff5bba88b | |
|
dca923db8b | |
|
a970fb3ea6 | |
|
6e2a5a5af8 | |
|
9754b134c7 | |
|
a1b902e5b0 | |
|
1cd77e0724 | |
|
810722d502 | |
|
c018cd5972 | |
|
2d050e35d0 | |
|
4faf86d1b2 | |
|
ebf7d65429 | |
|
51e9e452ec | |
|
76c7bff2ee | |
|
7dfd4df5e5 | |
|
0491d670a8 | |
|
ead0cab60e | |
|
d641fa1bfa | |
|
ab1626b5e0 | |
|
c267593d7e | |
|
a181350c1f | |
|
e6d31d1067 | |
|
9c5f51c467 | |
|
b07874afc4 | |
|
de5f0267bb | |
|
0215924bb1 | |
|
6818044707 | |
|
91bb26ff7e | |
|
f10805bcfe | |
|
3a24f60132 | |
|
b4c33857de | |
|
d83287c634 | |
|
796283fbf9 | |
|
fa73c9f138 | |
|
e7659c522e | |
|
faeaf8e7a5 | |
|
bba225e444 | |
|
0536bc693c | |
|
2d74d58bec | |
|
6818d32f43 | |
|
dc65d0adbe | |
|
e311bc9341 | |
|
98a27861ae | |
|
e81f5e1e1d | |
|
a7fbc14d7c | |
|
241910ec1f | |
|
79fb80d533 | |
|
9944bfe255 | |
|
7e773954e9 | |
|
0bf7d0cbf2 | |
|
8bad67f2d0 | |
|
b89cc58112 | |
|
d9b39cefff | |
|
5e170cffed | |
|
d41d86a9d4 | |
|
7cac0462b6 | |
|
38bed4e0d3 | |
|
1f2760dae9 | |
|
92e83194e4 | |
|
0085707552 | |
|
c317c72ea2 | |
|
5138a506c6 | |
|
4dab15b02e | |
|
2abc24aac2 | |
|
df82f2a616 | |
|
6fc49fa6d4 | |
|
2ba79c3e5d | |
|
d16d7a85fe | |
|
e70d669453 | |
|
f84b78fbff | |
|
b186fbae92 | |
|
48b77f6258 | |
|
b1e972680e | |
|
50dfdcf741 | |
|
c2bfb7757e | |
|
d2a0e43533 | |
|
b2f03d52b1 | |
|
31e8d6abe9 | |
|
0c4c8df5b0 | |
|
ea22e2db6d | |
|
2f0ffac5a6 | |
|
f1dd1d0b1e | |
|
1b1b7ee908 | |
|
f49e1c8751 | |
|
603c5cba27 | |
|
fdf912bd9b | |
|
ccd04d6417 | |
|
15f9eca7db | |
|
8dc41feab0 | |
|
5ed094474c | |
|
f2e578ff81 | |
|
7814d5f3d8 | |
|
d1a8b061b0 | |
|
c9ab54a04f | |
|
59fee1db2a | |
|
d55b24744b | |
|
45f22c3683 | |
|
ae5ac40a5a | |
|
0bac076b63 | |
|
7b9acf74bb | |
|
8a60e68da6 | |
|
1fb1e7a6d0 | |
|
8f80ee2e32 | |
|
a87e814b4d | |
|
4c370a8ab0 | |
|
0262bb9f05 | |
|
d0934fe2b6 | |
|
b85022475a | |
|
7184165193 | |
|
b82d017f93 | |
|
45d89895c1 | |
|
4f0fe4ce2e | |
|
4422ba9dda | |
|
0c5e243156 | |
|
201c452e3c | |
|
52b843005d | |
|
d46428519b | |
|
a53fa32e8a | |
|
81096f59c7 | |
|
8a520909b7 | |
|
6b64e31c46 | |
|
3cb1bdf6a5 | |
|
fb7b807ad0 | |
|
5396b9a7eb | |
|
953e9e51bb | |
|
b0c646f901 | |
|
17c26bc039 | |
|
262f4c42ab | |
|
d12b5e47f2 | |
|
ba8aca26ac | |
|
d2e7fc555d | |
|
b8a42a153a | |
|
eaefe06efb | |
|
2d448c4dd1 | |
|
ffc3160cdd | |
|
92589de7fb | |
|
f112d6e92a | |
|
d1a2764368 | |
|
e0448a3118 | |
|
06cec4f4dc | |
|
cf2d524728 | |
|
98cb3f154e | |
|
701b0c2ebf | |
|
7273ee9596 | |
|
0027266664 | |
|
80a4711625 | |
|
acb405617b | |
|
5886146e34 | |
|
59ab953567 | |
|
d2bf158dad | |
|
940c44d3e4 | |
|
9827fdfeac | |
|
31e4962a5b | |
|
e0a0202757 | |
|
a7b82312db | |
|
31b07e6e5c | |
|
7b4272625b | |
|
85bb380922 | |
|
a9155369b3 | |
|
814a180517 | |
|
f60d978eae | |
|
092e46f7c1 | |
|
98799fe3cd | |
|
a34700038d | |
|
6b3061f07c | |
|
4afbd00e02 | |
|
fc8a0875c9 | |
|
89883dd75d | |
|
56ed0e852f | |
|
71df4e2ad7 | |
|
88e42498f6 | |
|
5da2257e42 | |
|
8668cdffc5 | |
|
20eeb0c323 | |
|
6253a1b61e | |
|
cc48ee133c | |
|
142d826e44 | |
|
72f1742e04 | |
|
961cba145f | |
|
27364f2e21 | |
|
849dd58229 | |
|
1788df01ca | |
|
209d731ec5 | |
|
74eb217957 | |
|
96b65e27b2 | |
|
25cd45c276 | |
|
541e44dcd5 | |
|
73260c91b6 | |
|
840406b8ed | |
|
9ff230cdd3 | |
|
4b1571bf0a | |
|
3f893acba1 | |
|
fb99bfaaa9 | |
|
242a6c0ce1 | |
|
d6ebad8ca2 | |
|
33fad0d32f | |
|
4d9e3acb8e | |
|
f824ec576d | |
|
09d4c246d6 | |
|
f92f503d3d | |
|
9a4cd4180b | |
|
1f391853a5 | |
|
b2f45892a0 | |
|
9c29ce5df9 | |
|
1192e63d65 | |
|
eca30b5fd7 | |
|
8c2613afb6 | |
|
a218aa9022 | |
|
a5db0f1837 | |
|
253f173049 | |
|
0d236e5e91 | |
|
3fc3553458 | |
|
6c299d7a18 | |
|
bd8f75c234 | |
|
3ddece7698 | |
|
723c4d0ea1 | |
|
f33e9302c0 | |
|
d16ec6c2a3 | |
|
a29f81a9a2 | |
|
74c3a4b121 | |
|
a356c62949 | |
|
316134658e | |
|
7a2e4ead51 | |
|
fb1b4a54b8 | |
|
44670c3457 | |
|
bc6bbc0671 | |
|
6c8d8ba280 | |
|
7784b48717 | |
|
6a00c6197c | |
|
bf3d117488 | |
|
1118dac617 | |
|
677e467e1e | |
|
4abe3b1ef3 | |
|
c8290c9c04 | |
|
8be2028852 | |
|
e377f087b6 | |
|
01c580055b | |
|
bce110eae8 | |
|
d0729fa0bd | |
|
838e65ee04 | |
|
725ed723ac | |
|
9856bb54a7 | |
|
5de1ddab6e | |
|
09d9768ba8 | |
|
c92faedaa2 | |
|
bdb6d92a40 | |
|
662ea5a86e | |
|
78fd334be3 | |
|
510c7e2d06 | |
|
63c8ab662b | |
|
db60adc2d4 | |
|
810353796c | |
|
7b74169036 | |
|
0bf8202439 | |
|
231045bd6a | |
|
1d73176327 | |
|
a0d32fa60c | |
|
25545fc9bb | |
|
12fc041657 | |
|
045338d879 | |
|
b0bc379f3d | |
|
4e187c7c50 | |
|
804e4177b4 | |
|
1e9aa8a498 | |
|
6f7e8a9990 | |
|
3fab9adff5 | |
|
84af16ecf9 | |
|
6246f12f0e | |
|
0cc3164997 | |
|
2903993efd | |
|
e205769091 | |
|
5c98a619a7 | |
|
c38e91d98b | |
|
3e44b46044 | |
|
83bf7aebb0 | |
|
381d9c9f51 | |
|
6fc24f5b0b | |
|
cdc00d07cf | |
|
aa95c98e1f | |
|
e5a0be5b70 | |
|
124d604517 | |
|
7a9cdc302a | |
|
6d10456828 | |
|
996bdb066a | |
|
fe0df15d79 | |
|
bca86c68ea | |
|
4bc7061699 | |
|
8a1f2c8987 | |
|
bea461fe6c | |
|
6f3b592ef0 | |
|
1b47dae0b9 | |
|
a2ba1e55e5 | |
|
e4ba7b588a | |
|
1a7e2a33ed | |
|
f24025160d | |
|
d98609aa0e | |
|
5745437c99 | |
|
497b26f102 | |
|
a25ee6c4b0 | |
|
4babb8c0a7 | |
|
fd2a68b260 | |
|
5201c5aa01 | |
|
4ec2d1e6ee | |
|
4a6f93cea4 | |
|
9865fbb3fd | |
|
1d515d00be | |
|
9915cd50d6 | |
|
0a8e8d7fd2 | |
|
595b7235f3 | |
|
3dd8d2a91b | |
|
69b795d918 | |
|
65a44d7456 | |
|
f27716113a | |
|
2474c89395 | |
|
bdff1f2770 | |
|
0f582b9192 | |
|
5a644974b1 | |
|
315758d708 | |
|
d0ae6410ed | |
|
4c8bdcfce3 | |
|
91efb430a1 | |
|
c7cda141ff | |
|
9e7232284e | |
|
494872c2bd | |
|
d761a450bf | |
|
2dfc59c027 | |
|
f06abfb68c | |
|
d0c0af6a94 | |
|
a123c50397 | |
|
07c4ffcb9c | |
|
3a7adf78b7 | |
|
8b703a3c6e | |
|
9f61106182 | |
|
958dc4d179 | |
|
4985ef9cce | |
|
91fe501250 | |
|
d16c8fed5b | |
|
d073ccbedc | |
|
6ff14d9069 | |
|
0457e6ed73 | |
|
da8a81ab36 | |
|
50c8ee9901 | |
|
ca2ce533c5 | |
|
46b73c6e54 | |
|
a5228eca44 | |
|
62a890082a | |
|
59e1678ef0 | |
|
ac404aaaa6 | |
|
a20d675c6a | |
|
987436adae | |
|
baf1f787da | |
|
9c42941dae | |
|
611d7f2f6a | |
|
68e750b77c | |
|
05728a0530 | |
|
3da22afe13 | |
|
fb689cb3f4 | |
|
f945873029 | |
|
eae0dd0ff2 | |
|
2dfb5bd280 | |
|
c58fb0b007 | |
|
52d169a744 | |
|
1f41c78905 | |
|
6cff753a1e | |
|
272ade7325 | |
|
c58d3defae | |
|
37e876c67e | |
|
e856da4329 | |
|
33a2b9fa78 | |
|
6fcae9a4e3 | |
|
26f3965fab | |
|
d5a03c5e07 | |
|
7f94c7956b | |
|
b48a9e8fa7 | |
|
3c1e65dd59 | |
|
e7bb24d4ec | |
|
fce3682e4f | |
|
bb60828a7d | |
|
a323ad3c6a | |
|
1d7152cc73 | |
|
0090445c59 | |
|
09a25bac00 | |
|
8b1bf12b72 | |
|
53c39f31a7 | |
|
8163e2ce9b | |
|
ccad7dafd2 | |
|
3994e93f65 | |
|
fa3f2ba92b | |
|
851550d063 | |
|
1347fa56aa | |
|
7aa9adf1ee | |
|
7bad825496 | |
|
4c8b92332f | |
|
cc6a1f27a3 | |
|
87b79252ff | |
|
f8690e7056 | |
|
efe4eb1799 | |
|
e1838cef91 | |
|
348da3a1a8 | |
|
3397c06c47 | |
|
ce524e516e | |
|
02799ad61c | |
|
4f7d8aaf08 | |
|
05faaaf5be | |
|
4779e166ad | |
|
1278fcd85d | |
|
57d80ba6b7 | |
|
8b4cd93c7f | |
|
a72a393c0c | |
|
6859e06cca | |
|
9950890df5 | |
|
90c86c5d0c | |
|
37d2c2ecb6 | |
|
68a5666048 | |
|
3abfa3ca1c | |
|
bcda90aa90 | |
|
fe82d53ace | |
|
83a3e32303 | |
|
87ca3b4a03 | |
|
32ecbd592b | |
|
27f8fd8ad1 | |
|
3ddb9807f7 | |
|
7db20d08ea | |
|
2279c0f128 | |
|
1b4a9ab923 | |
|
a170b74a1f | |
|
228836c261 | |
|
c2dc118396 | |
|
2a4ff5a75b | |
|
9d7866a548 | |
|
43203ae300 | |
|
053246c627 | |
|
da90bfc8c1 | |
|
9229fdff6e | |
|
39d1068487 | |
|
f3521a8624 | |
|
733d0704de | |
|
2c6916574f | |
|
6d1a0e354d | |
|
adab802a32 | |
|
ec79adcdbe | |
|
9fc1cb6e9c | |
|
9fec905187 | |
|
100a667bc4 | |
|
0229967891 | |
|
b640f61bf6 | |
|
def768a210 | |
|
82561d726c | |
|
99fd4ea799 | |
|
c25f2d19c6 | |
|
fbd122762c | |
|
97471d3acb | |
|
3b6e009af7 | |
|
e69fdd9cab | |
|
6635e21519 | |
|
889f4ecc3c | |
|
8109c4e5d3 | |
|
f9653f91fd | |
|
c5e248bd81 | |
|
93bb30bff5 | |
|
549c36a4f7 | |
|
e0c2264534 | |
|
565b7c6753 | |
|
1f054f5db4 | |
|
20c30b42a6 | |
|
6e9ef3cd56 | |
|
62775b1bb2 | |
|
8ebd08c6ab | |
|
5aa79cbfe6 | |
|
2257a1711b | |
|
8cbe0dc73f | |
|
f4202c1976 | |
|
24567970b5 | |
|
6c40ce9eee | |
|
5d43805687 | |
|
7ee423cd72 | |
|
a177bafdcf | |
|
08402fdb24 | |
|
b5cd0f57e2 | |
|
f2b67c785d | |
|
a02a40b89a | |
|
2a428ee3ea | |
|
922f09a1e6 | |
|
6fa6c39244 | |
|
b56cbd8ece | |
|
edcc57e25a | |
|
3aab49edcd | |
|
1db92aead8 | |
|
dbaa0ee776 | |
|
927d65b0c7 | |
|
86a32ceb4a | |
|
b288cb35e3 | |
|
c9ed3c0382 | |
|
a4f2b21404 | |
|
94e61df8be | |
|
d2a7170fb4 | |
|
bd71fbef58 | |
|
f9ae4c9102 | |
|
2efecd1ed1 | |
|
c38843a141 | |
|
d992b5fd85 | |
|
3e32ea1108 | |
|
83dc99a645 | |
|
3fac80a7f8 | |
|
974e1d5b30 | |
|
1f8597665c | |
|
f525b3da95 | |
|
dea58861d2 | |
|
7ef7dcff57 | |
|
27c8fb875f | |
|
1a4bd57e4e | |
|
c773d15af1 | |
|
64d59c205e | |
|
df743ea044 | |
|
3a1a1e364e | |
|
3a3bad9c84 | |
|
f59073c47e | |
|
62a0206351 | |
|
0a7c748a9b | |
|
77256e3a96 | |
|
130e9e45aa | |
|
924b155010 | |
|
7bb05eb93e | |
|
1ca1833680 | |
|
afdde0834f | |
|
3fe223ef9a | |
|
1451bd6f31 | |
|
bd54101981 | |
|
f37c9fd618 | |
|
06379073f4 | |
|
b7e647ae5a | |
|
bca1cd7907 | |
|
300c16deb4 | |
|
cdfc1c3dc1 | |
|
b162fb4e52 | |
|
c390314f03 | |
|
10b24647d9 | |
|
ea32d33c09 | |
|
f0d83db937 | |
|
44e04fb86e | |
|
3784486932 | |
|
bd9cdf7ad2 | |
|
3298c616ea | |
|
132676a653 | |
|
8fd8a6c3f2 | |
|
bac0813023 | |
|
5227a33ea3 | |
|
8024a5c0fe | |
|
c925600b03 | |
|
9d92739bbb | |
|
e822c33915 | |
|
0a06af396c | |
|
13caa5714f | |
|
f25b544a49 | |
|
8f521ec929 | |
|
29af6cab21 | |
|
5386a7a40c | |
|
3585b31e64 | |
|
c195d74350 | |
|
43915f71e4 | |
|
a797a68f03 | |
|
0de0d6cf54 | |
|
14c8d50e83 | |
|
14cd8548f1 | |
|
9dd9abc7d0 | |
|
f2995c48d4 | |
|
3fe5e31020 | |
|
036ea9d3c7 | |
|
5a03cb32f2 | |
|
110364767d | |
|
2e3dd70599 | |
|
bbaa825619 | |
|
2f8dc0ab34 | |
|
d999b04c39 | |
|
d95a8fb42a | |
|
f33c2c3f49 | |
|
97d915129f | |
|
9f3082d100 | |
|
78c6b89723 | |
|
dca75ff693 | |
|
67a7726197 | |
|
09ceb70b17 | |
|
fd3ed23032 | |
|
b5a557f1bb | |
|
f9c3c2a1b9 | |
|
64a22a3284 | |
|
dd0ef2f0bd | |
|
0a3cb6e8b0 | |
|
90f347f38e | |
|
921318e9ce | |
|
ffbc53d82a | |
|
eef3400b1e | |
|
f17a4885fc | |
|
5fc68caf89 | |
|
5558789abb | |
|
32b7ac51f9 | |
|
76cdb0b6bf | |
|
a085f916a6 | |
|
8310a7d633 | |
|
60ca375aca | |
|
d3740dfafa | |
|
bd5832739a | |
|
98c60f494c | |
|
5df6267117 | |
|
170310f2e3 | |
|
0df9a9f67e | |
|
14dfe0d43e | |
|
b654a4f548 | |
|
7b282c9ffe | |
|
e133318b04 | |
|
4719ef8b3f | |
|
6233ad5d7f | |
|
ab7556fa1a | |
|
4bbe3a8938 | |
|
be452bd797 | |
|
3749a46451 | |
|
9e30b8d61c | |
|
6470bd021f | |
|
bd44102b37 | |
|
f578c5768a | |
|
dd6e6c8566 | |
|
e94a7cd3de | |
|
0b0f728a07 | |
|
42c51e6273 | |
|
67673bbbc9 | |
|
66a1bc261c | |
|
109cc3b6d8 | |
|
7bd81fce25 | |
|
bc79d3203b | |
|
ad7ac2c057 | |
|
fcd5bd7074 | |
|
b5aac390f4 | |
|
1ad8f9d9a8 | |
|
c34dcc0896 | |
|
c756eb438c | |
|
2818bfbafe | |
|
a5dca971c3 | |
|
ec82c287a0 | |
|
bd3855d56f | |
|
82f4d1246c | |
|
068faa811c | |
|
22f33f761a | |
|
c343383d2d | |
|
072c4fd783 | |
|
d58278e68b | |
|
b6eb106c2b | |
|
8369db761b | |
|
fe8f8ae2dc | |
|
8c9235b8ae | |
|
e40718ac33 | |
|
8447cc9d64 | |
|
b5dda86aaa | |
|
178a2b353e | |
|
7c3ff2ddc9 | |
|
640ac3e6c3 | |
|
9ecb6316c6 | |
|
0666269690 | |
|
84e94992b5 | |
|
d89573117d | |
|
0a21375c98 | |
|
56cdd4fe5c | |
|
fda9d9b4c2 | |
|
fae6392902 | |
|
f5a2707ac0 | |
|
e6e62cf4db | |
|
2c9c72a7f8 | |
|
0af557e264 | |
|
917a5ae91e | |
|
5a8580cc9f | |
|
cb83bfcfcf | |
|
d86764db08 | |
|
37f099e79e | |
|
8561af077c | |
|
1c3c0b9022 | |
|
349fbb1907 | |
|
9a96610008 | |
|
e6a84448cd | |
|
831f2eca59 | |
|
fa8fa16525 | |
|
59abeccf7f | |
|
090788f6cf | |
|
da61aa50a3 | |
|
8cf3682c30 | |
|
88753616b5 | |
|
994dc32b73 | |
|
3df0c2a211 | |
|
6a2ef4eb55 | |
|
a13345d668 | |
|
6b1d673846 | |
|
78eaaf1692 | |
|
d6ba5ecaa6 | |
|
1dfaacb345 | |
|
b5eed495a7 | |
|
ac248370e0 | |
|
162ca166cc | |
|
c231fedb49 | |
|
fc8e11ed0b | |
|
26c967c55a | |
|
5ff9a44d07 | |
|
2d23c1a178 | |
|
8516612166 | |
|
3e12e43933 | |
|
48701a11ee | |
|
794d82c4bb | |
|
24c8158dca | |
|
63da8728ac | |
|
7ce4e8b8d0 | |
|
00b4dc4c40 | |
|
bc08231ec4 | |
|
9b260c67ec | |
|
d033043918 | |
|
5c255ba997 | |
|
7c4b1746ad | |
|
5c30867158 | |
|
f5af49ee53 | |
|
4e6bd9e681 | |
|
f2048e8f21 | |
|
8e7a74f039 | |
|
5ae1107a48 | |
|
db6dc20f65 | |
|
c336ee0998 | |
|
c28fef5ce0 | |
|
824da7c02c | |
|
bad5b52a1d | |
|
6379d5ca0c | |
|
69d400b624 | |
|
781744dc66 | |
|
a894ff70e1 | |
|
58d949cd37 | |
|
cb0531888c | |
|
17e4012424 | |
|
4f2a3fa800 | |
|
0215b96829 | |
|
25f4cf7a49 | |
|
077dacfd10 | |
|
6c79c46370 | |
|
d18fb11d6b | |
|
721e24effb | |
|
5067bc6bd5 | |
|
e24efe00e9 | |
|
9c33be848a | |
|
9abc8e1df3 | |
|
38f43fef88 | |
|
1e56855862 | |
|
99c54a6b0d | |
|
938d1b021d | |
|
42b3624872 | |
|
e4a5abc0b0 | |
|
de2f62e51b | |
|
6c66529669 | |
|
30fc1d5fc5 | |
|
f2c578de42 | |
|
cd30503cec | |
|
aa07545a47 | |
|
c2b971d39e | |
|
f96892f64f | |
|
e4c7e9b9c0 | |
|
3669446940 | |
|
4b1644c364 | |
|
eba9294240 | |
|
b9ecad9970 | |
|
227f2ac099 | |
|
2ca5ad8854 | |
|
8cd5254cef | |
|
8c1396cffe | |
|
7d93b26cf1 | |
|
819320077a | |
|
74dbd5d9eb | |
|
0fa040a365 | |
|
891e3149b5 | |
|
65552a00c1 | |
|
6cb13a8489 | |
|
f09de40dd6 | |
|
89da588c23 | |
|
dfdee2502f | |
|
11d051a5e0 | |
|
01204acc9e | |
|
a6e4c34a3d | |
|
e13f9de6e3 | |
|
d470e802ac | |
|
3e1ae974c2 | |
|
d45716e692 | |
|
a7c8217c4d | |
|
869afd9b7a | |
|
4b19237e2a | |
|
a60f54b39f | |
|
9da8c49f56 | |
|
e00c8e84f4 | |
|
e839f44520 | |
|
85d3d00bee | |
|
e8a55246dc | |
|
d55097b910 | |
|
30669fb51a | |
|
9927dda84e | |
|
8fd7555a80 | |
|
aa29293921 | |
|
f9454fd46c | |
|
337c21a4fd | |
|
29c1bdd767 | |
|
dfea7763d5 | |
|
ecda64019c | |
|
2e0905ede3 | |
|
ccc66221e5 | |
|
cc75a0d3d5 | |
|
0295f818f1 | |
|
220f331061 | |
|
47a0f8c7c3 | |
|
f0bffce76f | |
|
5de33a202e | |
|
64dcee8b2e | |
|
5efc5cdb4d | |
|
67681b9ea4 | |
|
11eb268a5e | |
|
0e5f318c20 | |
|
16d46f084c | |
|
9ccd2174be | |
|
7eca0d21d1 | |
|
483bc67882 | |
|
45308c4d38 | |
|
1c6319a201 | |
|
1538fcb032 | |
|
94ebae490b | |
|
d796c48c1d | |
|
2b12b1c042 | |
|
c93d9ec8f8 | |
|
17ec6ae54a | |
|
b0acb68221 | |
|
0cefd790de | |
|
ce5a2e774d | |
|
69bc49c857 | |
|
31caff1096 | |
|
129811d56a | |
|
262726a6ae | |
|
223d8c90e9 | |
|
0731267ad4 | |
|
443479b566 | |
|
376a56b947 | |
|
5d0e8f1698 | |
|
23c8f2ccfe | |
|
213ddb9e84 | |
|
d149877076 | |
|
0dc3237eec | |
|
38da9b6ba5 | |
|
2cd994c9ae | |
|
b18e4bbbe2 | |
|
f87d29c74c | |
|
62bbf5e370 | |
|
399dc593df | |
|
51815490af | |
|
85f42df8cf | |
|
7be4fecff1 | |
|
3564090181 | |
|
004333ea13 | |
|
be49083c79 | |
|
fbbbfb0650 | |
|
42f1acdb1d | |
|
652db2a450 | |
|
82b5624d8b | |
|
afefa2cac8 | |
|
bdb42a2627 | |
|
3bbdbcd89d | |
|
54b985360f | |
|
a1bf99d221 | |
|
02eb980337 | |
|
284b4f34d2 | |
|
6f8c27b722 | |
|
5e55531f65 | |
|
76b2968cf5 | |
|
4cca6021c0 | |
|
88d21e156c | |
|
2b452eed20 | |
|
eb4e3fac43 | |
|
750f7db215 | |
|
9000b1f610 | |
|
2ed0e296d0 | |
|
c08cf04da0 | |
|
0245c68e6c | |
|
8ac6bd0706 | |
|
08cbbc24c4 | |
|
62a3f1076d | |
|
b5db38a4be | |
|
8bae48a8ba | |
|
1cc06d6cb8 | |
|
63fb940b91 | |
|
6c7dca354f | |
|
68e4ebd14d | |
|
afd8a8b4cd | |
|
c0d389fbe2 | |
|
0b91158601 | |
|
95b502a584 | |
|
cb36ce4284 | |
|
1214c24e92 | |
|
6ddb79b247 | |
|
b44acdb267 | |
|
e10246589b | |
|
49f2fa6d81 | |
|
2b3b66c95b | |
|
040cbd7d80 | |
|
6a0bc85755 | |
|
2ce6f8703f | |
|
cc9bb06a36 | |
|
2ecc93aaa6 | |
|
7d932f8dfa | |
|
606eacee54 | |
|
c714fdbc80 | |
|
cd49d3d5fa | |
|
64d1efdacc | |
|
2305194fed | |
|
dcf3dc9b26 | |
|
2c91bebb86 | |
|
c1e1bbbdcc | |
|
1cdf5375f4 | |
|
3744517651 | |
|
15536eb92e | |
|
0029acbe4d | |
|
f1acac75c2 | |
|
f3d2c23257 | |
|
28136fad4b | |
|
ef20a8ca6e | |
|
a9048fa27c | |
|
a8aa00abac | |
|
e312446078 | |
|
aa9d6a53da | |
|
1719146ba9 | |
|
7055d38f9f | |
|
d26a6b2236 | |
|
823cc59e0b | |
|
22e7adcd9a | |
|
d766576574 | |
|
e8eb746daf | |
|
8b55b547a3 | |
|
efb977a54a | |
|
d24d0f140b | |
|
b2f9e501de | |
|
62437fc58b | |
|
fe3bbd3968 | |
|
f74b933663 | |
|
b9ad5c6bdb | |
|
3b22e4403a | |
|
9b3a226621 | |
|
0421e49a63 | |
|
5581f111ba | |
|
ffa6406a3e | |
|
1ef436455b | |
|
c56dca9969 | |
|
de776f26eb | |
|
4543537192 | |
|
6ca5e3b7d8 | |
|
2f5e1fc2b3 | |
|
38fd3be731 | |
|
45e577db03 | |
|
072a4e0c6b | |
|
f5823f8268 | |
|
7203a9b29f | |
|
7f8374afd8 | |
|
8e749725ee | |
|
16a0204a50 | |
|
943dc6d29c | |
|
4c38b485cd | |
|
e15f198cdc | |
|
53c11b2b7e | |
|
164a499b64 | |
|
414f0dc5b0 | |
|
961f0c1aa2 | |
|
0f915c9dce | |
|
107e9314e0 | |
|
63e7c8d543 | |
|
c07d71a377 | |
|
fad4138197 | |
|
7b11d88989 | |
|
d1e6a743ff | |
|
4242e9c55b | |
|
fcb91cb04e | |
|
f59a712ec7 | |
|
240a6d2000 | |
|
4646a9f215 | |
|
d9d863e392 | |
|
e64f697f84 | |
|
205d944162 | |
|
2d910199b8 | |
|
36dd368fc1 | |
|
90d34f2419 | |
|
0e5c1c6062 | |
|
ea6a9247a7 | |
|
9b1851ebe0 | |
|
cf4c77065e | |
|
61300cb911 | |
|
d3c5cd88d2 | |
|
0dfcb28fe8 | |
|
6e86afa0ae | |
|
43d8b38e72 | |
|
1c94cf330c | |
|
73b24b0c24 | |
|
7804577dbc | |
|
a3ad1c4735 | |
|
9324d3d058 | |
|
818aa7e332 | |
|
dcb38f34ec | |
|
2f7d45d26c | |
|
6f0ba9dfe7 | |
|
f6bf9b3c3e | |
|
83cfd74c00 | |
|
c420a5ce75 | |
|
6c1736c4be | |
|
ceab5205ab | |
|
3f53834c63 | |
|
25a7728e42 | |
|
8633261fcc | |
|
de122578b8 | |
|
53698788b4 | |
|
36890c5774 | |
|
cf5eae198d | |
|
203624d230 | |
|
70c784857f | |
|
b0ca8f0088 | |
|
bf2c276645 | |
|
f082b93e03 | |
|
709480d89c | |
|
785a53b707 | |
|
5272d55958 | |
|
1f77dc1eb4 | |
|
7eeb222f63 | |
|
54804fef53 | |
|
ca42602897 | |
|
b5ca68369f | |
|
108dbf37fd | |
|
5aab322f0b | |
|
dbac795f53 | |
|
e560d9ef50 | |
|
70e4da2767 | |
|
c42d65c73b | |
|
3edf2a39e7 | |
|
3a957550f1 | |
|
3aa97dbe39 | |
|
bd998f8b03 | |
|
099b242b75 | |
|
c9778b8606 | |
|
7e6895d4a0 | |
|
4859c37257 | |
|
7c6e3641e6 | |
|
c42f93e4b2 | |
|
31f82d5a4a | |
|
b508cb7390 | |
|
3238c5c27d | |
|
76e584706a | |
|
a557fd67c5 | |
|
1b0648b4b2 | |
|
b3a3c97331 | |
|
7ed9021cd0 | |
|
5ebab34214 | |
|
c69c690e74 | |
|
ca0087f803 | |
|
dc39cd3992 | |
|
5ab8818c56 | |
|
b3cd0cf762 | |
|
66126dbd2d | |
|
3c9ba61d26 | |
|
78140a14d7 | |
|
1b5a5990f0 | |
|
55ec192a11 | |
|
2af4c9bc6e | |
|
cfbb6f42cd | |
|
4473957f99 | |
|
1cf576f63c | |
|
c9135d0da2 | |
|
0af965ec38 | |
|
5425e26980 | |
|
b2a17f13cf | |
|
7ef1dfcd18 | |
|
70e5f92ef1 | |
|
acca0faa04 | |
|
241fb6aea2 | |
|
3d42d82787 | |
|
a0d08e14a5 | |
|
7c28b0e017 | |
|
d253b6e342 | |
|
ea77ba0a3d | |
|
2480aefb8f | |
|
6200a6d46a | |
|
19f4480590 | |
|
eaf73bcd0b | |
|
8c4b97a5b1 | |
|
23aea72241 | |
|
d54f7f548b | |
|
8e3bb33d27 | |
|
78f9836ee7 | |
|
7f179214c6 | |
|
00ae316488 | |
|
2b24bc2631 | |
|
941600a79a | |
|
7023e28eda | |
|
d60127ef83 | |
|
31a03ce7cc | |
|
0d13549119 | |
|
69da2e2816 | |
|
34dbcad54e | |
|
5f6fadc2a8 | |
|
286f5d21d8 | |
|
d93f4ceb10 | |
|
13d586b773 | |
|
b19c35ae75 | |
|
e635a4d9ea | |
|
c6da3d32c6 | |
|
113d4a5f04 | |
|
38f438e5f9 | |
|
22139a12a4 | |
|
12d2151e37 | |
|
68a0c95c75 | |
|
c27f0eb857 | |
|
ee89452166 | |
|
6556fb4774 | |
|
6926cbb166 | |
|
3d30c6138e | |
|
8b24696e94 | |
|
6071180157 | |
|
cb0977ec05 | |
|
a290429994 | |
|
12381ceac9 | |
|
74987db9ec | |
|
6f4e6a6799 | |
|
0971ed64c5 | |
|
84a907821c | |
|
fb99d03885 | |
|
f0a281acc7 | |
|
fff2286a4f | |
|
9a38d64b09 | |
|
9c1d42a80b | |
|
5251a374c1 | |
|
a4116522f4 | |
|
b6f906510c | |
|
84b4f4bc8e | |
|
d6803e7a3e | |
|
9b8ce70d31 | |
|
2f5f7ab634 | |
|
b73e684e39 | |
|
6ff2b8f6b6 | |
|
99d3916059 | |
|
c594bc9127 | |
|
3eabdb4ea0 | |
|
0bacb899db | |
|
e32ab1ef6e | |
|
7b8a292034 | |
|
2bed4f6913 | |
|
f8b44afe76 | |
|
93157a56a2 | |
|
02371f51ae | |
|
7875d90ac3 | |
|
739a17d036 | |
|
a91b0ee979 | |
|
f004b623c5 | |
|
a0941e5c57 | |
|
1beb4b7252 | |
|
bb56733d7e | |
|
07cc775422 | |
|
c46921dc46 | |
|
bf075a396e | |
|
3e8a33051c | |
|
7fa73214c3 | |
|
e9ed0550ee | |
|
06e460a086 | |
|
79d38c1a07 | |
|
022a7175e8 | |
|
df78d34cb9 | |
|
b7da4a0db5 | |
|
2b48fbc346 | |
|
2b94a30d0c | |
|
8595c80794 | |
|
1b22efda6b | |
|
10d1be5736 | |
|
3e5ce4ab11 | |
|
0f15c72088 | |
|
06fc1ec45a | |
|
04e6a94323 | |
|
cbd74d2637 | |
|
443f3594ae | |
|
a6883e1990 | |
|
c999852ef0 | |
|
d2df8de6f5 | |
|
782bf618cf | |
|
7c00f57c14 | |
|
6dc9f550fe | |
|
3cc690dabe | |
|
72b7b64ad5 | |
|
44a24c4922 | |
|
765a89c46d | |
|
b219f5634e | |
|
ba4935a90e | |
|
4a5417a03a | |
|
155aceee2c | |
|
b050be28ab | |
|
eda9c4929c | |
|
619cf89f56 | |
|
8c3ce9a47f | |
|
bd207f4d9f | |
|
4cdabc6492 | |
|
9219ddfcf7 | |
|
2d049bee8d | |
|
b02d2a604e | |
|
6603ad049f | |
|
d5b3708baa | |
|
d18c3b1329 | |
|
094050c618 | |
|
bae6bea9b4 | |
|
85b827ae83 | |
|
899ef2ba94 | |
|
54984087e7 | |
|
cec9a1fc28 | |
|
999a8a163e | |
|
0e3560ace2 | |
|
c23d56ce2b | |
|
e4727eaf32 | |
|
2f080749fd | |
|
5689bb8c3c | |
|
ea850917b2 | |
|
f621dec002 | |
|
1e22bb13ac | |
|
d4f1267f71 | |
|
94d4aff0b7 | |
|
8f1c681e9f | |
|
f192704225 | |
|
46770ac771 | |
|
63e98043ff | |
|
a77489d01e | |
|
829e6857c8 | |
|
7946766adf | |
|
15fd047a46 | |
|
a798fd8fba | |
|
0e0e5d7977 | |
|
f44d250076 | |
|
35b4f5f47f | |
|
b8bdf2a2df | |
|
0f243f95f9 | |
|
1b788e566e | |
|
ce84ce971e | |
|
494cebdecd | |
|
1e71a2a9f2 | |
|
d0b04002f0 | |
|
9b857c24c7 | |
|
0ae01458cc | |
|
0c054560a6 | |
|
5d2cc25dd6 | |
|
a0c3a520a5 | |
|
5e8b762a48 | |
|
888e2cd216 | |
|
161574c5b8 | |
|
dbaeb4ecdb | |
|
1dd5cb2be1 | |
|
2b18c34f38 | |
|
bd8024b662 | |
|
b681ebadfb | |
|
4ec9e45146 | |
|
c958914701 | |
|
3f3a2a7827 | |
|
6a6035ef2c | |
|
b84f9eef60 | |
|
61df3cb24e | |
|
e81ae556e3 | |
|
dd3b318ddf | |
|
64ef975c01 | |
|
41ef36178c | |
|
c61d8fa549 | |
|
8e314e93cd | |
|
d1e94932cb | |
|
5252d8ef14 | |
|
cf2a908d2f | |
|
ac11135053 | |
|
3e3b3550a4 | |
|
0db901bbcb | |
|
503401079a | |
|
133037f2af | |
|
ee055c05cf | |
|
6f347379ed | |
|
034a9b2206 | |
|
9523e26e53 | |
|
5d42b75cf1 | |
|
a50fabac12 | |
|
775f7b78d6 | |
|
137a3a2882 | |
|
2e4a4c25df | |
|
fa088bd79f | |
|
309c20b29b | |
|
aefe13d877 | |
|
c6720cd57c | |
|
9fba262d68 | |
|
13273ceb08 | |
|
e668fec3ed | |
|
3d3f5c395a | |
|
fdd05a1698 | |
|
7f03d0c307 | |
|
b6898c5ee6 | |
|
f8f991442b | |
|
dd481041a4 | |
|
909fe3e834 | |
|
d9eb0250d2 | |
|
dea5226f7a | |
|
cdc8599ee4 | |
|
b88bdb1c55 | |
|
d4bb96eb04 | |
|
2e50a3b090 | |
|
09aa409999 | |
|
9c9b27153a | |
|
36886c4178 | |
|
7cb4a93f04 | |
|
fab0804421 | |
|
fb38a4bbb4 | |
|
689bbb4f76 | |
|
f5c675ecc6 | |
|
e2a12bf096 | |
|
79795ace45 | |
|
7b59b25d8e | |
|
f16ed354bf | |
|
82f0b26aff | |
|
3fd02e17a1 | |
|
9b647d0f6b | |
|
34a057f34e | |
|
6e3a1ec197 | |
|
70d92b847a | |
|
da3e5ad84f | |
|
51ab4189a5 | |
|
f1717f9f13 | |
|
f04a1f12a9 | |
|
abe2cfb113 | |
|
8f5fab811b | |
|
70e5a05e06 |
|
@ -3,7 +3,7 @@
|
|||
"isRoot": true,
|
||||
"tools": {
|
||||
"nuke.globaltool": {
|
||||
"version": "6.3.0",
|
||||
"version": "9.0.4",
|
||||
"commands": [
|
||||
"nuke"
|
||||
]
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
appender
|
||||
appenders
|
||||
CNCF
|
||||
opentelemetry
|
||||
OTEL
|
||||
OTLP
|
||||
parentbased
|
||||
tracecontext
|
||||
traceidratio
|
||||
triager
|
||||
Zipkin
|
||||
parentbased
|
||||
traceidratio
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
Piotr
|
||||
kowicz
|
||||
Paulo
|
||||
Janotti
|
||||
kowicz
|
||||
Kuusmann
|
||||
Mateusz
|
||||
Ordyna
|
||||
Paperin
|
||||
Paulo
|
||||
Pimentel
|
||||
Piotr
|
||||
Rajkumar
|
||||
Rangaraj
|
||||
Rasmus
|
||||
Kuusmann
|
||||
Paperin
|
||||
Pimentel
|
||||
Ordyna
|
||||
Redondo
|
||||
|
|
|
@ -1,35 +1,43 @@
|
|||
CORECLR
|
||||
netcoreapp
|
||||
NGEN
|
||||
CLSID
|
||||
MSVC
|
||||
corerun
|
||||
lldb
|
||||
SIGUSR
|
||||
callq
|
||||
movq
|
||||
movl
|
||||
dlerror
|
||||
popq
|
||||
libcoreclr
|
||||
eetoprofinterfaceimpl
|
||||
LPCSTR
|
||||
ASSERTE
|
||||
CONTRACTL
|
||||
nullptr
|
||||
dlopen
|
||||
ILREWRITE
|
||||
aspnet
|
||||
struct
|
||||
typeof
|
||||
cref
|
||||
corprof
|
||||
idls
|
||||
midl
|
||||
stdlibc
|
||||
corelib
|
||||
ASPNETCORE
|
||||
HOSTINGSTARTUPASSEMBLIES
|
||||
ASSERTE
|
||||
autoinstrumentation
|
||||
Bootstrapper
|
||||
NETFX
|
||||
buildtasks
|
||||
callq
|
||||
CLSID
|
||||
CONTRACTL
|
||||
CORECLR
|
||||
corehost
|
||||
COREHOST
|
||||
corelib
|
||||
corerun
|
||||
corprof
|
||||
cref
|
||||
dlerror
|
||||
dlopen
|
||||
eetoprofinterfaceimpl
|
||||
HOSTINGSTARTUPASSEMBLIES
|
||||
idls
|
||||
iisreset
|
||||
ILREWRITE
|
||||
libcoreclr
|
||||
lldb
|
||||
LPCSTR
|
||||
midl
|
||||
movl
|
||||
movq
|
||||
MSVC
|
||||
netcoreapp
|
||||
NETFX
|
||||
NGEN
|
||||
nullptr
|
||||
nupkg
|
||||
popq
|
||||
SIGUSR
|
||||
snupkg
|
||||
stdlibc
|
||||
struct
|
||||
TRACEFILE
|
||||
typeof
|
||||
Xunit
|
||||
|
|
|
@ -1,47 +1,73 @@
|
|||
appcmd
|
||||
AWSSDK
|
||||
AZUREAPPSERVICE
|
||||
bazel
|
||||
bazelized
|
||||
bazelversion
|
||||
bitness
|
||||
bytecode
|
||||
Bzlmod
|
||||
cmake
|
||||
Codespaces
|
||||
Contoso
|
||||
coreutils
|
||||
corhlpr
|
||||
Couchbase
|
||||
DBSTATEMENT
|
||||
distro
|
||||
Dockerfiles
|
||||
ducktype
|
||||
dylib
|
||||
ELASTICTRANSPORT
|
||||
ENTITYFRAMEWORKCORE
|
||||
envvars
|
||||
GRPCNETCLIENT
|
||||
HKLM
|
||||
HTTPCLIENT
|
||||
ifdef
|
||||
ILOGGER
|
||||
inetsrv
|
||||
JIT
|
||||
LINQ
|
||||
MASSTRANSIT
|
||||
metricsexporter
|
||||
mkdir
|
||||
mktemp
|
||||
monocytogenes
|
||||
MSMQ
|
||||
MSYS
|
||||
myapp
|
||||
mycompanymyproductmylibrary
|
||||
MYSQLCONNECTOR
|
||||
MYSQLDATA
|
||||
NETRUNTIME
|
||||
Npgsql
|
||||
NSERVICEBUS
|
||||
omnisharp
|
||||
OPENTRACING
|
||||
OPERATINGSYSTEM
|
||||
ORACLEMDA
|
||||
OTEL_DOTNET_AUTO_FLUSH_ON_UNHANDLEDEXCEPTION
|
||||
OWIN
|
||||
pipefail
|
||||
portfile
|
||||
PROCESSRUNTIME
|
||||
proto
|
||||
protobuf
|
||||
protos
|
||||
RABBITMQ
|
||||
Serilog
|
||||
spdlog
|
||||
srcs
|
||||
SQLCLIENT
|
||||
sqlserver
|
||||
STACKEXCHANGEREDIS
|
||||
TMPDIR
|
||||
tracesexporter
|
||||
unencrypted
|
||||
UNENCRYPTEDSUPPORT
|
||||
uninstallation
|
||||
unregistration
|
||||
vcpkg
|
||||
ILOGGER
|
||||
NSERVICEBUS
|
||||
NETRUNTIME
|
||||
HTTPCLIENT
|
||||
STACKEXCHANGEREDIS
|
||||
SQLCLIENT
|
||||
NSERVICEBUS
|
||||
MYSQLDATA
|
||||
MASSTRANSIT
|
||||
HTTPCLIENT
|
||||
GRPCNETCLIENT
|
||||
ENTITYFRAMEWORKCORE
|
||||
WCFCLIENT
|
||||
WCFSERVICE
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# Set line endings to LF, even on Windows. Otherwise, execution within Docker fails.
|
||||
# See https://help.github.com/articles/dealing-with-line-endings/
|
||||
*.sh text eol=lf
|
||||
*.sh.template text eol=lf
|
||||
*.bash text eol=lf
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -39,3 +39,5 @@ NOTE: If possible, also include the log files found (by default) in:
|
|||
Windows: %ProgramData%\OpenTelemetry .NET AutoInstrumentation\logs\
|
||||
Linux and macOS: /var/log/opentelemetry/dotnet/
|
||||
--!>
|
||||
|
||||
<sub>**Tip**: [React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with 👍 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>
|
||||
|
|
|
@ -23,3 +23,5 @@ A clear and concise description of any alternative solutions or features you've
|
|||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
|
||||
<sub>**Tip**: [React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with 👍 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>
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
# Please add the entries in alphabetically sorted order
|
||||
components:
|
||||
CHANGELOG.md:
|
||||
- pauljwil
|
||||
- theletterf
|
||||
docs/:
|
||||
- pauljwil
|
||||
- theletterf
|
||||
|
|
|
@ -12,258 +12,13 @@ updates:
|
|||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
# Maintain dependencies for workflows checking the markdown files
|
||||
- package-ecosystem: npm
|
||||
- package-ecosystem: docker
|
||||
directory: /test/IntegrationTests/docker
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /build
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /examples/demo/Client
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /examples/demo/Service
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /examples/playground/AspNetCoreMvc
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /src
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /src/OpenTelemetry.AutoInstrumentation
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
ignore:
|
||||
- dependency-name: "MySql.Data"
|
||||
- dependency-name: "StackExchange.Redis"
|
||||
- dependency-name: "Pipelines.Sockets.Unofficial" # Pipelines.Sockets.Unofficial is tranistive dependency required by OpenTelemetry.Instrumentation.StackExchangeRedis
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /src/OpenTelemetry.AutoInstrumentation.AdditionalDeps
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /src/OpenTelemetry.AutoInstrumentation.Loader
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /src/OpenTelemetry.AutoInstrumentation.Native
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /src/OpenTelemetry.AutoInstrumentation.StartupHook
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/IntegrationTests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/OpenTelemetry.AutoInstrumentation.Bootstrapping.Tests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/OpenTelemetry.AutoInstrumentation.Loader.Tests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/OpenTelemetry.AutoInstrumentation.Native.Tests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/OpenTelemetry.AutoInstrumentation.Tests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/dependency-libs/TestApplication.ExampleLibrary
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/dependency-libs/TestApplication.ExampleLibraryTracer
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.AspNet.NetFramework
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.GraphQL
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
ignore:
|
||||
# The instrumentation only supports specific versions of GraphQL and the test app needs to test against a specific version
|
||||
- dependency-name: "GraphQL*"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.Http
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.Quartz
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.MassTransit
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.MongoDB
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.MySqlData
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.Npgsql
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.Plugins
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.Smoke
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.SqlClient
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/integrations/TestApplication.StackExchangeRedis
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
||||
- package-ecosystem: nuget
|
||||
directory: /test/test-applications/mocks/OpenTelemetry.AutoInstrumentation.Mock
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "dependencies"
|
||||
- ".NET"
|
||||
- "do NOT merge"
|
||||
|
|
|
@ -7,14 +7,17 @@ on:
|
|||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
assign:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
name: Assign Reviewers
|
||||
steps:
|
||||
- uses: dyladan/component-owners@main
|
||||
|
||||
- name: Assign reviewers
|
||||
uses: dyladan/component-owners@58bd86e9814d23f1525d0a970682cead459fa783 # tag: v0.1.0
|
||||
with:
|
||||
assign-owners: "false"
|
||||
request-owner-reviews: "true"
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
name: Build on Containers
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/packages
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
||||
jobs:
|
||||
build-container:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- machine: ubuntu-22.04
|
||||
base-image: alpine
|
||||
os-type: linux-musl
|
||||
architecture: x64
|
||||
- machine: ubuntu-22.04-arm
|
||||
base-image: alpine
|
||||
os-type: linux-musl
|
||||
architecture: arm64
|
||||
runs-on: ${{ matrix.machine }}
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Build in Docker container
|
||||
run: |
|
||||
set -e
|
||||
docker build -t mybuildimage -f "./docker/${{ matrix.base-image }}.dockerfile" .
|
||||
docker run -e OS_TYPE=${{ matrix.os-type }} --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \
|
||||
/bin/sh -c 'git config --global --add safe.directory /project && ./build.sh BuildWorkflow'
|
||||
|
||||
- name: Test the Shell scripts from README.md in Docker container
|
||||
run: |
|
||||
set -e
|
||||
docker build -t mybuildimage -f "./docker/${{ matrix.base-image }}.dockerfile" .
|
||||
docker run --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project --rm mybuildimage /bin/sh -c '
|
||||
set -e
|
||||
dotnet publish -f net9.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke
|
||||
export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home"
|
||||
. ./instrument.sh
|
||||
./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/publish/TestApplication.Smoke
|
||||
test "$(ls -A /var/log/opentelemetry/dotnet )"
|
||||
'
|
||||
|
||||
- name: Publish Linux build
|
||||
if: (${{ job.status }} != 'cancelled')
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: bin-${{ matrix.base-image }}-${{ matrix.architecture }}
|
||||
path: bin/tracer-home
|
||||
continue-on-error: true
|
|
@ -0,0 +1,109 @@
|
|||
name: Build NuGet Packages
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
# Output the NuGet version suffix so that the caller workflow can have the correct package version.
|
||||
nuget-version-suffix:
|
||||
description: "The NuGet version suffix to build the packages"
|
||||
value: ${{ jobs.build-nuget-packages.outputs.nuget-version-suffix }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/packages
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
||||
jobs:
|
||||
build-nuget-packages:
|
||||
# In principle this job "needs: [ build, build-container ]", however, that would cause the build and build-container
|
||||
# jobs to run twice, which is not what we want. Instead, we let the "caller" job handle the dependencies.
|
||||
outputs:
|
||||
nuget-version-suffix: ${{ steps.set-nuget-version-suffix.outputs.suffix }}
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
- name: Check for NuGet packages cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # tag: v4.2.4
|
||||
id: nuget-cache
|
||||
with:
|
||||
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }}
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
|
||||
- name: Download Windows Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-windows-2022
|
||||
path: bin/ci-artifacts/bin-windows-2022
|
||||
|
||||
- name: Download Ubuntu x64 Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-ubuntu-22.04
|
||||
path: bin/ci-artifacts/bin-ubuntu-22.04
|
||||
|
||||
- name: Download Ubuntu arm64 Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-ubuntu-22.04-arm
|
||||
path: bin/ci-artifacts/bin-ubuntu-22.04-arm
|
||||
|
||||
- name: Download Alpine x64 Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-alpine-x64
|
||||
path: bin/ci-artifacts/bin-alpine-x64
|
||||
|
||||
- name: Download Alpine arm64 Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-alpine-arm64
|
||||
path: bin/ci-artifacts/bin-alpine-arm64
|
||||
|
||||
- name: Download Mac-OS Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-macos-13
|
||||
path: bin/ci-artifacts/bin-macos-13
|
||||
|
||||
- name: Build NuGet packages
|
||||
run: ./build.cmd BuildNuGetPackages
|
||||
|
||||
- name: Install dotnet-validate
|
||||
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
|
||||
|
||||
- name: Install Meziantou.Framework.NuGetPackageValidation.Tool
|
||||
run: dotnet tool install --global Meziantou.Framework.NuGetPackageValidation.Tool --version 1.0.17
|
||||
|
||||
- name: Validate nuget packages
|
||||
shell: pwsh
|
||||
run: |
|
||||
foreach ($file in (Get-ChildItem bin/nuget-artifacts//*.nupkg)) {
|
||||
dotnet validate package local $($file)
|
||||
if (-not ($LASTEXITCODE -eq 0)) {
|
||||
throw "dotnet validate failed for $($file)";
|
||||
}
|
||||
meziantou.validate-nuget-package $($file)
|
||||
if (-not ($LASTEXITCODE -eq 0)) {
|
||||
throw "meziantou.validate-nuget-package validate failed for $($file)";
|
||||
}
|
||||
}
|
||||
|
||||
- name: Upload Nuget Artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: bin-nuget-packages
|
||||
path: bin/nuget-artifacts/
|
|
@ -0,0 +1,37 @@
|
|||
name: Build on Ubuntu 16.04 Native Container
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/packages
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
||||
jobs:
|
||||
build-ubuntu1604-native-container:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Build native library in Docker container
|
||||
run: |
|
||||
set -e
|
||||
docker build -t mybuildimage -f "./docker/ubuntu1604.dockerfile" .
|
||||
docker run -e OS_TYPE=linux-glibc --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \
|
||||
/bin/sh -c 'export PATH="$PATH:/usr/share/dotnet" && git config --global --add safe.directory /project && ./build.sh BuildNativeWorkflow'
|
||||
|
||||
- name: Publish native library Linux build
|
||||
if: (${{ job.status }} != 'cancelled')
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: bin-ubuntu1604-native
|
||||
path: bin/tracer-home
|
||||
continue-on-error: true
|
|
@ -0,0 +1,135 @@
|
|||
name: Build on Runners
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/packages
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- machine: windows-2022
|
||||
log-dir: "/c/ProgramData/OpenTelemetry .NET AutoInstrumentation/logs"
|
||||
- machine: ubuntu-22.04
|
||||
log-dir: "/var/log/opentelemetry/dotnet"
|
||||
- machine: macos-13
|
||||
log-dir: "/var/log/opentelemetry/dotnet"
|
||||
- machine: ubuntu-22.04-arm
|
||||
log-dir: "/var/log/opentelemetry/dotnet"
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
- name: Check for NuGet packages cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # tag: v4.2.4
|
||||
id: nuget-cache
|
||||
with:
|
||||
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }}
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
|
||||
- name: Restore NuGet packages
|
||||
if: ${{ steps.nuget-cache.outputs.cache-hit != 'true' }}
|
||||
continue-on-error: false
|
||||
run: ./build.cmd Restore
|
||||
|
||||
- name: Cache NuGet packages
|
||||
if: ${{ steps.nuget-cache.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # tag: v4.2.4
|
||||
with:
|
||||
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }}
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
|
||||
- name: Run BuildWorkflow
|
||||
run: ./build.cmd BuildWorkflow --no-restore ${{ steps.nuget-cache.outputs.cache-hit != 'true' }}
|
||||
|
||||
- name: Download native Ubuntu 16.04 Artifacts from build job
|
||||
if: ${{ matrix.machine == 'ubuntu-22.04' }}
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-ubuntu1604-native
|
||||
path: bin/ci-artifacts/bin-ubuntu1604-native
|
||||
|
||||
- name: Replace Ubuntu native code by Ubuntu 16.04 artifacts
|
||||
if: ${{ matrix.machine == 'ubuntu-22.04' }}
|
||||
run: |
|
||||
rm ./bin/tracer-home/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so
|
||||
cp ./bin/ci-artifacts/bin-ubuntu1604-native/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so ./bin/tracer-home/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so
|
||||
|
||||
- name: Install MacOS CoreUtils
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
run: brew install coreutils
|
||||
|
||||
- name: Create test directory
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
run: sudo mkdir -p ${{ matrix.log-dir }} && sudo chmod a+rwx ${{ matrix.log-dir }} # the instrumented process has no permissions to create log dir
|
||||
|
||||
- name: Test the Shell scripts from README.md
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
dotnet publish -f net9.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke
|
||||
export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home"
|
||||
. ./instrument.sh
|
||||
./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/publish/TestApplication.Smoke
|
||||
test "$(ls -A '${{ matrix.log-dir }}' )"
|
||||
|
||||
- name: Test the Windows PowerShell module instructions from README.md
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
$log_path = "C:\ProgramData\OpenTelemetry .NET AutoInstrumentation\logs\*"
|
||||
Import-Module "${PWD}/bin/installation-scripts/OpenTelemetry.DotNet.Auto.psm1"
|
||||
[System.Environment]::SetEnvironmentVariable("OTEL_DOTNET_AUTO_INSTALL_DIR", "${PWD}/bin/tracer-home", [System.EnvironmentVariableTarget]::Machine)
|
||||
Register-OpenTelemetryForCurrentSession -OTelServiceName "MyServiceDisplayName"
|
||||
./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/TestApplication.Smoke.exe
|
||||
if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" }
|
||||
if (-not (Test-Path $log_path)) { throw "Log file does not exist. Instrumentation test failed." }
|
||||
Remove-Item $log_path
|
||||
Unregister-OpenTelemetryForCurrentSession
|
||||
./test/test-applications/integrations/bin/TestApplication.Smoke/Release/net9.0/TestApplication.Smoke.exe
|
||||
if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" }
|
||||
if (Test-Path $log_path) { throw "Log file exists. Instrumentation unregister failed." }
|
||||
|
||||
- name: Upload binaries
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: bin-${{ matrix.machine }}
|
||||
path: bin/tracer-home
|
||||
|
||||
- name: Upload installation scripts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: installation-scripts-${{ matrix.machine }}
|
||||
path: bin/installation-scripts
|
||||
|
||||
- name: Regenerate LibraryVersions.g.cs
|
||||
# Regenerate the library versions file to surface any version changes made to the packages being tested.
|
||||
run: ./build.cmd GenerateLibraryVersionFiles
|
||||
|
||||
- name: Generated files unchanged
|
||||
shell: bash
|
||||
run: |
|
||||
git status
|
||||
git diff
|
||||
[[ -z "$(git status --porcelain)" ]]
|
|
@ -0,0 +1,27 @@
|
|||
name: SdkVersionCheck
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-sdk-versions:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: 9.0.304
|
||||
|
||||
- name: Run VerifySdkVersions
|
||||
run: ./build.cmd VerifySdkVersions
|
|
@ -4,164 +4,320 @@ on:
|
|||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/packages
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-container:
|
||||
uses: ./.github/workflows/build-container.yml
|
||||
|
||||
build-ubuntu1604-native:
|
||||
uses: ./.github/workflows/build-ubuntu1604-native-container.yml
|
||||
|
||||
build:
|
||||
needs: build-ubuntu1604-native
|
||||
uses: ./.github/workflows/build.yml
|
||||
|
||||
build-nuget-packages:
|
||||
needs: [ build, build-container ]
|
||||
uses: ./.github/workflows/build-nuget-packages.yml
|
||||
|
||||
test-build-managed:
|
||||
needs: build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test-tfm: [ net9.0, net8.0, net462 ]
|
||||
machine: [ windows-2022, windows-2025, ubuntu-22.04, macos-13, ubuntu-22.04-arm ]
|
||||
exclude:
|
||||
- test-tfm: net462
|
||||
machine: macos-13
|
||||
- test-tfm: net462
|
||||
machine: ubuntu-22.04
|
||||
- test-tfm: net462
|
||||
machine: ubuntu-22.04-arm
|
||||
include:
|
||||
- machine: windows-2022
|
||||
containers: none
|
||||
artifact-name: windows-2022
|
||||
- machine: windows-2025
|
||||
containers: none
|
||||
artifact-name: windows-2022
|
||||
- machine: ubuntu-22.04
|
||||
containers: linux
|
||||
artifact-name: ubuntu-22.04
|
||||
- machine: macos-13
|
||||
containers: none
|
||||
artifact-name: macos-13
|
||||
- machine: ubuntu-22.04-arm
|
||||
containers: linux
|
||||
artifact-name: ubuntu-22.04-arm
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
- name: Check for NuGet packages cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # tag: v4.2.4
|
||||
id: nuget-cache
|
||||
with:
|
||||
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }}
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
|
||||
- name: Download Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-${{ matrix.artifact-name }}
|
||||
path: bin/tracer-home
|
||||
|
||||
- name: Install SQL Server (localdb)
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
uses: potatoqualitee/mssqlsuite@7682f39841e862cde023c8bc97c55592c0af4eb0 # tag: v1.11
|
||||
with:
|
||||
install: localdb
|
||||
|
||||
- name: Run TestWorkflow
|
||||
run: ./build.cmd --skip NativeTests --target TestWorkflow --test-target-framework ${{ matrix.test-tfm }} --containers ${{ matrix.containers }}
|
||||
|
||||
- name: Upload test logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: test-logs-${{ matrix.machine }}-${{ matrix.test-tfm }}-containers-${{ matrix.containers }}
|
||||
path: test-artifacts/
|
||||
|
||||
- name: Delete SQL Server MSI
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: bash
|
||||
run: rm SqlLocalDB.msi
|
||||
|
||||
test-build-native:
|
||||
needs: build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- machine: windows-2022
|
||||
containers: windows
|
||||
log-dir: "/c/ProgramData/OpenTelemetry .NET AutoInstrumentation/logs"
|
||||
- machine: ubuntu-20.04
|
||||
containers: linux
|
||||
log-dir: "/var/log/opentelemetry/dotnet"
|
||||
- machine: macos-11
|
||||
containers: none
|
||||
log-dir: "/var/log/opentelemetry/dotnet"
|
||||
artifact-name: windows-2022
|
||||
- machine: windows-2025
|
||||
artifact-name: windows-2022
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- uses: actions/setup-dotnet@v3.0.3
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
7.0.x
|
||||
- name: Install SQL Server (localdb)
|
||||
uses: potatoqualitee/mssqlsuite@v1.7
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
with:
|
||||
install: localdb
|
||||
- run: ./build.cmd Workflow --containers ${{ matrix.containers }}
|
||||
- name: Upload logs
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
if: always()
|
||||
with:
|
||||
name: logs-${{ matrix.machine }}
|
||||
path: build_data/
|
||||
- run: brew install coreutils
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
- name: Create test directory
|
||||
run: sudo mkdir -p ${{ matrix.log-dir }} && sudo chmod a+rwx ${{ matrix.log-dir }} # the instrumented process has no permissions to create log dir
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
- name: Test the Shell scripts from README.md
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
dotnet publish -f net7.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke
|
||||
export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home"
|
||||
. ./instrument.sh
|
||||
./test/test-applications/integrations/TestApplication.Smoke/bin/Release/net7.0/publish/TestApplication.Smoke
|
||||
test "$(ls -A '${{ matrix.log-dir }}' )"
|
||||
- name: Test the PowerShell module instructions from README.md
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
$log_path = "C:\ProgramData\OpenTelemetry .NET AutoInstrumentation\logs\*"
|
||||
Import-Module "${PWD}/OpenTelemetry.DotNet.Auto.psm1"
|
||||
[System.Environment]::SetEnvironmentVariable("OTEL_DOTNET_AUTO_INSTALL_DIR", "${PWD}/bin/tracer-home", [System.EnvironmentVariableTarget]::Machine)
|
||||
Register-OpenTelemetryForCurrentSession -OTelServiceName "MyServiceDisplayName"
|
||||
./test/test-applications/integrations/TestApplication.Smoke/bin/Release/net7.0/TestApplication.Smoke.exe
|
||||
if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" }
|
||||
if (-not (Test-Path $log_path)) { throw "Log file does not exist. Instrumentation test failed." }
|
||||
Remove-Item $log_path
|
||||
Unregister-OpenTelemetryForCurrentSession
|
||||
./test/test-applications/integrations/TestApplication.Smoke/bin/Release/net7.0/TestApplication.Smoke.exe
|
||||
if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" }
|
||||
if (Test-Path $log_path) { throw "Log file exists. Instrumentation unregister failed." }
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
if: always()
|
||||
with:
|
||||
name: bin-${{ matrix.machine }}
|
||||
path: bin/tracer-home
|
||||
- name: Delete SQL Server MSI
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: bash
|
||||
run: |
|
||||
rm SqlLocalDB.msi
|
||||
- name: Generated files unchanged
|
||||
shell: bash
|
||||
run: |
|
||||
git status
|
||||
git diff
|
||||
[[ -z "$(git status --porcelain)" ]]
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
build-container:
|
||||
- name: Check for NuGet packages cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # tag: v4.2.4
|
||||
id: nuget-cache
|
||||
with:
|
||||
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }}
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
|
||||
- name: Download Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-${{ matrix.artifact-name }}
|
||||
path: bin/tracer-home
|
||||
|
||||
- name: Run NativeTests
|
||||
run: ./build.cmd NativeTests
|
||||
|
||||
test-build-windows-container-tests:
|
||||
needs: build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
base-image: [ alpine ]
|
||||
runs-on: ubuntu-20.04
|
||||
include:
|
||||
- machine: windows-2022
|
||||
containers: windows-only
|
||||
artifact-name: windows-2022
|
||||
- machine: windows-2025
|
||||
containers: windows-only
|
||||
artifact-name: windows-2022
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
- name: Check for NuGet packages cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # tag: v4.2.4
|
||||
id: nuget-cache
|
||||
with:
|
||||
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }}
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
|
||||
- name: Download Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-${{ matrix.artifact-name }}
|
||||
path: bin/tracer-home
|
||||
|
||||
- name: Build artifacts required for the test (no native tests)
|
||||
run: ./build.cmd --skip RunManagedTests --target ManagedTests --containers ${{ matrix.containers }}
|
||||
|
||||
- name: Run the integration tests
|
||||
run: ./build.cmd --target RunManagedIntegrationTests --containers ${{ matrix.containers }} --test-target-framework net462
|
||||
|
||||
- name: Upload test logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: test-logs-${{ matrix.machine }}-containers-${{ matrix.containers }}
|
||||
path: test-artifacts/
|
||||
|
||||
test-build-container:
|
||||
needs: [build, build-container]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- machine: ubuntu-22.04
|
||||
base-image: alpine
|
||||
build-source: alpine-x64
|
||||
os-type: linux-musl
|
||||
- machine: ubuntu-22.04
|
||||
base-image: debian
|
||||
build-source: ubuntu-22.04
|
||||
os-type: linux-glibc
|
||||
- machine: ubuntu-22.04
|
||||
base-image: centos-stream9
|
||||
build-source: ubuntu-22.04
|
||||
os-type: linux-glibc
|
||||
- machine: ubuntu-22.04-arm
|
||||
base-image: alpine
|
||||
build-source: alpine-arm64
|
||||
os-type: linux-musl
|
||||
- machine: ubuntu-22.04-arm
|
||||
base-image: debian-arm64
|
||||
build-source: ubuntu-22.04-arm
|
||||
os-type: linux-glibc
|
||||
runs-on: ${{ matrix.machine }}
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Download Artifacts from build job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-${{ matrix.build-source }}
|
||||
path: bin/tracer-home
|
||||
|
||||
- name: Build in Docker container
|
||||
run: |
|
||||
set -e
|
||||
docker build -t mybuildimage -f "./docker/${{ matrix.base-image }}.dockerfile" .
|
||||
docker run -e OS_TYPE=linux-musl --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \
|
||||
./build.sh Workflow --containers none
|
||||
- name: Test the Shell scripts from README.md in Docker container
|
||||
run: |
|
||||
set -e
|
||||
docker build -t mybuildimage -f "./docker/${{ matrix.base-image }}.dockerfile" .
|
||||
docker run -e OS_TYPE=linux-musl --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project --rm mybuildimage /bin/sh -c '
|
||||
set -e
|
||||
dotnet publish -f net7.0 -c Release ./test/test-applications/integrations/TestApplication.Smoke
|
||||
export OTEL_DOTNET_AUTO_HOME="${PWD}/bin/tracer-home"
|
||||
. ./instrument.sh
|
||||
./test/test-applications/integrations/TestApplication.Smoke/bin/Release/net7.0/publish/TestApplication.Smoke
|
||||
test "$(ls -A /var/log/opentelemetry/dotnet )"
|
||||
'
|
||||
- name: Publish Linux build
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: bin-${{ matrix.base-image }}
|
||||
path: bin/tracer-home
|
||||
if: (${{ job.status }} != 'cancelled')
|
||||
continue-on-error: true
|
||||
docker run -e OS_TYPE=${{ matrix.os-type }} --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \
|
||||
/bin/sh -c 'git config --global --add safe.directory /project && ./build.sh TestWorkflow --containers none'
|
||||
|
||||
pack:
|
||||
needs: build
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
test-nuget-packages:
|
||||
needs: build-nuget-packages
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- machine: ubuntu-22.04
|
||||
- machine: macos-13
|
||||
- machine: windows-2022
|
||||
- machine: windows-2025
|
||||
- machine: ubuntu-22.04-arm
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- uses: nuget/setup-nuget@v1.1.1
|
||||
|
||||
- name: Download Windows Artifacts from build job
|
||||
uses: actions/download-artifact@v3.0.2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-windows-2022
|
||||
path: nuget/bin-windows
|
||||
fetch-depth: 0 # fetching all, needed to correctly calculate version
|
||||
|
||||
- name: Download Ubuntu Artifacts from build job
|
||||
uses: actions/download-artifact@v3.0.2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
name: bin-ubuntu-20.04
|
||||
path: nuget/bin-linux-glibc
|
||||
dotnet-version: |
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
- name: Download Alpine Artifacts from build job
|
||||
uses: actions/download-artifact@v3.0.2
|
||||
- name: Check for NuGet packages cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # tag: v4.2.4
|
||||
id: nuget-cache
|
||||
with:
|
||||
name: bin-alpine
|
||||
path: nuget/bin-linux-musl
|
||||
key: ${{ hashFiles('**/Directory.packages.props', './build/LibraryVersions.g.cs', '**/packages.config' ) }}
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
|
||||
- name: Download Mac-OS Artifacts from build job
|
||||
uses: actions/download-artifact@v3.0.2
|
||||
- name: Download NuGet Artifacts from build-nuget-packages job
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
name: bin-macos-11
|
||||
path: nuget/bin-macos
|
||||
name: bin-nuget-packages
|
||||
path: bin/nuget-artifacts/
|
||||
|
||||
- name: Build NuGet package
|
||||
run: nuget pack OpenTelemetry.AutoInstrumentation.nuspec -Properties NoWarn=NU5100,NU5123,NU5128
|
||||
working-directory: nuget
|
||||
- name: Test NuGet Packages
|
||||
run: ./build.cmd TestNuGetPackages
|
||||
|
||||
- name: Upload Nuget
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
- name: Upload test logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: OpenTelemetry.AutoInstrumentation.Nuget
|
||||
path: nuget/*.nupkg
|
||||
name: test-logs-nuget-packages-${{ matrix.machine }}
|
||||
path: test-artifacts/
|
||||
|
||||
test-jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- test-build-managed
|
||||
- test-build-native
|
||||
- test-build-container
|
||||
- test-nuget-packages
|
||||
- test-build-windows-container-tests
|
||||
steps:
|
||||
|
||||
- name: Test if test jobs passed
|
||||
run: |
|
||||
echo ${{ needs.test-build-managed.result }}
|
||||
test ${{ needs.test-build-managed.result }} == "success"
|
||||
echo ${{ needs.test-build-native.result }}
|
||||
test ${{ needs.test-build-native.result }} == "success"
|
||||
echo ${{ needs.test-build-container.result }}
|
||||
test ${{ needs.test-build-container.result }} == "success"
|
||||
echo ${{ needs.test-nuget-packages.result }}
|
||||
test ${{ needs.test-nuget-packages.result }} == "success"
|
||||
echo ${{ needs.test-build-windows-container-tests.result }}
|
||||
test ${{ needs.test-build-windows-container-tests.result }} == "success"
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
# 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:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'csharp' && 'windows-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# Needed for Code scanning upload
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: csharp
|
||||
build-mode: manual
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: configure Pagefile
|
||||
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# 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.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
name: Build Tracer
|
||||
run: ./build.cmd BuildTracer
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
|
@ -11,12 +11,22 @@ on:
|
|||
- examples/demo/**
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Test demo
|
||||
run: make test
|
||||
working-directory: examples/demo
|
||||
|
|
|
@ -11,23 +11,24 @@ on:
|
|||
paths:
|
||||
- '**.cs'
|
||||
- '.editorconfig'
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-format:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Setup .NET 7.0
|
||||
uses: actions/setup-dotnet@v3.0.3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
|
||||
- name: Install format tool
|
||||
run: dotnet tool install -g dotnet-format
|
||||
dotnet-version: 9.0.304
|
||||
|
||||
- name: dotnet format
|
||||
run: dotnet-format --folder --check
|
||||
run: dotnet format .\OpenTelemetry.AutoInstrumentation.sln --no-restore --verify-no-changes
|
||||
|
|
|
@ -4,18 +4,32 @@ on:
|
|||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-native-format:
|
||||
name: ${{ matrix.step-name }}
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
machine: [ windows-2022, ubuntu-20.04, macos-11 ]
|
||||
runs-on: ${{ matrix.machine }}
|
||||
include:
|
||||
- step-name: native-format-macos
|
||||
runner: macos-13-xlarge
|
||||
- step-name: native-format-linux
|
||||
runner: ubuntu-22.04
|
||||
- step-name: native-format-windows
|
||||
runner: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Install Clang tools
|
||||
shell: bash
|
||||
|
@ -24,3 +38,25 @@ jobs:
|
|||
- name: Format native code
|
||||
shell: bash
|
||||
run: ./scripts/format-native.sh
|
||||
|
||||
check-native-headers:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag: v5.5.0
|
||||
with:
|
||||
go-version: '1.23.5'
|
||||
cache: false # Suppress a warning given that there are no go.sum files in the repo
|
||||
|
||||
- name: Verify all native files have license headers
|
||||
shell: bash
|
||||
run: |
|
||||
go install github.com/google/addlicense@v1.1.1
|
||||
addlicense -v -y "" -l "apache" -c "The OpenTelemetry Authors" -s=only -ignore **/lib/** src/OpenTelemetry.AutoInstrumentation.Native/
|
||||
git status
|
||||
git diff
|
||||
test -z "$(git status --porcelain)"
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1,47 @@
|
|||
name: OSSF Scorecard
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "15 2 * * 3" # 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@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
|
@ -0,0 +1,142 @@
|
|||
name: release-nextgen-forwarder-packages
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version number for the Forwarder packages (e.g., 1.0.0-alpha.1)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/packages
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
||||
jobs:
|
||||
build-nextgen-forwarder:
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
working-directory: next-gen
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: out-of-process-collection
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: 9.0.304
|
||||
|
||||
- name: Check for NuGet packages cache
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # tag: v4.2.4
|
||||
id: nuget-cache
|
||||
with:
|
||||
key: ${{ hashFiles('**/Directory.packages.props', '**/packages.config' ) }}
|
||||
path: ${{ env.NUGET_PACKAGES }}
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build projects
|
||||
run: dotnet build --no-restore --configuration Release /p:ContinuousIntegrationBuild=true
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test --no-build --configuration Release --verbosity normal
|
||||
|
||||
- name: Create NuGet packages directory
|
||||
run: New-Item -ItemType Directory -Path bin/nextgen-nuget-artifacts -Force
|
||||
shell: pwsh
|
||||
|
||||
- name: Pack OpenTelemetry.OutOfProcess.Forwarder
|
||||
run: |
|
||||
dotnet pack src/OpenTelemetry.OutOfProcess.Forwarder/OpenTelemetry.OutOfProcess.Forwarder.csproj `
|
||||
--no-build `
|
||||
--configuration Release `
|
||||
--output bin/nextgen-nuget-artifacts `
|
||||
/p:PackageVersion=${{ inputs.version }} `
|
||||
/p:AssemblyVersion=${{ inputs.version }} `
|
||||
/p:FileVersion=${{ inputs.version }} `
|
||||
/p:Version=${{ inputs.version }} `
|
||||
/p:ContinuousIntegrationBuild=true
|
||||
|
||||
- name: Pack OpenTelemetry.OutOfProcess.Forwarder.Configuration
|
||||
run: |
|
||||
dotnet pack src/OpenTelemetry.OutOfProcess.Forwarder.Configuration/OpenTelemetry.OutOfProcess.Forwarder.Configuration.csproj `
|
||||
--no-build `
|
||||
--configuration Release `
|
||||
--output bin/nextgen-nuget-artifacts `
|
||||
/p:PackageVersion=${{ inputs.version }} `
|
||||
/p:AssemblyVersion=${{ inputs.version }} `
|
||||
/p:FileVersion=${{ inputs.version }} `
|
||||
/p:Version=${{ inputs.version }} `
|
||||
/p:ContinuousIntegrationBuild=true
|
||||
|
||||
- name: Install dotnet-validate
|
||||
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
|
||||
|
||||
- name: Validate NuGet packages
|
||||
shell: pwsh
|
||||
run: |
|
||||
foreach ($file in (Get-ChildItem bin/nextgen-nuget-artifacts/*.nupkg)) {
|
||||
Write-Host "Validating package: $($file.Name)"
|
||||
dotnet validate package local $($file)
|
||||
if (-not ($LASTEXITCODE -eq 0)) {
|
||||
throw "dotnet validate failed for $($file)";
|
||||
}
|
||||
}
|
||||
|
||||
- name: List generated packages
|
||||
shell: pwsh
|
||||
run: |
|
||||
Write-Host "Generated packages:"
|
||||
Get-ChildItem bin/nextgen-nuget-artifacts/*.nupkg | ForEach-Object {
|
||||
Write-Host " - $($_.Name) ($([math]::Round($_.Length / 1KB, 2)) KB)"
|
||||
}
|
||||
|
||||
- name: Upload NuGet Artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: opentelemetry-nextgen-forwarder-packages
|
||||
path: |
|
||||
next-gen/bin/nextgen-nuget-artifacts/*.nupkg
|
||||
next-gen/bin/nextgen-nuget-artifacts/*.snupkg
|
||||
retention-days: 30
|
||||
|
||||
- name: Create GitHub Release Summary
|
||||
shell: pwsh
|
||||
run: |
|
||||
$summary = @"
|
||||
## 📦 Next-Gen Forwarder Packages Built
|
||||
|
||||
**Version:** ${{ inputs.version }}
|
||||
**Branch:** out-of-process-collection
|
||||
|
||||
### Built Packages:
|
||||
"@
|
||||
|
||||
foreach ($file in (Get-ChildItem bin/nextgen-nuget-artifacts/*.nupkg)) {
|
||||
$packageName = $file.BaseName -replace '\.\d+\.\d+\.\d+.*$', ''
|
||||
$summary += "`n- [$packageName]($file.Name) - $([math]::Round($file.Length / 1KB, 2)) KB"
|
||||
}
|
||||
|
||||
$summary += @"
|
||||
|
||||
|
||||
### Manual Publishing Steps:
|
||||
1. Download the artifact 'opentelemetry-nextgen-forwarder-packages' from this workflow run
|
||||
2. Extract the .nupkg files
|
||||
3. Publish manually using:
|
||||
``````
|
||||
dotnet nuget push OpenTelemetry.OutOfProcess.Forwarder.${{ inputs.version }}.nupkg --api-key YOUR_API_KEY --source https://api.nuget.org/v3/index.json
|
||||
dotnet nuget push OpenTelemetry.OutOfProcess.Forwarder.Configuration.${{ inputs.version }}.nupkg --api-key YOUR_API_KEY --source https://api.nuget.org/v3/index.json
|
||||
``````
|
||||
"@
|
||||
|
||||
$summary | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
|
@ -4,23 +4,29 @@ on:
|
|||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
powershell-script:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/setup-dotnet@v3.0.3
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
7.0.x
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
- name: Test the PowerShell module instructions from README.md
|
||||
shell: powershell
|
||||
run: |
|
||||
mkdir testapp
|
||||
cd testapp
|
||||
dotnet new console
|
||||
dotnet publish -f net7.0 -c Release
|
||||
$module_url = "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/OpenTelemetry.DotNet.Auto.psm1"
|
||||
dotnet publish -f net9.0 -c Release
|
||||
$module_url = "https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/OpenTelemetry.DotNet.Auto.psm1"
|
||||
$dl_path = Join-Path $env:temp "OpenTelemetry.DotNet.Auto.psm1"
|
||||
$log_path = "C:\ProgramData\OpenTelemetry .NET AutoInstrumentation\logs\*"
|
||||
Invoke-WebRequest -Uri $module_url -OutFile $dl_path
|
||||
|
@ -28,12 +34,12 @@ jobs:
|
|||
Install-OpenTelemetryCore
|
||||
$install_dir = Get-OpenTelemetryInstallDirectory
|
||||
Register-OpenTelemetryForCurrentSession -OTelServiceName "MyServiceDisplayName"
|
||||
./bin/Release/net7.0/publish/testapp
|
||||
./bin/Release/net9.0/publish/testapp
|
||||
if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" }
|
||||
if (-not (Test-Path $log_path)) { throw "Log file does not exist. Instrumentation test failed." }
|
||||
Remove-Item $log_path
|
||||
Unregister-OpenTelemetryForCurrentSession
|
||||
./bin/Release/net7.0/publish/testapp
|
||||
./bin/Release/net9.0/publish/testapp
|
||||
if (-not $?) { throw "dotnet help returned exit code: $LASTEXITCODE" }
|
||||
if (Test-Path $log_path) { throw "Log file exists. Instrumentation unregister failed." }
|
||||
Uninstall-OpenTelemetryCore
|
||||
|
@ -46,22 +52,32 @@ jobs:
|
|||
include:
|
||||
- machine: windows-2022
|
||||
log-dir: "/c/ProgramData/OpenTelemetry .NET AutoInstrumentation/logs"
|
||||
- machine: ubuntu-20.04
|
||||
- machine: windows-2025
|
||||
log-dir: "/c/ProgramData/OpenTelemetry .NET AutoInstrumentation/logs"
|
||||
- machine: ubuntu-22.04
|
||||
log-dir: "/var/log/opentelemetry/dotnet"
|
||||
- machine: macos-11
|
||||
- machine: macos-13
|
||||
log-dir: "/var/log/opentelemetry/dotnet"
|
||||
- machine: ubuntu-22.04-arm
|
||||
log-dir: "/var/log/opentelemetry/dotnet"
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
- uses: actions/setup-dotnet@v3.0.3
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
7.0.x
|
||||
- run: brew install coreutils
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
- name: Install MacOS CoreUtils
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
run: brew install coreutils
|
||||
|
||||
- name: Create test directory
|
||||
run: sudo mkdir -p ${{ matrix.log-dir }} && sudo chmod a+rwx ${{ matrix.log-dir }} # the instrumented process has no permissions to create log dir
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
run: sudo mkdir -p ${{ matrix.log-dir }} && sudo chmod a+rwx ${{ matrix.log-dir }} # the instrumented process has no permissions to create log dir
|
||||
|
||||
- name: Test the Shell scripts from README.md
|
||||
shell: bash
|
||||
run: |
|
||||
|
@ -69,23 +85,32 @@ jobs:
|
|||
mkdir testapp
|
||||
cd testapp
|
||||
dotnet new console
|
||||
dotnet publish -f net7.0 -c Release
|
||||
curl -sSfL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/otel-dotnet-auto-install.sh -O
|
||||
dotnet publish -f net9.0 -c Release
|
||||
curl -sSfL https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/otel-dotnet-auto-install.sh -O
|
||||
sh ./otel-dotnet-auto-install.sh
|
||||
test "$(ls -A "$HOME/.otel-dotnet-auto")"
|
||||
curl -sSfL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/instrument.sh -O
|
||||
. ./instrument.sh
|
||||
./bin/Release/net7.0/publish/testapp
|
||||
./bin/Release/net9.0/publish/testapp
|
||||
test "$(ls -A '${{ matrix.log-dir }}' )"
|
||||
|
||||
shell-scripts-container:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
base-image: [ alpine ]
|
||||
runs-on: ubuntu-20.04
|
||||
include:
|
||||
- machine: ubuntu-22.04
|
||||
base-image: alpine
|
||||
net-version: net9.0
|
||||
- machine: ubuntu-22.04-arm
|
||||
base-image: alpine
|
||||
net-version: net9.0
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Test the Shell scripts from README.md in Docker container
|
||||
run: |
|
||||
set -e
|
||||
|
@ -95,12 +120,12 @@ jobs:
|
|||
mkdir testapp
|
||||
cd testapp
|
||||
dotnet new console
|
||||
dotnet publish -f net7.0 -c Release
|
||||
curl -sSfL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/otel-dotnet-auto-install.sh -O
|
||||
dotnet publish -f ${{ matrix.net-version }} -c Release
|
||||
curl -sSfL https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/otel-dotnet-auto-install.sh -O
|
||||
sh ./otel-dotnet-auto-install.sh
|
||||
test "$(ls -A "$HOME/.otel-dotnet-auto")"
|
||||
curl -sSfL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/instrument.sh -O
|
||||
. ./instrument.sh
|
||||
./bin/Release/net7.0/publish/testapp
|
||||
./bin/Release/${{ matrix.net-version }}/publish/testapp
|
||||
test "$(ls -A /var/log/opentelemetry/dotnet )"
|
||||
'
|
||||
|
|
|
@ -5,75 +5,58 @@ on:
|
|||
tags: [ v* ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
machine: [ windows-2022, ubuntu-20.04, macos-11 ]
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- uses: actions/setup-dotnet@v3.0.3
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
7.0.x
|
||||
- run: ./build.cmd
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
if: always()
|
||||
with:
|
||||
name: bin-${{ matrix.machine }}
|
||||
path: bin/tracer-home
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
container-build:
|
||||
name: Container Build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
base-image: [ alpine ]
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build \
|
||||
--tag otel-dotnet-autoinstrumentation/${{ matrix.base-image }} \
|
||||
--file "./docker/${{ matrix.base-image }}.dockerfile" \
|
||||
./build
|
||||
- name: Build in Docker container
|
||||
run: |
|
||||
docker run --rm \
|
||||
--mount type=bind,source="${GITHUB_WORKSPACE}",target=/project \
|
||||
otel-dotnet-autoinstrumentation/${{ matrix.base-image }} \
|
||||
./build.sh
|
||||
- name: Upload ${{ matrix.base-image }} binaries
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
if: always()
|
||||
with:
|
||||
name: bin-${{ matrix.base-image }}
|
||||
path: bin/tracer-home
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/packages
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
|
||||
jobs:
|
||||
build-container:
|
||||
uses: ./.github/workflows/build-container.yml
|
||||
|
||||
build-ubuntu1604-native:
|
||||
uses: ./.github/workflows/build-ubuntu1604-native-container.yml
|
||||
|
||||
build:
|
||||
needs: build-ubuntu1604-native
|
||||
uses: ./.github/workflows/build.yml
|
||||
|
||||
build-nuget-packages:
|
||||
needs: [ build, build-container ]
|
||||
uses: ./.github/workflows/build-nuget-packages.yml
|
||||
|
||||
create-release:
|
||||
name: Create GH release
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ build, container-build ]
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [ build, build-container, build-nuget-packages ]
|
||||
permissions:
|
||||
contents: write
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- uses: actions/download-artifact@v3.0.2
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag: v5.0.0
|
||||
with:
|
||||
path: .
|
||||
|
||||
- name: Install zip
|
||||
uses: montudor/action-zip@v1.0.0
|
||||
- run: cd bin-alpine ; zip -qq -r ../opentelemetry-dotnet-instrumentation-linux-musl.zip . * ; cd ..
|
||||
- run: cd bin-ubuntu-20.04 ; zip -qq -r ../opentelemetry-dotnet-instrumentation-linux-glibc.zip . * ; cd ..
|
||||
uses: montudor/action-zip@0852c26906e00f8a315c704958823928d8018b28 # tag: v1.0.0
|
||||
|
||||
- run: cd bin-alpine-x64 ; zip -qq -r ../opentelemetry-dotnet-instrumentation-linux-musl-x64.zip . * ; cd ..
|
||||
- run: cd bin-alpine-arm64 ; zip -qq -r ../opentelemetry-dotnet-instrumentation-linux-musl-arm64.zip . * ; cd ..
|
||||
- run: cd bin-ubuntu-22.04 ; zip -qq -r ../opentelemetry-dotnet-instrumentation-linux-glibc-x64.zip . * ; cd ..
|
||||
- run: cd bin-ubuntu-22.04-arm ; zip -qq -r ../opentelemetry-dotnet-instrumentation-linux-glibc-arm64.zip . * ; cd ..
|
||||
- run: cd bin-windows-2022 ; zip -qq -r ../opentelemetry-dotnet-instrumentation-windows.zip . * ; cd ..
|
||||
- run: cd bin-macos-11 ; zip -qq -r ../opentelemetry-dotnet-instrumentation-macos.zip . * ; cd ..
|
||||
- run: cd bin-macos-13 ; zip -qq -r ../opentelemetry-dotnet-instrumentation-macos.zip . * ; cd ..
|
||||
- run: cd bin-nuget-packages ; zip -qq -r ../opentelemetry-dotnet-instrumentation-nuget-packages.zip . * ; cd ..
|
||||
- run: cp installation-scripts-windows-2022/otel-dotnet-auto-install.sh ./otel-dotnet-auto-install.sh
|
||||
- run: cp installation-scripts-windows-2022/OpenTelemetry.DotNet.Auto.psm1 ./OpenTelemetry.DotNet.Auto.psm1
|
||||
|
||||
- name: Create Release
|
||||
run: gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --verify-tag --draft ./*.zip ./otel-dotnet-auto-install.sh ./OpenTelemetry.DotNet.Auto.psm1
|
||||
env:
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
name: Shellcheck
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Install shellcheck
|
||||
run: sudo apt update && sudo apt install --assume-yes shellcheck
|
||||
|
||||
- name: Run shellcheck
|
||||
run: find . -name \*.sh -o -name \*.sh.template | grep -v scripts/dotnet-install.sh | xargs shellcheck --severity=warning
|
|
@ -0,0 +1,115 @@
|
|||
name: update-dotnet-install-script
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 4 1 * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
update-dotnet-install-script:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.fork == false
|
||||
|
||||
env:
|
||||
DOTNET_INSTALL_SCRIPT_URL: 'https://dot.net/v1/dotnet-install.sh'
|
||||
DOTNET_INSTALL_SCRIPT_GPG_KEY_URL: 'https://dot.net/v1/dotnet-install.asc'
|
||||
DOTNET_INSTALL_SCRIPT_SIGNATURE_URL: 'https://dot.net/v1/dotnet-install.sig'
|
||||
GIT_COMMIT_USER_EMAIL: '197425009+otelbot[bot]@users.noreply.github.com'
|
||||
GIT_COMMIT_USER_NAME: 'otelbot[bot]'
|
||||
UPDATE_BRANCH_NAME: 'update-dotnet-install-script'
|
||||
|
||||
steps:
|
||||
|
||||
- name: Generate GitHub application token
|
||||
id: otelbot-token
|
||||
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||
with:
|
||||
app-id: ${{ vars.OTELBOT_DOTNET_INSTRUMENTATION_APP_ID }}
|
||||
permission-contents: write
|
||||
permission-pull-requests: write
|
||||
private-key: ${{ secrets.OTELBOT_DOTNET_INSTRUMENTATION_PRIVATE_KEY }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
filter: 'tree:0'
|
||||
show-progress: false
|
||||
token: ${{ steps.otelbot-token.outputs.token }}
|
||||
|
||||
- name: Update .NET installation script
|
||||
id: update-script
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
|
||||
# Download the latest .NET installation shell script
|
||||
$InstallScriptUrl = ${env:DOTNET_INSTALL_SCRIPT_URL}
|
||||
$InstallScriptFileName = (Join-Path "." "scripts" "dotnet-install.sh")
|
||||
|
||||
Invoke-WebRequest -Uri $InstallScriptUrl -MaximumRetryCount 5 -OutFile $InstallScriptFileName | Out-Null
|
||||
|
||||
$GitStatus = (git status --porcelain)
|
||||
|
||||
if ([string]::IsNullOrEmpty($GitStatus)) {
|
||||
Write-Output "No changes to commit."
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Verify the GPG signature of the installation script
|
||||
# See https://learn.microsoft.com/dotnet/core/tools/dotnet-install-script#signature-validation-of-dotnet-installsh
|
||||
$KeyFileName = (Join-Path ${env:RUNNER_TEMP} "dotnet-install.asc")
|
||||
$SignatureFileName = (Join-Path ${env:RUNNER_TEMP} "dotnet-install.sig")
|
||||
|
||||
Invoke-WebRequest -Uri ${env:DOTNET_INSTALL_SCRIPT_GPG_KEY_URL} -MaximumRetryCount 5 -OutFile $KeyFileName | Out-Null
|
||||
Invoke-WebRequest -Uri ${env:DOTNET_INSTALL_SCRIPT_SIGNATURE_URL} -MaximumRetryCount 5 -OutFile $SignatureFileName | Out-Null
|
||||
|
||||
gpg --import $KeyFileName || throw "Failed to import GPG key."
|
||||
gpg --verify $SignatureFileName $InstallScriptFileName || throw "Failed to verify GPG signature."
|
||||
|
||||
# Configure Git and check whether the branch already exists
|
||||
$BranchName = ${env:UPDATE_BRANCH_NAME}
|
||||
|
||||
git config user.email "${env:GIT_COMMIT_USER_EMAIL}" | Out-Null
|
||||
git config user.name "${env:GIT_COMMIT_USER_NAME}" | Out-Null
|
||||
git fetch origin --no-tags | Out-Null
|
||||
git rev-parse --verify --quiet "remotes/origin/${BranchName}" | Out-Null
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Output "Branch ${BranchName} already exists."
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Create a new branch and commit the changes
|
||||
git checkout -b $BranchName
|
||||
git add $InstallScriptFileName
|
||||
git commit -m "Update .NET Installation Script`n`nUpdate .NET installation script from ${InstallScriptUrl}." -s
|
||||
git push -u origin $BranchName
|
||||
|
||||
"updated-script=true" >> ${env:GITHUB_OUTPUT}
|
||||
|
||||
- name: Create pull request
|
||||
if: steps.update-script.outputs.updated-script == 'true'
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
env:
|
||||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
with:
|
||||
github-token: ${{ steps.otelbot-token.outputs.token }}
|
||||
script: |
|
||||
const { repo, owner } = context.repo;
|
||||
const workflowUrl = `${process.env.GITHUB_SERVER_URL}/${owner}/${repo}/actions/runs/${process.env.GITHUB_RUN_ID}`;
|
||||
const { data: pr } = await github.rest.pulls.create({
|
||||
title: 'Update .NET Installation Script',
|
||||
owner,
|
||||
repo,
|
||||
head: process.env.UPDATE_BRANCH_NAME,
|
||||
base: process.env.DEFAULT_BRANCH,
|
||||
body: [
|
||||
`Update .NET installation script from [dot.net](${process.env.DOTNET_INSTALL_SCRIPT_URL}).`,
|
||||
'',
|
||||
`This pull request was generated from [GitHub Actions](${workflowUrl}).`
|
||||
].join('\n')
|
||||
});
|
||||
core.notice(`Created pull request ${owner}/${repo}#${pr.number}: ${pr.html_url}`);
|
|
@ -4,34 +4,55 @@ on:
|
|||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- '.github/workflows/validate-documentation.yml'
|
||||
- '**.md'
|
||||
- 'package-lock.json'
|
||||
- 'package.json'
|
||||
- '.lycheeignore'
|
||||
- '.github/workflows/validate-documentation.yml'
|
||||
- '**.md'
|
||||
- '.lycheeignore'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- '.github/workflows/validate-documentation.yml'
|
||||
- '**.md'
|
||||
- 'package-lock.json'
|
||||
- 'package.json'
|
||||
- '.lycheeignore'
|
||||
- '.github/workflows/validate-documentation.yml'
|
||||
- '**.md'
|
||||
- '.lycheeignore'
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- uses: lycheeverse/lychee-action@v1.5.4
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Restore lychee cache
|
||||
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
id: cache-restore
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: cache-lychee-${{ github.sha }}
|
||||
restore-keys: cache-lychee-
|
||||
|
||||
- name: Run markdown links checks
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'release PR') }}
|
||||
uses: lycheeverse/lychee-action@01a5c94d8e012550040658854b90a7a7301e75ca # tag: v2.6.0
|
||||
with:
|
||||
fail: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'release PR') }}
|
||||
args: "--cache --max-cache-age 1d --threads 1 --max-concurrency 1 --verbose --retry-wait-time 5 --max-retries 3 --timeout 60 --no-progress './**/*.md' './**/*.html'"
|
||||
|
||||
- run: npm install
|
||||
- name: Run markdownlint
|
||||
uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d # tag: v7.2.0
|
||||
with:
|
||||
files: '**/*.md'
|
||||
|
||||
- run: npm run markdownlint && npm run cspell
|
||||
- name: Run cspell
|
||||
uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e # tag: v20.0.0
|
||||
|
||||
- name: Save lychee cache
|
||||
if: always()
|
||||
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
|
||||
|
|
|
@ -12,6 +12,9 @@ on:
|
|||
description: 'Test execution count'
|
||||
default: '20'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
verify-test:
|
||||
strategy:
|
||||
|
@ -20,22 +23,33 @@ jobs:
|
|||
include:
|
||||
- machine: windows-2022
|
||||
containers: windows
|
||||
- machine: ubuntu-20.04
|
||||
- machine: windows-2025
|
||||
containers: windows
|
||||
- machine: ubuntu-22.04
|
||||
containers: linux
|
||||
- machine: macos-11
|
||||
- machine: macos-13
|
||||
containers: none
|
||||
- machine: ubuntu-22.04-arm
|
||||
containers: linux
|
||||
runs-on: ${{ matrix.machine }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
- uses: actions/setup-dotnet@v3.0.3
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag: v5.0.0
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # tag: v4.3.1
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
7.0.x
|
||||
- run: ./build.cmd BuildTracer ManagedTests --containers ${{ matrix.containers }} --test-project "${{ github.event.inputs.testProject }}" --test-name '"${{ github.event.inputs.testName }}"' --test-count ${{ github.event.inputs.count }}
|
||||
8.0.413
|
||||
9.0.304
|
||||
|
||||
- name: Run BuildTracer and ManagedTests
|
||||
run: ./build.cmd BuildTracer ManagedTests --containers ${{ matrix.containers }} --test-project "${{ github.event.inputs.testProject }}" --test-name '"${{ github.event.inputs.testName }}"' --test-count ${{ github.event.inputs.count }}
|
||||
|
||||
- name: Upload logs
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
|
||||
with:
|
||||
name: logs-${{ matrix.machine }}
|
||||
path: build_data/
|
||||
path: test-artifacts/
|
||||
|
|
|
@ -162,6 +162,8 @@ PublishScripts/
|
|||
# NuGet v3's project.json files produces more ignoreable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
# Ignore RuleEngine.json; it is generated by the PublishRuleEngineJson target at build time
|
||||
nuget/OpenTelemetry.AutoInstrumentation/contentFiles/any/any/RuleEngine.json
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
|
@ -287,6 +289,9 @@ blog/
|
|||
# exception to the ignore rule
|
||||
!/**/.gitkeep
|
||||
|
||||
# ignore artifacts downloaded to build OpenTelemetry.AutoInstrumentation.Runtime package
|
||||
nuget/OpenTelemetry.AutoInstrumentation.Runtime.Native/runtimes/
|
||||
|
||||
# profiler build files
|
||||
src/OpenTelemetry.AutoInstrumentation.Native/build/
|
||||
src/OpenTelemetry.AutoInstrumentation.Native/deps/
|
||||
|
@ -296,14 +301,22 @@ src/OpenTelemetry.AutoInstrumentation.Native/Makefile
|
|||
src/OpenTelemetry.AutoInstrumentation.Native/CMakeCache.txt
|
||||
src/OpenTelemetry.AutoInstrumentation.Native/cmake_install.cmake
|
||||
|
||||
# test native dep build files
|
||||
test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.NativeDep/CMakeCache.txt
|
||||
test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.NativeDep/CMakeFiles/
|
||||
test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.NativeDep/Makefile
|
||||
test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.NativeDep/cmake_install.cmake
|
||||
|
||||
# exception for native profiler dependencies
|
||||
!src/OpenTelemetry.AutoInstrumentation.Native/lib/**
|
||||
|
||||
# ignore verify .received files
|
||||
*.received.*
|
||||
|
||||
# profiler and test logs
|
||||
/build_data
|
||||
# ignore logs and test results
|
||||
/test-artifacts
|
||||
|
||||
# install.sh downloaded artifacts
|
||||
/otel-dotnet-auto/
|
||||
|
||||
lychee/out.md
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
localhost
|
||||
https://linux.die.net/man/3/dlerror
|
||||
https://hub.docker.com/_/microsoft-mssql-server
|
||||
https://dev.mysql.com
|
||||
https://dev.mysql.com/doc/connector-net/en/connector-net-introduction.html
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
node_modules
|
||||
packages
|
||||
lychee/out.md
|
||||
|
|
966
CHANGELOG.md
966
CHANGELOG.md
|
@ -5,19 +5,981 @@ All notable changes to this component are documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/compare/v0.6.0-beta.1...HEAD)
|
||||
## [Unreleased](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/compare/v1.12.0..HEAD)
|
||||
|
||||
### Added
|
||||
|
||||
- Extend support for [RabbitMQ.Client](https://www.nuget.org/packages/RabbitMQ.Client/)
|
||||
traces instrumentation for versions `5.*`.
|
||||
|
||||
### Changed
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.12.0-beta.1` to `1.12.0-beta.2`.
|
||||
|
||||
### Deprecated
|
||||
|
||||
### Removed
|
||||
|
||||
### Fixed
|
||||
|
||||
### Security
|
||||
## [1.12.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.12.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Support for [`Npgsql`](https://www.nuget.org/packages/Npgsql/)
|
||||
metrics instrumentation for versions `6.0.0`+ on .NET.
|
||||
- In install script, Install-OpenTelemetryCore accepts optional argument RegisterAssembliesInGAC,
|
||||
which is true by default. When set to false, assemblies would not be installed
|
||||
in GAC.
|
||||
- In install script, new function added: Register-AssembliesInGAC. It installs
|
||||
OpenTelemetry assemblies and dependencies in GAC.
|
||||
|
||||
### Changed
|
||||
|
||||
- Musl-based (Alpine) libraries are compiled on Alpine v3.21.
|
||||
- `otel-dotnet-auto-install.sh` now optionally uses `wget` instead of `curl`,
|
||||
improving compatibility with `mcr.microsoft.com/dotnet/runtime` Alpine images.
|
||||
- Non-default application domains will be forced to load with LoaderOptimization.SingleDomain
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.12.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.12.0).
|
||||
- Following packages updated
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient` from `1.11.0-beta.2` to `1.12.0-beta.1`
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.11.1` to `1.12.0`,
|
||||
- `OpenTelemetry.Instrumentation.Process` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Quartz` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Runtime` from `1.11.1` to `1.12.0`,
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` from `1.11.0-beta.2` to `1.12.0-beta.2`,
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Azure` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Container` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Host` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.OperatingSystem` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Process` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.ProcessRuntime` from `1.11.0-beta.2` to `1.12.0-beta.1`.
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.11.1` to `1.12.0`,
|
||||
- `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.11.0-beta.2` to `1.12.0-beta.2`,
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.11.0-beta.2` to `1.12.0-beta.1`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Microsoft.Bcl.AsyncInterfaces` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Configuration` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Configuration.Abstractions` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Configuration.Binder` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.DependencyInjection` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.DependencyInjection.Abstractions` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Diagnostics.Abstractions` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Logging` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Logging.Abstractions` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Logging.Configuration` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Options` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Options.ConfigurationExtensions` from `9.0.2` to `9.0.6`,
|
||||
- `Microsoft.Extensions.Primitives` from `9.0.2` to `9.0.6`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.11.0-beta.2` to `1.12.0-beta.1`,
|
||||
- `System.Buffers` from `4.6.0` to `4.6.1`,
|
||||
- `System.Diagnostics.DiagnosticSource` from `9.0.2` to `9.0.6`,
|
||||
- `System.IO.Pipelines` from `9.0.2` to `9.0.6`,
|
||||
- `System.Memory` from `4.6.0` to `4.6.3`,
|
||||
- `System.Numerics.Vectors` from `4.6.0` to `4.6.1`,
|
||||
- `System.Runtime.CompilerServices.Unsafe` from `6.1.0` to `6.1.2`,
|
||||
- `System.Threading.Tasks.Extensions` update from `4.6.0` to `4.6.3`,
|
||||
- `System.Text.Json` update from `9.0.2` to `9.0.6`.
|
||||
- `System.ValueTuple` from `4.5.0` to `4.6.1`.
|
||||
|
||||
## [1.11.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.11.0)
|
||||
|
||||
### Changed
|
||||
|
||||
- Enhanced Kafka and RabbitMQ instrumentation now create spans at the start instead
|
||||
of manual start time adjustments.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.11.2`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.11.2).
|
||||
- Following packages updated
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient` from `1.11.0-beta.1` to `1.11.0-beta.2`
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.11.0` to `1.11.1`,
|
||||
- `OpenTelemetry.Instrumentation.Process` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Instrumentation.Quartz` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Instrumentation.Runtime` from `1.11.0` to `1.11.1`,
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Resources.Azure` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Resources.Container` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Resources.Host` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Resources.OperatingSystem` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Resources.Process` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Resources.ProcessRuntime` from `1.11.0-beta.1` to `1.11.0-beta.2`.
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.11.0` to `1.11.1`,
|
||||
- `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.11.0-beta.1` to `1.11.0-beta.2`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Microsoft.Bcl.AsyncInterfaces` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Configuration` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Configuration.Abstractions` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Configuration.Binder` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.DependencyInjection` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.DependencyInjection.Abstractions`
|
||||
updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Diagnostics.Abstractions` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Logging` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Logging.Abstractions` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Logging.Configuration` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Options` updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Options.ConfigurationExtensions`
|
||||
updated from `9.0.1` to `9.0.2`,
|
||||
- `Microsoft.Extensions.Primitives` updated from `9.0.1` to `9.0.2`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.11.0-beta.1` to `1.11.0-beta.2`,
|
||||
- `System.Diagnostics.DiagnosticSource` updated from `9.0.1` to `9.0.2`,
|
||||
- `System.IO.Pipelines` updated from `9.0.1` to `9.0.2`,
|
||||
- `System.Text.Encodings.Web` update from `9.0.1` to `9.0.2`,
|
||||
- `System.Text.Json` update from `9.0.1` to `9.0.2`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed [DoS Vulnerability in TraceContextPropagator.Extract](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/security/advisories/GHSA-vc29-vg52-6643).
|
||||
|
||||
## [1.10.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.10.0)
|
||||
|
||||
This release include all changes from [1.10.0-beta.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.10.0-beta.1)
|
||||
release.
|
||||
|
||||
### Changed
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.11.1`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.11.1).
|
||||
- Following packages updated
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient` from `1.10.0-beta.1` to `1.11.0-beta.1`
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.10.0` to `1.11.0`,
|
||||
- `OpenTelemetry.Instrumentation.Process` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Quartz` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Runtime` from `1.10.0` to `1.11.0`,
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Azure` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Container` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Host` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.OperatingSystem` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Process` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.ProcessRuntime` from `1.10.0-beta.1` to `1.11.0-beta.1`.
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.10.1` to `1.11.0`,
|
||||
- `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.10.0-beta.1` to `1.11.0-beta.1`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Microsoft.Bcl.AsyncInterfaces` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Configuration` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Configuration.Abstractions` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Configuration.Binder` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.DependencyInjection` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.DependencyInjection.Abstractions`
|
||||
updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Diagnostics.Abstractions` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Logging` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Logging.Abstractions` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Logging.Configuration` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Options` updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Options.ConfigurationExtensions`
|
||||
updated from `9.0.0` to `9.0.1`,
|
||||
- `Microsoft.Extensions.Primitives` updated from `9.0.0` to `9.0.1`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.10.0-beta.1` to `1.11.0-beta.1`,
|
||||
- `System.IO.Pipelines` updated from `9.0.0` to `9.0.1`,
|
||||
- `System.Diagnostics.DiagnosticSource` updated from `9.0.0` to `9.0.1`,
|
||||
- `System.Text.Encodings.Web` update from `9.0.0` to `9.0.1`,
|
||||
- `System.Text.Json` update from `9.0.0` to `9.0.1`,
|
||||
- `System.Threading.Tasks.Extensions"` update from `4.5.4` to `4.6.0`.
|
||||
|
||||
### Removed
|
||||
|
||||
#### Dependency removals
|
||||
|
||||
- Following packages removed
|
||||
- `Google.Protobuf`.
|
||||
- .NET only, following packages removed
|
||||
- `Grpc.Core.Api`.
|
||||
- `Grpc.Net.Client`.
|
||||
- `Grpc.Net.Common.dll`.
|
||||
|
||||
### Fixed
|
||||
|
||||
## [1.10.0-beta.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.10.0-beta.1)
|
||||
|
||||
### Added
|
||||
|
||||
- Support for .NET9.
|
||||
- Support for [RabbitMQ.Client](https://www.nuget.org/packages/RabbitMQ.Client/)
|
||||
traces instrumentation for versions `7.0.0`+.
|
||||
- [log4net](https://www.nuget.org/packages/log4net/) [OpenTelemetry appender](https://opentelemetry.io/docs/concepts/signals/logs/#log-appender--bridge)
|
||||
for versions >= `2.0.13` && < `4.0.0`
|
||||
- [log4net](https://www.nuget.org/packages/log4net/) trace context injection
|
||||
for versions >= `2.0.13` && < `4.0.0`.
|
||||
- Support for SqlClient metrics.
|
||||
|
||||
### Changed
|
||||
|
||||
- Kafka and RabbitMQ 6 tags `otel.status_code` and `otel.status_description` are
|
||||
replaced by native fields `Status` and `StatusDescription`.
|
||||
- Changed minimal supported version of `Microsoft.Extensions.Logging`
|
||||
for `ILOGGER` instrumentation from `8.0.0` to `9.0.0`.
|
||||
- Glibc native libraries are compiled on Ubuntu v16.04.
|
||||
- Changed `MongoDB` traces instrumentation to the bytecode version. It supports
|
||||
`MongoDB.Driver.Core` from `2.7.0` and `MongoDB.Driver` from `3.0.0`.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.10.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.10.0).
|
||||
- Following packages updated
|
||||
- `Microsoft.Extensions.Configuration.Binder` from `8.0.2` to `9.0.0`,
|
||||
- `Microsoft.Extensions.Logging.Configuration` from `8.0.0` to `9.0.0`,
|
||||
- `OpenTelemetry.Exporter.Prometheus.HttpListener` from `1.9.0-beta.2` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient` from `1.9.0-beta.1` to `1.10.0-beta.1`
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.9.0` to `1.10.0`,
|
||||
- `OpenTelemetry.Instrumentation.Process` from `0.5.0-beta.7` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Quartz` from `1.0.0-beta.3` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Runtime` from `1.9.0` to `1.10.0`,
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` from `1.9.0-beta.1` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.0.0-rc.18` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Azure` from `1.0.0-beta.9` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Container` from `1.0.0-beta.9` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Host` from `0.1.0-beta.3` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.OperatingSystem` from `0.1.0-alpha.4` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Process` from `0.1.0-beta.3` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.ProcessRuntime` from `0.1.0-beta.2` to `1.10.0-beta.1`.
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.9.0` to `1.10.1`,
|
||||
- `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.0.0-beta.12` to `1.10.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.9.0-beta.1` to `1.10.0-beta.1`,
|
||||
- `System.Diagnostics.DiagnosticSource` from `8.0.0` to `9.0.0`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Google.Protobuf` updated from `3.28.3` to `3.29.1`,
|
||||
- `Microsoft.Bcl.AsyncInterfaces` from `8.0.0` to `9.0.0`,
|
||||
- `Microsoft.Extensions.Configuration` from `9.0.0` to `9.0.0`,
|
||||
- `Microsoft.Extensions.Configuration.Abstractions` from `8.0.0` to `9.0.0`,
|
||||
- `Microsoft.Extensions.DependencyInjection` from `8.0.1` to `9.0.0`,
|
||||
- `Microsoft.Extensions.DependencyInjection.Abstractions` from `8.0.2` to `9.0.0`,
|
||||
- `Microsoft.Extensions.Logging` from `8.0.0` to `9.0.0`,
|
||||
- `Microsoft.Extensions.Logging.Abstractions` from `8.0.1` to `9.0.0`,
|
||||
- `Microsoft.Extensions.Options` from `8.0.2` to `9.0.0`,
|
||||
- `Microsoft.Extensions.Options.ConfigurationExtensions` from `8.0.0` to `9.0.0`,
|
||||
- `Microsoft.Extensions.Primitives` from `8.0.0` to `9.0.0`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.9.0-beta.1` to `1.10.0-beta.1`,
|
||||
- `System.Buffers` from `4.5.5` to `4.6.0`,
|
||||
- `System.Memory` from `4.5.5` to `4.6.0`,
|
||||
- `System.Numerics.Vectors` from `4.5.0` to `4.6.0`,
|
||||
- `System.Diagnostics.DiagnosticSource` from `8.0.1` to `9.0.0`,
|
||||
- `System.Runtime.CompilerServices.Unsafe` from `6.0.0` to `6.1.0`,
|
||||
- `System.Text.Encodings.Web` from `8.0.0` to `9.0.0`,
|
||||
- `System.Text.Json` from `8.0.5` to `9.0.0`.
|
||||
|
||||
### Removed
|
||||
|
||||
- Support for .NET 6 and .NET 7. Both framework reached end of support.
|
||||
- Support for macOS Monterey 12 x64.
|
||||
macOs libraries are built and tested against [macOS Ventura 13 x64](https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md).
|
||||
- `MongoDB.Driver.Core.Extensions.DiagnosticSources` dependency is removed.
|
||||
|
||||
## [1.9.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.9.0)
|
||||
|
||||
### Changed
|
||||
|
||||
- Musl-based (Alpine) libraries are compiled on Alpine v3.20.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Following packages updated
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.0.0-rc.17` to `1.0.0-rc.18`,
|
||||
- .NET Framework only, following packages updated
|
||||
- `Google.Protobuf` updated from `3.28.2` to `3.28.3`,
|
||||
- `Grpc.Core.Api` from `2.66.0` to `2.67.0`,
|
||||
- `Microsoft.Extensions.DependencyInjection` from `8.0.0` to `8.0.1`,
|
||||
- `Microsoft.Extensions.DependencyInjection.Abstractions` from `8.0.1` to `8.0.2`,
|
||||
- `System.Diagnostics.DiagnosticSource` from `8.0.0` to `8.0.1`,
|
||||
- `System.Text.Json` from `8.0.4` to `8.0.5`.
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Support for macOS Monterey 12 x64.
|
||||
All further releases will be supporting [macOS Ventura 13 x64](https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md)
|
||||
and newer.
|
||||
|
||||
### Removed
|
||||
|
||||
- Drop support for following environment variables:
|
||||
`OTEL_DOTNET_AUTO_TRACES_CONSOLE_EXPORTER_ENABLED`,
|
||||
`OTEL_DOTNET_AUTO_METRICS_CONSOLE_EXPORTER_ENABLED`, and
|
||||
`OTEL_DOTNET_AUTO_LOGS_CONSOLE_EXPORTER_ENABLED`.
|
||||
Instead, use `console` as one of the values for the following environment variables:
|
||||
`OTEL_TRACES_EXPORTER`
|
||||
`OTEL_METRICS_EXPORTER`
|
||||
`OTEL_LOGS_EXPORTER`.
|
||||
|
||||
## [1.8.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.8.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Support for Operating System resource detector.
|
||||
- Support for [RabbitMQ.Client](https://www.nuget.org/packages/RabbitMQ.Client/)
|
||||
traces instrumentation for versions `6.0.0`-`6.*.*`
|
||||
- Support for NServiceBus 9.1+ metrics instrumentations.
|
||||
- Added support for OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER, OTEL_LOGS_EXPORTER
|
||||
to handle comma-separated list.
|
||||
- The environment variables `OTEL_TRACES_EXPORTER`, `OTEL_METRICS_EXPORTER`,
|
||||
and `OTEL_LOGS_EXPORTER` now support configuring console exporters for traces,
|
||||
metrics, and logs, respectively.
|
||||
- Support signal specific OTLP exporter variables (See [docs](/docs/config.md#otlp)):
|
||||
- `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`,
|
||||
- `OTEL_EXPORTER_OTLP_TRACES_HEADERS`,
|
||||
- `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT`,
|
||||
- `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL`,
|
||||
- `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`,
|
||||
- `OTEL_EXPORTER_OTLP_METRICS_HEADERS`,
|
||||
- `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT`,
|
||||
- `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`,
|
||||
- `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT`,
|
||||
- `OTEL_EXPORTER_OTLP_LOGS_HEADERS`,
|
||||
- `OTEL_EXPORTER_OTLP_LOGS_TIMEOUT`,
|
||||
- `OTEL_EXPORTER_OTLP_LOGS_PROTOCOL`.
|
||||
- Support for air-gapped installations through `DOWNLOAD_DIR` or `LOCAL_PATH`
|
||||
arguments to `otel-dotnet-auto-install.sh`.
|
||||
- Added `OTEL_DOTNET_AUTO_LOGGER` to select preferred sink for AutoInstrumentation
|
||||
diagnostic logs.
|
||||
- Issue a warning before publish if auto-instrumentation NuGet
|
||||
package is referenced and runtime identifier is not specified.
|
||||
|
||||
### Changed
|
||||
|
||||
- More restrictive handling of invalid values in comma-separated lists.
|
||||
When invalid value is recognized (unsupported option, supported option
|
||||
with leading or trailing whitespaces, empty value, duplicate)
|
||||
warning is logged, and if `FailFast` is enabled, exception is thrown.
|
||||
- Referencing `OpenTelemetry.AutoInstrumentation` manually no longer visibly injects
|
||||
instrumentation scripts into projects in an editor's solution window.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Following packages updated
|
||||
- `MongoDB.Driver.Core.Extensions.DiagnosticSources` from `1.4.0` to `1.5.0`,
|
||||
- `OpenTelemetry.Exporter.Prometheus.HttpListener` from `1.9.0-beta.1` to `1.9.0-beta.2`,
|
||||
- `OpenTelemetry.Instrumentation.Process` from `0.5.0-beta.6` to `0.5.0-beta.7`,
|
||||
- `OpenTelemetry.Resources.Azure` from `1.0.0-beta.8` to `1.0.0-beta.9`,
|
||||
- `OpenTelemetry.Resources.Host` from `0.1.0-beta.2` to `0.1.0-beta.3`,
|
||||
- `OpenTelemetry.Resources.Process` from `0.1.0-beta.2` to `0.1.0-beta.3`,
|
||||
- `OpenTelemetry.Shims.OpenTracing` from `1.9.0-beta.1` to `1.9.0-beta.2`.
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.0.0-rc9.15` to `1.9.0-beta.1`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Google.Protobuf` updated from `3.27.1` to `3.28.2`,
|
||||
- `Grpc.Core.Api` from `2.63.0` to `2.66.0`,
|
||||
- `Microsoft.Extensions.Configuration.Binder` from `8.0.1` to `8.0.2`,
|
||||
- `System.Text.Json` from `8.0.3` to `8.0.4`.
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Environment variables `OTEL_DOTNET_AUTO_TRACES_CONSOLE_EXPORTER_ENABLED`,
|
||||
`OTEL_DOTNET_AUTO_METRICS_CONSOLE_EXPORTER_ENABLED`, and
|
||||
`OTEL_DOTNET_AUTO_LOGS_CONSOLE_EXPORTER_ENABLED` are now marked as deprecated.
|
||||
|
||||
### Removed
|
||||
|
||||
- Support for macOS Big Sur 11 x64.
|
||||
macOs libraries are built and tested against macOS Monterey 12 x64.
|
||||
- Support for `MongoDB.Driver.Core` < 2.28.0.
|
||||
- Support for `StackExchange.Redis` < 2.6.122.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Initialize WCF instrumentation only when necessary ([#3650](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/pull/3650))
|
||||
|
||||
## [1.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.7.0)
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.9.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.9.0)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`8.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/8.0.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Support for capturing HTTP headers for following traces instrumentations:
|
||||
- ASP.NET, configurable by
|
||||
`OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS`
|
||||
and `OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS`,
|
||||
- ASP.NET Core, configurable by
|
||||
`OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS`
|
||||
and `OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS`,
|
||||
- HTTP Client, configurable by
|
||||
`OTEL_DOTNET_AUTO_TRACES_HTTP_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS`
|
||||
and `OTEL_DOTNET_AUTO_TRACES_HTTP_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS`.
|
||||
- Support for capturing gRPC metadata for Grpc.Net.Client traces instrumentation.
|
||||
It can by configured by
|
||||
`OTEL_DOTNET_AUTO_TRACES_GRPCNETCLIENT_INSTRUMENTATION_CAPTURE_REQUEST_METADATA`
|
||||
and `OTEL_DOTNET_AUTO_TRACES_GRPCNETCLIENT_INSTRUMENTATION_CAPTURE_RESPONSE_METADATA`.
|
||||
- Support for [Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core)
|
||||
and [Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess)
|
||||
traces instrumentation from 23.4.0 together with support for
|
||||
`OTEL_DOTNET_AUTO_ORACLEMDA_SET_DBSTATEMENT_FOR_TEXT` environment variable.
|
||||
ARM64 platform is not supported.
|
||||
- Add support for NServiceBus 9.x metrics and traces instrumentations.
|
||||
|
||||
### Changed
|
||||
|
||||
- Musl-based (Alpine) libraries are compiled on Alpine v3.19.
|
||||
- Do not use message creation context as a parent for consumer spans for `Confluent.Kafka`
|
||||
client instrumentation. See the [issue](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/3434)
|
||||
for details.
|
||||
- Do not create consumer spans related to `PartitionEOF` events
|
||||
for `Confluent.Kafka` client instrumentation.
|
||||
- Following properties can be set before calling plugins:
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions.EnrichWithHttpRequest`,
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions.EnrichWithHttpResponse`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions.EnrichWithHttpRequest`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions.EnrichWithHttpResponse`,
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientTraceInstrumentationOptions.EnrichWithHttpRequestMessage`,
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientTraceInstrumentationOptions.EnrichWithHttpResponseMessage`,
|
||||
- `OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions.EnrichWithHttpRequestMessage`,
|
||||
- `OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions.EnrichWithHttpWebRequest`,
|
||||
- `OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions.EnrichWithHttpResponseMessage`,
|
||||
- `OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions.EnrichWithHttpWebResponse`.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.9.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.9.0).
|
||||
- Following packages updated
|
||||
- `OpenTelemetry.Exporter.Prometheus.HttpListener` from `1.8.0-rc.1` to `1.9.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient` from `1.8.0-beta.1` to `1.9.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.8.1` to `1.9.0`,
|
||||
- `OpenTelemetry.Instrumentation.Process` from `0.5.0-beta.5` to `0.5.0-beta.6`,
|
||||
- `OpenTelemetry.Instrumentation.Quartz` from `1.0.0-beta.2` to `1.0.0-beta.3`,
|
||||
- `OpenTelemetry.Instrumentation.Runtime` from `1.8.0` to `1.9.0`,
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` from `1.8.0-beta.1` to `1.9.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.0.0-rc9.14` to `1.0.0-rc9.15`,
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.0.0-rc.16` to `1.0.0-rc.17`,
|
||||
- `OpenTelemetry.Shims.OpenTracing` from `1.7.0-beta.1` to `1.9.0-beta.1`,
|
||||
- `OpenTelemetry.Resources.Azure` from `1.0.0-beta.7` to `1.0.0-beta.8`,
|
||||
- `OpenTelemetry.Resources.Host` from `0.1.0-beta.1` to `0.1.0-beta.2`.
|
||||
- `OpenTelemetry.Resources.Process` from `0.1.0-beta.1` to `0.1.0-beta.2`.
|
||||
- `OpenTelemetry.Resources.ProcessRuntime` from `0.1.0-beta.1` to `0.1.0-beta.2`.
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.8.1` to `1.9.0`,
|
||||
- `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.0.0-beta.11` to `1.0.0-beta.12`,
|
||||
- `OpenTelemetry.Resources.Container` from `1.0.0-beta.7` to `1.0.0-beta.9`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.8.0-beta.2` to `1.9.0-beta.1`.
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Support for macOS Big Sur 11 x64.
|
||||
All further releases will be supporting macOS Monterey 12 x64
|
||||
and newer.
|
||||
|
||||
## [1.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.6.0)
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.8.1`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.8.1)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`8.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/8.0.0)
|
||||
|
||||
### Changed
|
||||
|
||||
- To prevent sensitive information from leaking through query strings, the
|
||||
following instrumentations redact by default any value detected in query string
|
||||
components when building the `url.query` or the `url.full` attributes:
|
||||
`OpenTelemetry.Instrumentation.Http`, `OpenTelemetry.Instrumentation.AspNetCore`,
|
||||
`OpenTelemetry.Instrumentation.AspNet`. For example, `?key1=value1&key2=value2`
|
||||
becomes `?key1=Redacted&key2=Redacted`. You can customize this behavior through
|
||||
the environment variables. See the
|
||||
[instrumentation options](./docs/config.md#instrumentation-options) table for details.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Following packages updated
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.8.0` to `1.8.1`.
|
||||
- Following packages replaced
|
||||
- `OpenTelemetry.ResourceDetectors.Azure` version `1.0.0-beta.6`
|
||||
by `OpenTelemetry.Resources.Azure` version `1.0.0-beta.7`,
|
||||
- `OpenTelemetry.ResourceDetectors.Host` version `0.1.0-alpha.3`
|
||||
by `OpenTelemetry.Resources.Host` version `0.1.0-beta.1`,
|
||||
- `OpenTelemetry.ResourceDetectors.Process` version `0.1.0-alpha.3`
|
||||
by `OpenTelemetry.Resources.Process` version `0.1.0-beta.1`,
|
||||
- `OpenTelemetry.ResourceDetectors.ProcessRuntime` version `0.1.0-alpha.3`
|
||||
by `OpenTelemetry.Resources.ProcessRuntime` version `0.1.0-beta.1`.
|
||||
- .NET only, following packages updated
|
||||
- `Microsoft.Extensions.Configuration.Binder` from `8.0.0` to `8.0.1`,
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.8.0` to `1.8.1`.
|
||||
- .NET only, following packages replaced:
|
||||
- `OpenTelemetry.ResourceDetectors.Container` version `1.0.0-beta.7`
|
||||
by `OpenTelemetry.Resources.Container` version `1.0.0-beta.8`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Grpc.Core.Api` from `2.62.0` to `2.63.0`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.8.0-beta.1` to `1.8.0-beta.2`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Stop creating `receive` consumer spans for consume attempts that returned no message.
|
||||
For details, see [#3367](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/3367)
|
||||
|
||||
## [1.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.5.0)
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.8.1`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.8.1).
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.8.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.8.0)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`8.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/8.0.0)
|
||||
|
||||
### Added
|
||||
|
||||
- .NET only, warning in logs about End of Support date
|
||||
and upcoming End of Support date for .NET version.
|
||||
- Experimental support for ARM64 on Ubuntu, Alpine and Debian based images.
|
||||
- Experimental ARM64 support for the `OpenTelemetry.AutoInstrumentation` NuGet package.
|
||||
|
||||
### Changed
|
||||
|
||||
- Changed supported method parameters for plugins
|
||||
- from `OpenTelemetry.Instrumentation.AspNet.AspNetInstrumentationOptions`
|
||||
to `OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions`.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.8.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.8.0).
|
||||
- Following packages updated
|
||||
- `MongoDB.Driver.Core.Extensions.DiagnosticSources` from `1.3.0` to `1.4.0`.
|
||||
- `OpenTelemetry.Exporter.Prometheus.HttpListener` from `1.7.0-rc.1` to `1.8.0-rc.1`,
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.7.1` to `1.8.0`,
|
||||
- `OpenTelemetry.Instrumentation.Process` from `0.5.0-beta.4` to `0.5.0-beta.5`,
|
||||
- `OpenTelemetry.Instrumentation.Quartz` from `1.0.0-beta.1` to `1.0.0-beta.2`,
|
||||
- `OpenTelemetry.Instrumentation.Runtime` from `1.7.0` to `1.8.0`,
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` from `1.7.0-beta.1` to `1.8.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.0.0-rc9.13` to `1.0.0-rc9.14`,
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.0.0-rc.15` to `1.0.0-rc.16`,
|
||||
- `OpenTelemetry.ResourceDetectors.Azure` from `1.0.0-beta.5` to `1.0.0-beta.6`,
|
||||
- `OpenTelemetry.ResourceDetectors.Host` from `0.1.0-alpha.2` to `0.1.0-alpha.3`.
|
||||
- `OpenTelemetry.ResourceDetectors.Process` from `0.1.0-alpha.2` to `0.1.0-alpha.3`.
|
||||
- `OpenTelemetry.ResourceDetectors.ProcessRuntime` from `0.1.0-alpha.2` to `0.1.0-alpha.3`.
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.7.1` to `1.8.0`,
|
||||
- `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.0.0-beta.10` to `1.0.0-beta.11`,
|
||||
- `OpenTelemetry.ResourceDetectors.Container` from `1.0.0-beta.6` to `1.0.0-beta.7`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Google.Protobuf` updated from `3.25.2` to `3.27.1`,
|
||||
- `Grpc.Core.Api` from `2.60.0` to `2.62.0`,
|
||||
- `Microsoft.Extensions.DependencyInjection.Abstractions` from `8.0.0` to `8.0.1`,
|
||||
- `Microsoft.Extensions.Options` from `8.0.1` to `8.0.2`,
|
||||
- `Microsoft.Extensions.Logging.Abstractions` from `8.0.0` to `8.0.1`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.7.0-beta.2` to `1.8.0-beta.1`,
|
||||
- `System.Text.Json` from `8.0.1` to `8.0.3`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Resolved a crash issue caused by `System.IO.FileLoadException` for
|
||||
`Microsoft.Extensions*.dll` libraries. This issue was due to a conflict with
|
||||
runtime store libraries, impacting applications with mismatched dependency
|
||||
versions. This fix enhances stability by addressing the underlying
|
||||
compatibility concerns. For details see:
|
||||
([#3075](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/3075),
|
||||
[#3168](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/3168))
|
||||
|
||||
## [1.4.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.4.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Support for `OTEL_DOTNET_AUTO_SQLCLIENT_SET_DBSTATEMENT_FOR_TEXT`
|
||||
and `OTEL_DOTNET_AUTO_ENTITYFRAMEWORKCORE_SET_DBSTATEMENT_FOR_TEXT`
|
||||
environment variables which controls whether the `db.statement`
|
||||
attribute is set for SQL statements for SQL Client and Entity Framework Core
|
||||
instrumentations. The default value for both environment variables is `false`
|
||||
due to the risk of leaking sensitive information in the collected database queries.
|
||||
|
||||
### Changed
|
||||
|
||||
- Changed supported method parameters for plugins
|
||||
- from `OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientInstrumentationOptions`
|
||||
to `OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientTraceInstrumentationOptions`,
|
||||
- from `OpenTelemetry.Instrumentation.SqlClient.SqlClientInstrumentationOptions`
|
||||
to `OpenTelemetry.Instrumentation.SqlClient.SqlClientTraceInstrumentationOptions`.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Following packages updated
|
||||
- `OpenTelemetry.ResourceDetectors.Azure` from `1.0.0-beta.4` to `1.0.0-beta.5`,
|
||||
- `OpenTelemetry.ResourceDetectors.Container` from `1.0.0-beta.5` to `1.0.0-beta.6`.
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.7.0` to `1.7.1`,
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` from `1.6.0-beta.3` to `1.7.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.0.0-rc.14` to `1.0.0-rc.15`,
|
||||
- .NET only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.7.0` to `1.7.1`,
|
||||
- `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.0.0-beta.9` to `1.0.0-beta.10`,
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient` from `1.6.0-beta.3` to `1.7.0-beta.1`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.7.0-beta.1` to `1.7.0-beta.2`.
|
||||
|
||||
### Removed
|
||||
|
||||
- Container resource detector will be not executed on .NET Framework.
|
||||
It was not giving any results before changes.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix ASP.NET Core traces instrumentation for .NET7. It is now using native
|
||||
support by `Microsoft.AspNetCore` instead of `OpenTelemetry.Instrumentation.AspNetCore`.
|
||||
|
||||
## [1.3.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.3.0)
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.7.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.7.0)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`8.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/8.0.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Support for Host, Process, and Process Runtime resource detectors.
|
||||
- Support for `OpenTelemetry.Instrumentation.AspNet.AspNetMetricsInstrumentationOptions`
|
||||
for plugins.
|
||||
- Support for [Confluent.Kafka](https://www.nuget.org/packages/Confluent.Kafka)
|
||||
traces instrumentation from 1.4.0 to 3.0.0 (excluding).
|
||||
|
||||
### Changed
|
||||
|
||||
- Changed minimal supported version of `Microsoft.Extensions.Logging`
|
||||
for `ILOGGER` instrumentation from `6.0.0` to `8.0.0`.
|
||||
- Changed supported method parameters for plugins
|
||||
- from `OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions`
|
||||
to `OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions`,
|
||||
- from `OpenTelemetry.Instrumentation.Http.HttpClientInstrumentationOptions`
|
||||
to `OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions`.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.7.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.7.0).
|
||||
- Following packages updated
|
||||
- `OpenTelemetry.Exporter.Prometheus.HttpListener` from `1.6.0-rc.1` to `1.7.0-rc.1`,
|
||||
- `OpenTelemetry.Instrumentation.Http` from `1.6.0` to `1.7.0`,
|
||||
- `OpenTelemetry.Instrumentation.Process` from `0.5.0-beta.3` to `0.5.0-beta.4`,
|
||||
- `OpenTelemetry.Instrumentation.Quartz` from `1.0.0-alpha.3` to `1.0.0-beta.1`,
|
||||
- `OpenTelemetry.Instrumentation.Runtime` from `1.5.1` to `1.7.0`,
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` from `1.6.0-beta.2` to `1.6.0-beta.3`,
|
||||
- `OpenTelemetry.Instrumentation.StackExchangeRedis` from `1.0.0-rc9.12` to `1.0.0-rc9.13`,
|
||||
- `OpenTelemetry.Instrumentation.Wcf` from `1.0.0-rc.13` to `1.0.0-rc.14`,
|
||||
- `OpenTelemetry.Shims.OpenTracing` from `1.6.0-beta.1` to `1.7.0-beta.1`,
|
||||
- `OpenTelemetry.ResourceDetectors.Azure` from `1.0.0-beta.3` to `1.0.0-beta.4`,
|
||||
- `OpenTelemetry.ResourceDetectors.Container` from `1.0.0-beta.4` to `1.0.0-beta.5`,
|
||||
- `OpenTelemetry.ResourceDetectors.ProcessRuntime` from `0.1.0-alpha.1` to `0.1.0-alpha.2`.
|
||||
- .NET only, following packages updated
|
||||
- `Google.Protobuf` updated from `3.19.4` to `3.22.5`.
|
||||
- `Microsoft.Extensions.Configuration` from `3.1.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Configuration.Abstractions` from `3.1.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Configuration.Binder` from `3.1.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.DependencyInjection` from `3.1.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.DependencyInjection.Abstractions` from `3.1.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Logging` from `6.0.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Options` from `3.1.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Options.ConfigurationExtensions` from `3.1.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Primitives` from `3.1.0` to `8.0.0`,
|
||||
- `OpenTelemetry.Instrumentation.AspNetCore` from `1.6.0-beta.3` to `1.7.0`,
|
||||
- `OpenTelemetry.Instrumentation.EntityFrameworkCore` from `1.0.0-beta.8` to `1.0.0-beta.9`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Google.Protobuf` updated from `3.25.1` to `3.25.2`,
|
||||
- `Grpc.Core.Api` from `2.59.0` to `2.60.0`,
|
||||
- `Microsoft.Extensions.Configuration.Binder` from `8.0.0` to `8.0.1`,
|
||||
- `Microsoft.Extensions.Options` from `8.0.0` to `8.0.1`,
|
||||
- `OpenTelemetry.Instrumentation.AspNet` from `1.6.0-beta.2` to `1.7.0-beta.1`,
|
||||
- `System.Text.Json` from `8.0.0` to `8.0.1`.
|
||||
|
||||
### Removed
|
||||
|
||||
Removed support for `Microsoft.Extensions.Logging`
|
||||
for `ILOGGER` for versions older than `8.0.0`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Set `service.name` resource attribute before invoking the plugin.
|
||||
|
||||
## [1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.6.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.6.0)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`8.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/8.0.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Add support for .NET 8.
|
||||
- Added support for [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)
|
||||
(NuGet package) traces instrumentation from `4.8.5`.
|
||||
- Ability to update installation via PS module (`OpenTelemetry.DotNet.Auto.psm1`).
|
||||
|
||||
### Changed
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- .NET Framework only, `Grpc.Core.Api` updated from `2.57.0` to `2.59.0`.
|
||||
- .NET only, `OpenTelemetry.Instrumentation.EntityFrameworkCore` updated
|
||||
from `1.0.0-beta.7` to `1.0.0-beta.8`.
|
||||
- .NET only, `OpenTelemetry.Instrumentation.AspNetCore` updated
|
||||
from `1.5.1-beta.1` to `1.6.0-beta.3`.
|
||||
- `OpenTelemetry.Instrumentation.GrpcNetClient`,
|
||||
and `OpenTelemetry.Instrumentation.Http`
|
||||
updated from `1.5.1-beta.1` to `1.6.0-beta.3`.
|
||||
- `OpenTelemetry.Instrumentation.SqlClient` updated from `1.5.1-beta.1` to `1.6.0-beta.2`.
|
||||
- .NET only, `OpenTelemetry.Instrumentation.StackExchangeRedis` updated
|
||||
from `1.0.0-rc9.10` to `1.0.0-rc9.12`.
|
||||
- .NET Framework only, `Google.Protobuf` updated from `3.24.4` to `3.25.1`.
|
||||
- .NET Framework only, `OpenTelemetry.Instrumentation.AspNet` and
|
||||
`OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule` updated from
|
||||
`1.6.0-beta.1` to `1.6.0-beta.2`.
|
||||
- `OpenTelemetry.Instrumentation.Wcf` updated from `1.0.0-rc.12` to `1.0.0-rc.13`.
|
||||
- .NET Framework only, following packages updated
|
||||
- `Microsoft.Bcl.AsyncInterfaces` from `7.0.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Configuration` from `7.0.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Configuration.Abstractions` from `7.0.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Configuration.Binder` from `7.0.4` to `8.0.0`,
|
||||
- `Microsoft.Extensions.DependencyInjection` from `7.0.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.DependencyInjection.Abstractions` from `7.0.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Logging` from `7.0.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Options` from `7.0.1` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Options.ConfigurationExtensions` from `7.0.0` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Primitives` from `7.0.0` to `8.0.0`,
|
||||
- `System.Text.Encodings.Web` from `7.0.0` to `8.0.0`,
|
||||
- `System.Text.Json` from `7.0.3` to `8.0.0`.
|
||||
- Following packages updated
|
||||
- `Microsoft.Extensions.Logging.Abstractions` from `7.0.1` to `8.0.0`,
|
||||
- `Microsoft.Extensions.Logging.Configuration` from `7.0.0` to `8.0.0`,
|
||||
- `System.Diagnostics.DiagnosticSource` from `7.0.2` to `8.0.0`.
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed support for `OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreMetricsInstrumentationOptions`
|
||||
for plugins.
|
||||
|
||||
## [1.1.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.1.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Added support for `Elastic.Transport` traces instrumentation 0.4.16+.
|
||||
`Elastic.Clients.Elasticsearch` 8.10.0+ traces instrumentation is covered by
|
||||
`Elastic.Transport` traces instrumentation.
|
||||
- Added `telemetry.distro.name` resource attribute. The value is set to `opentelemetry-dotnet-instrumentation`.
|
||||
|
||||
### Changed
|
||||
|
||||
- Change telemetry resource attribute name from `telemetry.auto.version` to `telemetry.distro.version`.
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- .NET Framework only, `Google.Protobuf` updated from `3.24.3` to `3.24.4`.
|
||||
- .NET Framework only, `OpenTelemetry.Instrumentation.AspNet` and
|
||||
`OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule` updated from
|
||||
`1.0.0-rc9.9` to `1.6.0-beta.1`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed log emission issue which resulted in same logs being exported multiple
|
||||
times for ASP.NET Core 6.0 apps when bytecode instrumentation was enabled
|
||||
and `WebApplicationBuilder` was used.
|
||||
|
||||
## [1.0.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.0.2)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed log emission issue for ASP.NET Core 6.0 apps and enhanced diagnostics.
|
||||
|
||||
## [1.0.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.0.1)
|
||||
|
||||
### Changed
|
||||
|
||||
#### Dependency updates
|
||||
|
||||
- .NET Framework only, `Google.Protobuf` updated from `3.24.2` to `3.24.3`.
|
||||
- `OpenTelemetry.ResourceDetectors.Azure` updated from `1.0.0-beta.2` to `1.0.0-beta.3`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Rule checking System.Diagnostics.DiagnosticSource version for net7.0
|
||||
failing on correct configuration [#2950](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2950).
|
||||
|
||||
## [1.0.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.0.0)
|
||||
|
||||
This release is built on top of [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.6.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.6.0)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`7.0.2`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.2)
|
||||
|
||||
### Added
|
||||
|
||||
- Added support for Azure SDK traces instrumentation on .NET Framework.
|
||||
- Added support for `WCFCLIENT` instrumentation on .NET.
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.6.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.6.0).
|
||||
- [MySql.Data](https://www.nuget.org/packages/MySql.Data/) instrumentation is now
|
||||
supported from version 8.1.0 working on .NET.
|
||||
- OpenTracing spans are registered under `opentracing-shim` name
|
||||
instead of `OpenTelemetry.AutoInstrumentation.OpenTracingShim`.
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed [MySql.Data](https://www.nuget.org/packages/MySql.Data/) instrumentation
|
||||
for versions 6.10.7-8.0.33.
|
||||
- Removed support for `OpenTelemetry.Instrumentation.MySqlData.MySqlDataInstrumentationOptions`
|
||||
for plugins.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed instrumentation loading issue where delayed instrumentation initialization
|
||||
could not bootstrap both traces and metrics.
|
||||
Affected scope: ASP.NET Core and HttpClient instrumentations.
|
||||
- Fixed `ILogger` log instrumentation issue that caused logs to be exported
|
||||
multiple times.
|
||||
|
||||
## [1.0.0-rc.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.0.0-rc.2)
|
||||
|
||||
### Added
|
||||
|
||||
- Support for Azure App Service resource detector.
|
||||
|
||||
- Added `BeforeConfigureTracerProvider`, `BeforeConfigureMeterProvider`,
|
||||
`TracerProviderInitialized` and `MeterProviderInitialized` for plugins.
|
||||
See [plugins documentation](/docs/plugins.md) for details.
|
||||
- Added support for Azure SDK traces instrumentation on .NET.
|
||||
|
||||
### Changed
|
||||
|
||||
- In plugins `ConfigureTracerProvider` and `ConfigureMeterProvider` are changed now
|
||||
to `AfterConfigureTracerProvider` and `AfterConfigureMeterProvider`.
|
||||
See [plugins documentation](/docs/plugins.md) for details.
|
||||
- Minimal version of `Grpc.Net.Client` supported on .NET updated to `2.52.0`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES` works correctly when .NET CLR Profiler
|
||||
is not enabled.
|
||||
- Fixed manual tracing when instrumented project is referencing
|
||||
`System.Diagnostics.DiagnosticSource` `7.0.2`
|
||||
[#2780](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2780).
|
||||
|
||||
## [1.0.0-rc.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.0.0-rc.1)
|
||||
|
||||
This release is built on top of [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.5.1`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.5.1)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`7.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.0)
|
||||
|
||||
### Added
|
||||
|
||||
- The environment variable `OTEL_DOTNET_AUTO_FAIL_FAST_ENABLED` could be
|
||||
used to enable or disable the failing process when
|
||||
automatic instrumentation cannot be executed.
|
||||
- Add support for MySqlConnector traces instrumentation.
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.5.1`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.5.1).
|
||||
- ASP.NET instrumentation no longer requires manual modification
|
||||
of config files to include `TelemetryHttpModule`.
|
||||
- Parameter for `ConfigureTracesOptions` extension point for StackExchangeRedis
|
||||
changed type from `OpenTelemetry.Instrumentation.StackExchangeRedis.StackExchangeRedisCallsInstrumentationOptions`
|
||||
to `OpenTelemetry.Instrumentation.StackExchangeRedis.StackExchangeRedisInstrumentationOptions`.
|
||||
- `WCF` instrumentation split to `WCFCLIENT` and `WCFSERVICE`.
|
||||
Both supported only on .NET Framework.
|
||||
- `WCFCLIENT` and `WCFSERVICE` no longer requires manual modification
|
||||
of config files to include `TelemetryEndpointBehaviorExtensionElement`.
|
||||
- [GraphQL](https://www.nuget.org/packages/GraphQL/) instrumentation is now
|
||||
supported from version 7.5.0 working on .NET.
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed `WCF` instrumentation for Core WCF Client working on .NET.
|
||||
- Removed [GraphQL](https://www.nuget.org/packages/GraphQL/) instrumentation
|
||||
for versions 2.3.0-2.4.*.
|
||||
|
||||
### Known issues
|
||||
|
||||
- Lack of support for MySql.Data 8.0.33. See [#2542](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2542).
|
||||
|
||||
## [0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Stability status added to the documentation.
|
||||
- Support `OTEL_LOG_LEVEL` to configure SDK logging level.
|
||||
- Fallback for the service name.
|
||||
If the service name is not configured, the automatic instrumentation uses
|
||||
the entry assembly name instead, only falling back to the process name
|
||||
in case of an error. If the application uses .NET Framework and is hosted
|
||||
on IIS, the service name is determined using `SiteName/ApplicationVirtualPath`.
|
||||
- Add MongoDB instrumentation support for .NET Framework.
|
||||
- Added a rule engine to validate potential conflicts and unsupported scenarios,
|
||||
ensuring back off instead of crashing, improving overall stability.
|
||||
- The environment variable `OTEL_DOTNET_AUTO_RULE_ENGINE_ENABLED` could be
|
||||
used to enable or disable the rule engine.
|
||||
- Support for Container resource detector.
|
||||
- Support for enabling well known resource detectors
|
||||
by using the environment variables
|
||||
- `OTEL_DOTNET_AUTO_RESOURCE_DETECTOR_ENABLED`
|
||||
- `OTEL_DOTNET_AUTO_{0}_RESOURCE_DETECTOR_ENABLED`.
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove support for enabling debugging mode with `OTEL_DOTNET_AUTO_DEBUG`.
|
||||
- Removed `OTEL_DOTNET_AUTO_INTEGRATIONS_FILE` as a required environment
|
||||
variable for bytecode instrumentation setup
|
||||
|
||||
## [0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0)
|
||||
|
||||
This release is built on top of [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.4.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.4.0)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`7.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.0)
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.4.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.4.0).
|
||||
|
||||
## [0.6.0-beta.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0-beta.2)
|
||||
|
||||
This beta release is built on top of [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.4.0-rc.4`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.4.0-rc.4)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`7.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.0)
|
||||
|
||||
### Added
|
||||
|
||||
- Support for systems with glibc versions 2.17-2.29.
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.4.0-rc.4`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.4.0-rc.4).
|
||||
- Replace `OTEL_DOTNET_AUTO_LEGACY_SOURCES` with `OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_LEGACY_SOURCES`.
|
||||
- Updated the shared store to correctly support
|
||||
[framework roll-forward](https://learn.microsoft.com/en-us/dotnet/core/versions/selection#framework-dependent-apps-roll-forward)
|
||||
from `net6.0` to `net7.0`.
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove support for plugin method `ConfigureMetricsOptions(OpenTelemetry.Instrumentation.Process.ProcessInstrumentationOptions)`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix location of `OpenTelemetry.AutoInstrumentation.Native.so` for `linux-musl-x64`.
|
||||
- Fix issues when instrumenting `dotnet` CLI
|
||||
[#1477](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/1744).
|
||||
|
||||
## [0.6.0-beta.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0-beta.1)
|
||||
|
||||
|
|
|
@ -3,11 +3,15 @@
|
|||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
<NuGetAudit>true</NuGetAudit>
|
||||
<NuGetAuditMode>all</NuGetAuditMode>
|
||||
<NuGetAuditLevel>low</NuGetAuditLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- StyleCop -->
|
||||
<ItemGroup>
|
||||
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="all" />
|
||||
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="all" />
|
||||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)GlobalSuppressions.cs" Link="GlobalSuppressions.solution.cs" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
<PropertyGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
||||
<LangVersion>11.0</LangVersion>
|
||||
<LangVersion>13.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -2,13 +2,15 @@
|
|||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="OpenTelemetry" Version="1.4.0-rc.3" />
|
||||
<PackageVersion Include="OpenTelemetry.Api" Version="1.4.0-rc.3" />
|
||||
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.4.0-rc.3" />
|
||||
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.4.0-rc.3" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc9.12" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Wcf" Version="1.0.0-rc.8" />
|
||||
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.25" />
|
||||
<PackageVersion Include="log4net" Version="3.1.0" />
|
||||
<PackageVersion Include="MinVer" Version="6.0.0" />
|
||||
<PackageVersion Include="OpenTelemetry" Version="1.12.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Api" Version="1.12.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.12.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.12.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Instrumentation.Wcf" Version="1.12.0-beta.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,18 +1,5 @@
|
|||
// <copyright file="GlobalSuppressions.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
|
||||
|
||||
// This file is used by Code Analysis to maintain SuppressMessage
|
||||
// attributes that are applied to this project.
|
||||
|
|
55
LICENSE
55
LICENSE
|
@ -207,19 +207,6 @@ OpenTelemetry .NET Automatic Instrumentation components
|
|||
OpenTelemetry .NET Automatic Instrumentation project contains components with
|
||||
separate copyright notices and license terms:
|
||||
|
||||
Library Google.Protobuf is under the following copyright:
|
||||
Copyright 2008 Google Inc. All rights reserved under BSD-3-Clause license
|
||||
(<https://github.com/protocolbuffers/protobuf/blob/main/LICENSE>).
|
||||
|
||||
Libraries
|
||||
|
||||
- Google.Protobuf,
|
||||
- Grpc.Net.Client
|
||||
- Grpc.Net.Common,
|
||||
are under the following copyright:
|
||||
Copyright 2019 The gRPC Authors under Apache License Version 2.0
|
||||
(<https://github.com/grpc/grpc-dotnet/blob/master/LICENSE>).
|
||||
|
||||
Libraries
|
||||
|
||||
- OpenTelemetry
|
||||
|
@ -227,7 +214,6 @@ Libraries
|
|||
- OpenTelemetry.Api.ProviderBuilderExtensions,
|
||||
- OpenTelemetry.Exporter.Console,
|
||||
- OpenTelemetry.Exporter.OpenTelemetryProtocol,
|
||||
- OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs,
|
||||
- OpenTelemetry.Exporter.Prometheus.HttpListener,
|
||||
- OpenTelemetry.Exporter.Zipkin,
|
||||
- OpenTelemetry.Extensions.Propagators,
|
||||
|
@ -244,12 +230,17 @@ Libraries
|
|||
|
||||
- OpenTelemetry.Api,
|
||||
- OpenTelemetry.Instrumentation.EntityFrameworkCore,
|
||||
- OpenTelemetry.Instrumentation.MySqlData,
|
||||
- OpenTelemetry.Instrumentation.Process,
|
||||
- OpenTelemetry.Instrumentation.Quartz,
|
||||
- OpenTelemetry.Instrumentation.Runtime,
|
||||
- OpenTelemetry.Instrumentation.StackExchangeRedis,
|
||||
- OpenTelemetry.Instrumentation.Wcf
|
||||
- OpenTelemetry.ResourceDetectors.Azure.dll,
|
||||
- OpenTelemetry.ResourceDetectors.Container.dll,
|
||||
- OpenTelemetry.ResourceDetectors.Host.dll,
|
||||
- OpenTelemetry.ResourceDetectors.OperatingSystem.dll,
|
||||
- OpenTelemetry.ResourceDetectors.Process.dll,
|
||||
- OpenTelemetry.ResourceDetectors.ProcessRuntime.dll,
|
||||
are under the following copyright:
|
||||
Copyright The OpenTelemetry Authors under Apache License Version 2.0
|
||||
(<https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/LICENSE>).
|
||||
|
@ -265,13 +256,15 @@ Libraries
|
|||
- Microsoft.Extensions.Configuration.Binder,
|
||||
- Microsoft.Extensions.DependencyInjection,
|
||||
- Microsoft.Extensions.DependencyInjection.Abstractions,
|
||||
- Microsoft.Extensions.Diagnostics.Abstractions,
|
||||
- Microsoft.Extensions.Logging,
|
||||
- Microsoft.Extensions.Logging.Abstractions,
|
||||
- Microsoft.Extensions.Logging.Configuration,
|
||||
- Microsoft.Extensions.Options,
|
||||
- Microsoft.Extensions.Options.ConfigurationExtensions,
|
||||
- Microsoft.Extensions.Primitives
|
||||
- Microsoft.Extensions.Primitives,
|
||||
- System.Diagnostics.DiagnosticSource,
|
||||
- System.IO.Pipelines,
|
||||
- System.Security.Permissions,
|
||||
are under the following copyright:
|
||||
Copyright (c) .NET Foundation and Contributors under the MIT License (MIT)
|
||||
|
@ -286,29 +279,7 @@ are under the following copyright:
|
|||
Copyright (c) .NET Foundation and Contributors under the MIT License (MIT)
|
||||
(<https://github.com/dotnet/wcf/blob/main/LICENSE.TXT>).
|
||||
|
||||
Library DnsClient is under the following copyright:
|
||||
Copyright The DnsClient.NET Authors under Apache License Version 2.0
|
||||
(<https://github.com/opentracing/opentracing-csharp/blob/master/LICENSE>).
|
||||
|
||||
Libraries
|
||||
|
||||
- MongoDB.Bson,
|
||||
- MongoDB.Driver.Core,
|
||||
- MongoDB.Libmongocrypt,
|
||||
- libmongocrypt,
|
||||
- libzstd,
|
||||
- mongocrypt
|
||||
- snappy32,
|
||||
- snappy64,
|
||||
are under the following copyright:
|
||||
Copyright 2010-present MongoDB Inc. under Apache License Version 2.0
|
||||
(<https://github.com/mongodb/mongo-csharp-driver/blob/master/License.txt>).
|
||||
|
||||
Library MongoDB.Driver.Core.Extensions.DiagnosticSources is under the following copyright:
|
||||
Copyright MongoDB.Driver.Core.Extensions.DiagnosticSources Authors under Apache
|
||||
License Version 2.0
|
||||
(<https://github.com/jbogard/MongoDB.Driver.Core.Extensions.DiagnosticSources/blob/master/LICENSE>).
|
||||
|
||||
Library SharpCompress is under the following copyright:
|
||||
Copyright (c) 2014 Adam Hathcock under the MIT License (MIT)
|
||||
(<https://github.com/adamhathcock/sharpcompress/blob/master/LICENSE.txt>).
|
||||
Component Serilog compiled into OpenTelemetry.AutoInstrumentation, OpenTelemetry.AutoInstrumentation.Loader, OpenTelemetry.AutoInstrumentation.StartupHook
|
||||
is under the following copyright:
|
||||
Copyright 2013-2017 Serilog Contributors under Apache License Version 2.0
|
||||
(<https://github.com/serilog/serilog-sinks-file/blob/main/LICENSE>).
|
File diff suppressed because it is too large
Load Diff
33
build.ps1
33
build.ps1
|
@ -20,26 +20,16 @@ $DotNetGlobalFile = "$PSScriptRoot\\global.json"
|
|||
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
|
||||
$DotNetChannel = "STS"
|
||||
|
||||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
|
||||
$env:DOTNET_MULTILEVEL_LOOKUP = 0
|
||||
$env:DOTNET_NOLOGO = 1
|
||||
|
||||
###########################################################################
|
||||
# EXECUTION
|
||||
###########################################################################
|
||||
|
||||
function ExecSafe([scriptblock] $cmd, [int]$maxRetries = 0) {
|
||||
$tryCount = 0
|
||||
while ($true) {
|
||||
$tryCount++
|
||||
& $cmd
|
||||
if ($global:LASTEXITCODE -eq 0) {
|
||||
break
|
||||
}
|
||||
if ($tryCount -gt $maxRetries) {
|
||||
exit $global:LASTEXITCODE
|
||||
}
|
||||
}
|
||||
function ExecSafe([scriptblock] $cmd) {
|
||||
& $cmd
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
}
|
||||
|
||||
# If dotnet CLI is installed globally and it matches requested version, use for execution
|
||||
|
@ -65,15 +55,20 @@ else {
|
|||
# Install by channel or version
|
||||
$DotNetDirectory = "$TempDirectory\dotnet-win"
|
||||
if (!(Test-Path variable:DotNetVersion)) {
|
||||
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
|
||||
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
|
||||
} else {
|
||||
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
|
||||
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
|
||||
}
|
||||
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
|
||||
$env:PATH = "$DotNetDirectory;$env:PATH"
|
||||
}
|
||||
|
||||
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
|
||||
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"
|
||||
|
||||
ExecSafe { & $env:DOTNET_EXE restore $BuildProjectFile -nologo -clp:NoSummary --verbosity quiet } -maxRetries 2
|
||||
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet --no-restore }
|
||||
if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
|
||||
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
|
||||
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
|
||||
}
|
||||
|
||||
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
|
||||
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
|
||||
|
|
14
build.sh
14
build.sh
|
@ -17,8 +17,7 @@ DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
|
|||
DOTNET_CHANNEL="STS"
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
export DOTNET_MULTILEVEL_LOOKUP=0
|
||||
export DOTNET_NOLOGO=1
|
||||
|
||||
###########################################################################
|
||||
# EXECUTION
|
||||
|
@ -30,7 +29,8 @@ function FirstJsonValue {
|
|||
|
||||
# If dotnet CLI is installed globally and it matches requested version, use for execution
|
||||
if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then
|
||||
export DOTNET_EXE="$(command -v dotnet)"
|
||||
DOTNET_EXE="$(command -v dotnet)"
|
||||
export DOTNET_EXE
|
||||
else
|
||||
# Download install script
|
||||
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh"
|
||||
|
@ -54,9 +54,15 @@ else
|
|||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
|
||||
fi
|
||||
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
|
||||
export PATH="$DOTNET_DIRECTORY:$PATH"
|
||||
fi
|
||||
|
||||
echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)"
|
||||
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"
|
||||
|
||||
if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
|
||||
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
|
||||
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
|
||||
fi
|
||||
|
||||
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
|
||||
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Text;
|
|||
using Mono.Cecil;
|
||||
using Serilog;
|
||||
|
||||
public class AssemblyRedirectionSourceGenerator
|
||||
public static class AssemblyRedirectionSourceGenerator
|
||||
{
|
||||
public static void Generate(string assembliesFolderPath, string generatedFilePath)
|
||||
{
|
||||
|
@ -31,36 +31,67 @@ public class AssemblyRedirectionSourceGenerator
|
|||
|
||||
var sourceContents = GenerateSourceContents(assemblies);
|
||||
|
||||
File.WriteAllText(generatedFilePath, sourceContents, Encoding.UTF8);
|
||||
File.WriteAllText(generatedFilePath, sourceContents);
|
||||
Log.Information("Assembly redirection source generated {0}", generatedFilePath);
|
||||
}
|
||||
|
||||
static string GenerateSourceContents(SortedDictionary<string, AssemblyNameDefinition> assemblies)
|
||||
private static string GenerateSourceContents(SortedDictionary<string, AssemblyNameDefinition> assemblies)
|
||||
{
|
||||
var sb = new StringBuilder(assemblies.Count * 256);
|
||||
sb.AppendLine($"// Auto-generated file, do not change it - generated by the {nameof(AssemblyRedirectionSourceGenerator)} type");
|
||||
sb.Append(@"
|
||||
#include ""cor_profiler.h""
|
||||
#pragma warning disable format
|
||||
return
|
||||
$$"""
|
||||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// Auto-generated file, do not change it - generated by the {{nameof(AssemblyRedirectionSourceGenerator)}} type
|
||||
|
||||
#include "cor_profiler.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define STR(Z1) #Z1
|
||||
#define AUTO_MAJOR STR(OTEL_AUTO_VERSION_MAJOR)
|
||||
|
||||
namespace trace
|
||||
{
|
||||
void CorProfiler::InitNetFxAssemblyRedirectsMap()
|
||||
{
|
||||
const USHORT auto_major = atoi(AUTO_MAJOR);
|
||||
|
||||
assembly_version_redirect_map_.insert({
|
||||
{{GenerateEntries(assemblies)}}
|
||||
});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
""";
|
||||
#pragma warning restore format
|
||||
}
|
||||
|
||||
private static string GenerateEntries(SortedDictionary<string, AssemblyNameDefinition> assemblies)
|
||||
{
|
||||
var longLineLength = 80;
|
||||
var sb = new StringBuilder(assemblies.Count * longLineLength);
|
||||
|
||||
#ifdef _WIN32
|
||||
namespace trace
|
||||
{
|
||||
void CorProfiler::InitNetFxAssemblyRedirectsMap()
|
||||
{
|
||||
assembly_version_redirect_map_.insert({
|
||||
");
|
||||
foreach (var kvp in assemblies)
|
||||
{
|
||||
var v = kvp.Value.Version!;
|
||||
sb.AppendLine($" {{ L\"{kvp.Key}\", {{{v.Major}, {v.Minor}, {v.Build}, {v.Revision}}} }},");
|
||||
if (kvp.Key != "OpenTelemetry.AutoInstrumentation")
|
||||
{
|
||||
sb.AppendLine($" {{ L\"{kvp.Key}\", {{{v.Major}, {v.Minor}, {v.Build}, {v.Revision}}} }},");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine($" {{ L\"{kvp.Key}\", {{auto_major, 0, 0, 0}} }},");
|
||||
}
|
||||
}
|
||||
|
||||
sb.Append(@" });
|
||||
}
|
||||
}
|
||||
#endif
|
||||
");
|
||||
|
||||
return sb.ToString();
|
||||
return sb.ToString()
|
||||
.AsSpan() // Optimisation for following string manipulations
|
||||
.Trim() // Remove whitespaces
|
||||
.TrimEnd(',') // Remove trailing comma
|
||||
.ToString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
using Nuke.Common;
|
||||
using Nuke.Common.IO;
|
||||
|
||||
partial class Build
|
||||
{
|
||||
AbsolutePath InstallationScriptsDirectory => OutputDirectory / "installation-scripts";
|
||||
|
||||
Target BuildInstallationScripts => _ => _
|
||||
.After(Clean)
|
||||
.After(CreateRequiredDirectories)
|
||||
.Executes(() =>
|
||||
{
|
||||
var scriptTemplates = RootDirectory / "script-templates";
|
||||
var templateFiles = scriptTemplates.GetFiles();
|
||||
foreach (var templateFile in templateFiles)
|
||||
{
|
||||
var scriptFile = InstallationScriptsDirectory / templateFile.Name.Replace(".template", "");
|
||||
templateFile.Copy(scriptFile, ExistsPolicy.FileOverwrite);
|
||||
scriptFile.UpdateText(x =>
|
||||
x.Replace("{{VERSION}}", VersionHelper.GetVersion()));
|
||||
}
|
||||
});
|
||||
}
|
|
@ -0,0 +1,193 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using Extensions;
|
||||
using Nuke.Common;
|
||||
using Nuke.Common.IO;
|
||||
using Nuke.Common.Tools.DotNet;
|
||||
using Nuke.Common.Tools.NuGet;
|
||||
using Nuke.Common.Utilities.Collections;
|
||||
using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
||||
|
||||
partial class Build
|
||||
{
|
||||
AbsolutePath NuGetArtifactsDirectory => NuGetArtifacts ?? (OutputDirectory / "nuget-artifacts");
|
||||
|
||||
Target BuildNuGetPackages => _ => _
|
||||
.Description(
|
||||
"Builds the NuGet packages of the project assuming that any necessary build artifacts were already downloaded.")
|
||||
.DependsOn(CleanAutoInstrumentationNuGetPackagesFromLocalCaches)
|
||||
.DependsOn(BuildManagedSrcNuGetPackages)
|
||||
.DependsOn(SetupRuntimeNativeFolderForNuGetPackage)
|
||||
.DependsOn(BuildNuSpecNuGetPackages);
|
||||
|
||||
Target TestNuGetPackages => _ => _
|
||||
.Description(
|
||||
"Test the NuGet packages of the project assuming that the packages are available at bin/nuget-artifacts.")
|
||||
.DependsOn(BuildNuGetPackagesTests)
|
||||
.DependsOn(BuildNuGetPackagesTestApplications)
|
||||
.DependsOn(RunNuGetPackagesTests);
|
||||
|
||||
Target BuildManagedSrcNuGetPackages => _ => _
|
||||
.Description("Build the NuGet packages that are generated directly from src/**/*.csproj files")
|
||||
.Executes(() =>
|
||||
{
|
||||
foreach (var project in Solution.GetManagedSrcProjects().Where(p => !p.Name.EndsWith("AdditionalDeps")))
|
||||
{
|
||||
DotNetPack(x => x
|
||||
.SetProject(project)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetOutputDirectory(NuGetArtifactsDirectory));
|
||||
}
|
||||
});
|
||||
|
||||
Target SetupRuntimeNativeFolderForNuGetPackage => _ => _
|
||||
.Unlisted()
|
||||
.Description("Setup the \"runtimes/{platform}-{architecture}/native\" folders under \"nuget/OpenTelemetry.AutoInstrumentation.Runtime.Native\".")
|
||||
.Executes(() =>
|
||||
{
|
||||
var ciArtifactsDirectory = RootDirectory / "bin" / "ci-artifacts";
|
||||
var baseRuntimeNativePath = RootDirectory / "nuget" / "OpenTelemetry.AutoInstrumentation.Runtime.Native/";
|
||||
|
||||
var requiredArtifacts = new string[]
|
||||
{
|
||||
"bin-alpine-x64/linux-musl-x64",
|
||||
"bin-alpine-arm64/linux-musl-arm64",
|
||||
"bin-ubuntu-22.04/linux-x64",
|
||||
"bin-ubuntu-22.04-arm/linux-arm64",
|
||||
"bin-macos-13/osx-x64",
|
||||
"bin-windows-2022/win-x64",
|
||||
"bin-windows-2022/win-x86"
|
||||
};
|
||||
|
||||
foreach (var artifactFolder in requiredArtifacts)
|
||||
{
|
||||
var sourcePath = ciArtifactsDirectory / artifactFolder;
|
||||
|
||||
var platformAndArchitecture = Path.GetFileName(artifactFolder);
|
||||
var destinationPath = baseRuntimeNativePath / "runtimes" / platformAndArchitecture / "native";
|
||||
destinationPath.DeleteDirectory();
|
||||
|
||||
sourcePath.Copy(destinationPath);
|
||||
}
|
||||
});
|
||||
|
||||
Target CleanAutoInstrumentationNuGetPackagesFromLocalCaches => _ => _
|
||||
.Unlisted()
|
||||
.Description(
|
||||
"Remove the AutoInstrumentation packages from local caches ensuring that the latest locally built versions are used.")
|
||||
.Before(BuildManagedSrcNuGetPackages)
|
||||
.Before(BuildNuSpecNuGetPackages)
|
||||
.Executes(() =>
|
||||
{
|
||||
const string autoInstrumentationGlob = "opentelemetry.autoinstrumentation*"; // NuGet lowers the case of the directory.
|
||||
|
||||
// This is mail fail if any dotnet tasks are using the packages on the background, reduce the risk by
|
||||
// shutting down any build servers. However, this doesn't prevent tools like VS and VS Code of holding
|
||||
// the BuildTasks package if they are doing background builds that reference the package.
|
||||
DotNet("dotnet build-server shutdown");
|
||||
|
||||
// Clean the default local cache.
|
||||
var output = DotNet("dotnet nuget locals global-packages --list", RootDirectory);
|
||||
foreach (var line in output)
|
||||
{
|
||||
AbsolutePath packagesDir = Path.GetFullPath(line.Text[("global-packages: ".Length)..]);
|
||||
var autoInstrumentationPackagesDirectories = packagesDir.GlobDirectories(autoInstrumentationGlob);
|
||||
autoInstrumentationPackagesDirectories.ForEach(d => d.DeleteDirectory());
|
||||
}
|
||||
|
||||
// Clean the NuGet test applications cache.
|
||||
var nugetTestAppsPackagesDir =
|
||||
RootDirectory / "test" / "test-applications" / "nuget-packages" / "packages";
|
||||
var nugetTestAppsAutoInstrumentationPackagesDirectories = nugetTestAppsPackagesDir.GlobDirectories(autoInstrumentationGlob);
|
||||
nugetTestAppsAutoInstrumentationPackagesDirectories.ForEach(d => d.DeleteDirectory());
|
||||
});
|
||||
|
||||
Target BuildNuSpecNuGetPackages => _ => _
|
||||
.Description("Build the NuGet packages specified by nuget/**/*.nuspec projects.")
|
||||
.After(SetupRuntimeNativeFolderForNuGetPackage)
|
||||
.Executes(() =>
|
||||
{
|
||||
// .nuspec files don't support .props or another way to share properties.
|
||||
// To avoid repeating these values on all .nuspec files they are going to
|
||||
// be passed as properties.
|
||||
// Keeping common values here and using them as properties
|
||||
var nuspecCommonProperties = new Dictionary<string, object>
|
||||
{
|
||||
// NU5104: "A stable release of a package should not have a prerelease dependency."
|
||||
// NU5128: "Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location."
|
||||
{ "NoWarn", "NU5104;NU5128" },
|
||||
{ "NuGetLicense", "Apache-2.0" },
|
||||
{ "NuGetPackageVersion", VersionHelper.GetVersion() },
|
||||
{ "NuGetRequiredLicenseAcceptance", "true" },
|
||||
{ "OpenTelemetryAuthors", "OpenTelemetry Authors" },
|
||||
{ "CommitId", VersionHelper.GetCommitId() }
|
||||
};
|
||||
|
||||
var nuspecSolutionFolder = Solution.GetSolutionFolder("nuget")
|
||||
?? throw new InvalidOperationException("Couldn't find the expected \"nuget\" solution folder.");
|
||||
|
||||
var nuspecProjects = nuspecSolutionFolder.Items.Keys.ToArray();
|
||||
foreach (var nuspecProject in nuspecProjects)
|
||||
{
|
||||
NuGetTasks.NuGetPack(s => s
|
||||
.SetTargetPath(nuspecProject)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetProperties(nuspecCommonProperties)
|
||||
.SetOutputDirectory(NuGetArtifactsDirectory));
|
||||
}
|
||||
});
|
||||
|
||||
Target BuildNuGetPackagesTests => _ => _
|
||||
.Description("Builds the NuGetPackagesTests project")
|
||||
.Executes(() =>
|
||||
{
|
||||
var nugetPackagesTestProject = Solution.GetProjectByName("NuGetPackagesTests");
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(nugetPackagesTestProject)
|
||||
.SetConfiguration(BuildConfiguration));
|
||||
});
|
||||
|
||||
Target BuildNuGetPackagesTestApplications => _ => _
|
||||
.Description("Builds the TestApplications.* used by the NuGetPackagesTests")
|
||||
.Executes(() =>
|
||||
{
|
||||
foreach (var packagesTestApplicationProject in Solution.GetNuGetPackagesTestApplications())
|
||||
{
|
||||
// Unlike the integration apps these require a restore step.
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(packagesTestApplicationProject)
|
||||
.SetProperty("NuGetPackageVersion", VersionHelper.GetVersion())
|
||||
.SetRuntime(RuntimeInformation.RuntimeIdentifier)
|
||||
.SetSelfContained(true)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetPlatform(Platform));
|
||||
|
||||
// Build framework-dependent without specifying runtime identifier
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(packagesTestApplicationProject)
|
||||
.SetProperty("NuGetPackageVersion", VersionHelper.GetVersion())
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetPlatform(Platform));
|
||||
}
|
||||
});
|
||||
|
||||
Target RunNuGetPackagesTests => _ => _
|
||||
.Description("Run the NuGetPackagesTests.")
|
||||
.After(BuildNuGetPackagesTests)
|
||||
.After(BuildNuGetPackagesTestApplications)
|
||||
.Executes(() =>
|
||||
{
|
||||
var nugetPackagesTestProject = Solution.GetProjectByName("NuGetPackagesTests");
|
||||
|
||||
for (var i = 0; i < TestCount; i++)
|
||||
{
|
||||
DotNetTest(config => config
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetFilter(AndFilter(TestNameFilter(), ContainersFilter()))
|
||||
.SetBlameHangTimeout("5m")
|
||||
.EnableTrxLogOutput(GetResultsDirectory(nugetPackagesTestProject))
|
||||
.SetProjectFile(nugetPackagesTestProject)
|
||||
.SetNoRestore(NoRestore)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
|
@ -2,23 +2,41 @@ using Nuke.Common;
|
|||
using Nuke.Common.IO;
|
||||
using Serilog;
|
||||
using static Nuke.Common.EnvironmentInfo;
|
||||
using static Nuke.Common.IO.FileSystemTasks;
|
||||
|
||||
partial class Build
|
||||
{
|
||||
Target CompileNativeSrcLinux => _ => _
|
||||
.Unlisted()
|
||||
.After(CompileManagedSrc)
|
||||
.After(CreateRequiredDirectories)
|
||||
.OnlyWhenStatic(() => IsLinux)
|
||||
.Executes(() =>
|
||||
{
|
||||
var buildDirectory = NativeProfilerProject.Directory / "build";
|
||||
EnsureExistingDirectory(buildDirectory);
|
||||
buildDirectory.CreateDirectory();
|
||||
|
||||
var (major, minor, patch) = VersionHelper.GetVersionParts();
|
||||
|
||||
CMake.Value(
|
||||
arguments: "../ -DCMAKE_BUILD_TYPE=Release",
|
||||
arguments: $"../ -DCMAKE_BUILD_TYPE=Release -DOTEL_AUTO_VERSION={VersionHelper.GetVersionWithoutSuffixes()} -DOTEL_AUTO_VERSION_MAJOR={major} -DOTEL_AUTO_VERSION_MINOR={minor} -DOTEL_AUTO_VERSION_PATCH={patch}",
|
||||
workingDirectory: buildDirectory);
|
||||
Make.Value(
|
||||
arguments: $"",
|
||||
workingDirectory: buildDirectory);
|
||||
});
|
||||
|
||||
Target CompileNativeDependenciesForManagedTestsLinux => _ => _
|
||||
.Unlisted()
|
||||
.After(CreateRequiredDirectories)
|
||||
.OnlyWhenStatic(() => IsLinux)
|
||||
.Executes(() =>
|
||||
{
|
||||
var buildDirectory = Solution.GetContinuousProfilerNativeDep().Directory.ToString();
|
||||
CMake.Value(
|
||||
arguments: "-S .",
|
||||
workingDirectory: buildDirectory);
|
||||
Make.Value(
|
||||
arguments: $"",
|
||||
workingDirectory: buildDirectory);
|
||||
Make.Value(workingDirectory: buildDirectory);
|
||||
});
|
||||
|
||||
Target CompileNativeTestsLinux => _ => _
|
||||
|
@ -39,16 +57,17 @@ partial class Build
|
|||
{
|
||||
// Copy Native file
|
||||
var source = NativeProfilerProject.Directory / "build" / "bin" / $"{NativeProfilerProject.Name}.so";
|
||||
var platform = Platform.ToString().ToLowerInvariant();
|
||||
string clrProfilerDirectoryName = Environment.GetEnvironmentVariable("OS_TYPE") switch
|
||||
{
|
||||
"linux-musl" => "linux-musl-x64",
|
||||
_ => "linux-x64"
|
||||
"linux-musl" => $"linux-musl-{platform}",
|
||||
_ => $"linux-{platform}"
|
||||
};
|
||||
|
||||
var dest = TracerHomeDirectory / clrProfilerDirectoryName;
|
||||
Log.Information($"Copying '{source}' to '{dest}'");
|
||||
|
||||
CopyFileToDirectory(source, dest, FileExistsPolicy.Overwrite);
|
||||
source.CopyToDirectory(dest, ExistsPolicy.FileOverwrite);
|
||||
});
|
||||
|
||||
Target RunNativeTestsLinux => _ => _
|
||||
|
|
|
@ -2,19 +2,41 @@ using Nuke.Common;
|
|||
using Nuke.Common.IO;
|
||||
using Serilog;
|
||||
using static Nuke.Common.EnvironmentInfo;
|
||||
using static Nuke.Common.IO.FileSystemTasks;
|
||||
|
||||
partial class Build
|
||||
{
|
||||
Target CompileNativeSrcMacOs => _ => _
|
||||
.Unlisted()
|
||||
.After(CompileManagedSrc)
|
||||
.After(CreateRequiredDirectories)
|
||||
.OnlyWhenStatic(() => IsOsx)
|
||||
.Executes(() =>
|
||||
{
|
||||
var nativeProjectDirectory = NativeProfilerProject.Directory;
|
||||
CMake.Value(arguments: ".", workingDirectory: nativeProjectDirectory);
|
||||
Make.Value(workingDirectory: nativeProjectDirectory);
|
||||
var buildDirectory = NativeProfilerProject.Directory / "build";
|
||||
buildDirectory.CreateDirectory();
|
||||
|
||||
var (major, minor, patch) = VersionHelper.GetVersionParts();
|
||||
|
||||
CMake.Value(
|
||||
arguments: $"../ -DCMAKE_BUILD_TYPE=Release -DOTEL_AUTO_VERSION={VersionHelper.GetVersionWithoutSuffixes()} -DOTEL_AUTO_VERSION_MAJOR={major} -DOTEL_AUTO_VERSION_MINOR={minor} -DOTEL_AUTO_VERSION_PATCH={patch}",
|
||||
workingDirectory: buildDirectory);
|
||||
Make.Value(
|
||||
arguments: $"",
|
||||
workingDirectory: buildDirectory);
|
||||
});
|
||||
|
||||
Target CompileNativeDependenciesForManagedTestsMacOs => _ => _
|
||||
.Unlisted()
|
||||
.After(CreateRequiredDirectories)
|
||||
.OnlyWhenStatic(() => IsOsx)
|
||||
.Executes(() =>
|
||||
{
|
||||
var buildDirectory = Solution.GetContinuousProfilerNativeDep().Directory.ToString();
|
||||
CMake.Value(
|
||||
arguments: "-S .",
|
||||
workingDirectory: buildDirectory);
|
||||
Make.Value(
|
||||
arguments: $"",
|
||||
workingDirectory: buildDirectory);
|
||||
});
|
||||
|
||||
Target PublishNativeProfilerMacOs => _ => _
|
||||
|
@ -24,10 +46,11 @@ partial class Build
|
|||
.Executes(() =>
|
||||
{
|
||||
// Create home directory
|
||||
var source = NativeProfilerProject.Directory / "bin" / $"{NativeProfilerProject.Name}.dylib";
|
||||
var dest = TracerHomeDirectory / "osx-x64";
|
||||
var source = NativeProfilerProject.Directory / "build" / "bin" / $"{NativeProfilerProject.Name}.dylib";
|
||||
var platform = Platform.ToString().ToLowerInvariant();
|
||||
var dest = TracerHomeDirectory / $"osx-{platform}";
|
||||
Log.Information($"Copying '{source}' to '{dest}'");
|
||||
|
||||
CopyFileToDirectory(source, dest, FileExistsPolicy.Overwrite);
|
||||
source.CopyToDirectory(dest, ExistsPolicy.FileOverwrite);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -4,11 +4,12 @@ using Nuke.Common.IO;
|
|||
using Nuke.Common.ProjectModel;
|
||||
using Nuke.Common.Tooling;
|
||||
using Nuke.Common.Tools.Docker;
|
||||
using Nuke.Common.Tools.DotNet;
|
||||
using Nuke.Common.Tools.MSBuild;
|
||||
using Serilog;
|
||||
using static Nuke.Common.EnvironmentInfo;
|
||||
using static Nuke.Common.IO.FileSystemTasks;
|
||||
using static Nuke.Common.Tools.Docker.DockerTasks;
|
||||
using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
||||
using static Nuke.Common.Tools.MSBuild.MSBuildTasks;
|
||||
|
||||
partial class Build
|
||||
|
@ -28,17 +29,42 @@ partial class Build
|
|||
|
||||
foreach (var project in Solution.GetNativeSrcProjects())
|
||||
{
|
||||
PerformLegacyRestoreIfNeeded(project);
|
||||
|
||||
var (major, minor, patch) = VersionHelper.GetVersionParts();
|
||||
|
||||
// Can't use dotnet msbuild, as needs to use the VS version of MSBuild
|
||||
MSBuild(s => s
|
||||
.SetTargetPath(project)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.DisableRestore()
|
||||
.SetRestore(!NoRestore)
|
||||
.SetMaxCpuCount(null)
|
||||
.SetProperty("OTEL_AUTO_VERSION_MAJOR", major)
|
||||
.SetProperty("OTEL_AUTO_VERSION_MINOR", minor)
|
||||
.SetProperty("OTEL_AUTO_VERSION_PATCH", patch)
|
||||
.CombineWith(platforms, (m, platform) => m
|
||||
.SetTargetPlatform(platform)));
|
||||
}
|
||||
});
|
||||
|
||||
Target CompileNativeDependenciesForManagedTestsWindows => _ => _
|
||||
.Unlisted()
|
||||
.After(CompileManagedSrc)
|
||||
.After(GenerateNetFxAssemblyRedirectionSource)
|
||||
.OnlyWhenStatic(() => IsWin)
|
||||
.Executes(() =>
|
||||
{
|
||||
var continuousProfilerNativeDepProject = Solution.GetContinuousProfilerNativeDep();
|
||||
PerformLegacyRestoreIfNeeded(continuousProfilerNativeDepProject);
|
||||
// Can't use dotnet msbuild, as needs to use the VS version of MSBuild
|
||||
MSBuild(s => s
|
||||
.SetProjectFile(continuousProfilerNativeDepProject)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetRestore(!NoRestore)
|
||||
.SetTargetPlatform(Platform)
|
||||
.SetRestore(false));
|
||||
});
|
||||
|
||||
Target CompileNativeTestsWindows => _ => _
|
||||
.Unlisted()
|
||||
.After(CompileNativeSrc)
|
||||
|
@ -51,11 +77,14 @@ partial class Build
|
|||
? new[] { MSBuildTargetPlatform.x64, MSBuildTargetPlatform.x86 }
|
||||
: new[] { MSBuildTargetPlatform.x86 };
|
||||
|
||||
var nativeTestProject = Solution.GetNativeTestProject();
|
||||
PerformLegacyRestoreIfNeeded(nativeTestProject);
|
||||
|
||||
// Can't use dotnet msbuild, as needs to use the VS version of MSBuild
|
||||
MSBuild(s => s
|
||||
.SetTargetPath(Solution.GetNativeTestProject())
|
||||
.SetTargetPath(nativeTestProject)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.DisableRestore()
|
||||
.SetRestore(!NoRestore)
|
||||
.SetMaxCpuCount(null)
|
||||
.CombineWith(platforms, (m, platform) => m
|
||||
.SetTargetPlatform(platform)));
|
||||
|
@ -75,7 +104,7 @@ partial class Build
|
|||
|
||||
Log.Information($"Copying '{source}' to '{dest}'");
|
||||
|
||||
CopyFileToDirectory(source, dest, FileExistsPolicy.Overwrite);
|
||||
source.CopyToDirectory(dest, ExistsPolicy.FileOverwrite);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -87,38 +116,90 @@ partial class Build
|
|||
.OnlyWhenStatic(() => IsWin)
|
||||
.Executes(() =>
|
||||
{
|
||||
var project = Solution.GetProject(Projects.Tests.AutoInstrumentationNativeTests);
|
||||
var project = Solution.GetProjectByName(Projects.Tests.AutoInstrumentationNativeTests);
|
||||
var workingDirectory = project.Directory / "bin" / BuildConfiguration.ToString() / Platform.ToString();
|
||||
var exePath = workingDirectory / $"{project.Name}.exe";
|
||||
var testExe = ToolResolver.GetLocalTool(exePath);
|
||||
var envVars = new Dictionary<string, string>(){
|
||||
{ "OTEL_DOTNET_AUTO_LOG_DIRECTORY", ProfilerTestLogs }
|
||||
};
|
||||
var testExe = ToolResolver.GetTool(exePath);
|
||||
|
||||
testExe("--gtest_output=xml", workingDirectory: workingDirectory);
|
||||
testExe($"--gtest_output=xml", workingDirectory: workingDirectory, environmentVariables: envVars);
|
||||
});
|
||||
|
||||
Target PublishIisTestApplications => _ => _
|
||||
.Unlisted()
|
||||
.After(CompileManagedTests)
|
||||
.OnlyWhenStatic(() => IsWin && Containers == ContainersWindows)
|
||||
.After(BuildInstallationScripts)
|
||||
.OnlyWhenStatic(() => IsWin && (Containers == ContainersWindows || Containers == ContainersWindowsOnly))
|
||||
.Executes(() =>
|
||||
{
|
||||
var aspNetProject = Solution.GetProject(Projects.Tests.Applications.AspNet);
|
||||
var aspNetProject = Solution.GetProjectByName(Projects.Tests.Applications.AspNet);
|
||||
BuildDockerImage(aspNetProject, "integrated-nogac", "classic-nogac", "integrated", "classic");
|
||||
|
||||
var wcfProject = Solution.GetProjectByName(Projects.Tests.Applications.WcfIis);
|
||||
BuildDockerImage(wcfProject);
|
||||
|
||||
var owinProject = Solution.GetProjectByName(Projects.Tests.Applications.OwinIis);
|
||||
BuildDockerImage(owinProject);
|
||||
});
|
||||
|
||||
void BuildDockerImage(Project project, params string[] targets)
|
||||
{
|
||||
const string moduleName = "OpenTelemetry.DotNet.Auto.psm1";
|
||||
var sourceModulePath = InstallationScriptsDirectory / moduleName;
|
||||
var localBinDirectory = project.Directory / "bin";
|
||||
var localTracerZip = localBinDirectory / "tracer.zip";
|
||||
|
||||
try
|
||||
{
|
||||
sourceModulePath.CopyToDirectory(localBinDirectory);
|
||||
TracerHomeDirectory.ZipTo(localTracerZip);
|
||||
|
||||
PerformLegacyRestoreIfNeeded(project);
|
||||
|
||||
MSBuild(x => x
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatform(Platform)
|
||||
.SetProperty("DeployOnBuild", true)
|
||||
.SetMaxCpuCount(null)
|
||||
.SetProperty("PublishProfile", aspNetProject.Directory / "Properties" / "PublishProfiles" / $"FolderProfile.{BuildConfiguration}.pubxml")
|
||||
.SetTargetPath(aspNetProject));
|
||||
.SetProperty("PublishProfile",
|
||||
project.Directory / "Properties" / "PublishProfiles" / $"FolderProfile.{BuildConfiguration}.pubxml")
|
||||
.SetTargetPath(project));
|
||||
|
||||
DockerBuild(x => x
|
||||
.SetPath(".")
|
||||
.SetBuildArg($"configuration={BuildConfiguration}", $"windowscontainer_version={WindowsContainerVersion}")
|
||||
.SetRm(true)
|
||||
.SetTag(Path.GetFileNameWithoutExtension(aspNetProject).Replace(".", "-").ToLowerInvariant())
|
||||
.SetProcessWorkingDirectory(aspNetProject.Directory)
|
||||
);
|
||||
});
|
||||
if (targets.Length > 0)
|
||||
{
|
||||
foreach (var target in targets)
|
||||
{
|
||||
DockerBuild(x => x
|
||||
.SetPath(".")
|
||||
.SetBuildArg($"configuration={BuildConfiguration}")
|
||||
.EnableRm()
|
||||
.SetProcessWorkingDirectory(project.Directory)
|
||||
.SetTag($"{Path.GetFileNameWithoutExtension(project).Replace(".", "-")}-{target}".ToLowerInvariant())
|
||||
.SetTarget(target)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DockerBuild(x => x
|
||||
.SetPath(".")
|
||||
.SetBuildArg($"configuration={BuildConfiguration}")
|
||||
.EnableRm()
|
||||
.SetProcessWorkingDirectory(project.Directory)
|
||||
.SetTag(Path.GetFileNameWithoutExtension(project).Replace(".", "-").ToLowerInvariant())
|
||||
);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
localTracerZip.DeleteFile();
|
||||
var localModulePath = localBinDirectory / moduleName;
|
||||
localModulePath.DeleteFile();
|
||||
}
|
||||
}
|
||||
|
||||
Target GenerateNetFxTransientDependencies => _ => _
|
||||
.Unlisted()
|
||||
|
@ -126,7 +207,11 @@ partial class Build
|
|||
.OnlyWhenStatic(() => IsWin)
|
||||
.Executes(() =>
|
||||
{
|
||||
var project = Solution.GetProject(Projects.AutoInstrumentation).GetMSBuildProject();
|
||||
// The target project needs to have its NuGet packages restored prior to running the tool.
|
||||
var targetProject = Solution.GetProjectByName(Projects.AutoInstrumentation);
|
||||
DotNetRestore(s => s.SetProjectFile(targetProject));
|
||||
|
||||
var project = targetProject.GetMSBuildProject();
|
||||
var packages = Solution.Directory / "src" / "Directory.Packages.props";
|
||||
|
||||
const string label = $"Transient dependencies auto-generated by {nameof(GenerateNetFxTransientDependencies)}";
|
||||
|
@ -136,7 +221,7 @@ partial class Build
|
|||
{
|
||||
packagesGroup = project.Xml.AddItemGroup();
|
||||
packagesGroup.Label = label;
|
||||
packagesGroup.Condition = " '$(TargetFramework)' == 'net462' ";
|
||||
packagesGroup.Condition = " '$(TargetFramework)' == 'net462' AND $(_IsPacking) != true ";
|
||||
}
|
||||
|
||||
var packagesProject = ProjectModelTasks.ParseProject(packages);
|
||||
|
@ -177,4 +262,61 @@ partial class Build
|
|||
|
||||
AssemblyRedirectionSourceGenerator.Generate(netFxAssembliesFolder, generatedSourceFile);
|
||||
});
|
||||
|
||||
Target InstallNetFxAssembliesGAC => _ => _
|
||||
.Unlisted()
|
||||
.After(BuildTracer)
|
||||
.After(RunManagedUnitTests)
|
||||
.OnlyWhenStatic(() => IsWin && (TestTargetFramework == TargetFramework.NET462 || TestTargetFramework == TargetFramework.NOT_SPECIFIED))
|
||||
.Executes(() => RunNetFxGacOperation("-i"));
|
||||
|
||||
/// <remarks>
|
||||
/// Warning: This target could cause potential harm to your system by removing a required library from GAC.
|
||||
/// </remarks>
|
||||
Target UninstallNetFxAssembliesGAC => _ => _
|
||||
.Description("Removes .NET Framework output libraries from the GAC.")
|
||||
.After(BuildTracer)
|
||||
.OnlyWhenStatic(() => IsWin)
|
||||
.Executes(() => RunNetFxGacOperation("-u"));
|
||||
|
||||
private void RunNetFxGacOperation(string operation)
|
||||
{
|
||||
// To update the GAC, we need to run the tool as Administrator.
|
||||
// Throw if not running as a Windows Administrator.
|
||||
if (!IsWindowsAdministrator())
|
||||
{
|
||||
throw new InvalidOperationException("This target must be run on Windows as Administrator.");
|
||||
}
|
||||
|
||||
var netFxAssembliesFolder = TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET462);
|
||||
var installTool = Solution.GetProjectByName(Projects.Tools.GacInstallTool);
|
||||
|
||||
DotNetRun(s => s
|
||||
.SetProjectFile(installTool)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetApplicationArguments(operation, netFxAssembliesFolder));
|
||||
|
||||
static bool IsWindowsAdministrator()
|
||||
{
|
||||
if (!IsWin)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#pragma warning disable CA1416 // Validate platform compatibility
|
||||
using var identity = System.Security.Principal.WindowsIdentity.GetCurrent();
|
||||
var principal = new System.Security.Principal.WindowsPrincipal(identity);
|
||||
|
||||
return principal.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator);
|
||||
#pragma warning restore CA1416 // Validate platform compatibility
|
||||
}
|
||||
}
|
||||
|
||||
private void PerformLegacyRestoreIfNeeded(Project project)
|
||||
{
|
||||
if (!NoRestore && project.Directory.ContainsFile("packages.config"))
|
||||
{
|
||||
RestoreLegacyNuGetPackagesConfig(new[] { project });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json.Nodes;
|
||||
using Extensions;
|
||||
using Nuke.Common;
|
||||
using Nuke.Common.IO;
|
||||
|
@ -10,8 +12,8 @@ using Nuke.Common.Tools.MSBuild;
|
|||
using Nuke.Common.Tools.Npm;
|
||||
using Nuke.Common.Tools.NuGet;
|
||||
using Nuke.Common.Utilities.Collections;
|
||||
using Serilog;
|
||||
using static Nuke.Common.EnvironmentInfo;
|
||||
using static Nuke.Common.IO.FileSystemTasks;
|
||||
using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
||||
|
||||
partial class Build
|
||||
|
@ -23,13 +25,12 @@ partial class Build
|
|||
AbsolutePath TestsDirectory => RootDirectory / "test";
|
||||
|
||||
AbsolutePath TracerHomeDirectory => TracerHome ?? (OutputDirectory / "tracer-home");
|
||||
AbsolutePath ArtifactsDirectory => Artifacts ?? (OutputDirectory / "artifacts");
|
||||
AbsolutePath BuildDataDirectory => RootDirectory / "build_data";
|
||||
AbsolutePath ProfilerTestLogs => BuildDataDirectory / "profiler-logs";
|
||||
AbsolutePath TestArtifactsDirectory => RootDirectory / "test-artifacts";
|
||||
AbsolutePath ProfilerTestLogs => TestArtifactsDirectory / "profiler-logs";
|
||||
AbsolutePath AdditionalDepsDirectory => TracerHomeDirectory / "AdditionalDeps";
|
||||
AbsolutePath StoreDirectory => TracerHomeDirectory / "store";
|
||||
|
||||
Project NativeProfilerProject => Solution.GetProject(Projects.AutoInstrumentationNative);
|
||||
Project NativeProfilerProject => Solution.GetProjectByName(Projects.AutoInstrumentationNative);
|
||||
|
||||
[LazyPathExecutable(name: "cmd")] readonly Lazy<Tool> Cmd;
|
||||
[LazyPathExecutable(name: "cmake")] readonly Lazy<Tool> CMake;
|
||||
|
@ -43,22 +44,20 @@ partial class Build
|
|||
private static readonly IEnumerable<TargetFramework> TargetFrameworks = new[]
|
||||
{
|
||||
TargetFramework.NET462,
|
||||
TargetFramework.NET6_0
|
||||
TargetFramework.NET8_0
|
||||
};
|
||||
|
||||
private static readonly IEnumerable<TargetFramework> TestFrameworks = TargetFrameworks
|
||||
.Concat(new[] {
|
||||
TargetFramework.NET7_0
|
||||
});
|
||||
.Concat(TargetFramework.NET9_0);
|
||||
|
||||
Target CreateRequiredDirectories => _ => _
|
||||
.Unlisted()
|
||||
.Executes(() =>
|
||||
{
|
||||
EnsureExistingDirectory(TracerHomeDirectory);
|
||||
EnsureExistingDirectory(ArtifactsDirectory);
|
||||
EnsureExistingDirectory(BuildDataDirectory);
|
||||
EnsureExistingDirectory(ProfilerTestLogs);
|
||||
TracerHomeDirectory.CreateDirectory();
|
||||
NuGetArtifactsDirectory.CreateDirectory();
|
||||
TestArtifactsDirectory.CreateDirectory();
|
||||
ProfilerTestLogs.CreateDirectory();
|
||||
});
|
||||
|
||||
Target Restore => _ => _
|
||||
|
@ -66,41 +65,43 @@ partial class Build
|
|||
.Unlisted()
|
||||
.Executes(() => ControlFlow.ExecuteWithRetry(() =>
|
||||
{
|
||||
var projectsToRestore = Solution.GetCrossPlatformManagedProjects();
|
||||
|
||||
if (IsWin)
|
||||
{
|
||||
DotNetRestore(s => s
|
||||
.SetProjectFile(Solution)
|
||||
.SetVerbosity(DotNetVerbosity.Normal)
|
||||
.SetProperty("configuration", BuildConfiguration.ToString())
|
||||
.When(!string.IsNullOrEmpty(NugetPackageDirectory), o =>
|
||||
o.SetPackageDirectory(NugetPackageDirectory)));
|
||||
projectsToRestore = projectsToRestore.Concat(Solution.GetNetFrameworkOnlyTestApplications());
|
||||
}
|
||||
|
||||
// Projects using `packages.config` can't be restored via "dotnet restore", use a NuGet Task to restore these projects.
|
||||
var legacyRestoreProjects = Solution.GetNativeProjects()
|
||||
.Concat(new[] { Solution.GetProject(Projects.Tests.Applications.AspNet) });
|
||||
foreach (var project in projectsToRestore)
|
||||
{
|
||||
DotNetRestoreSettings Restore(DotNetRestoreSettings s) =>
|
||||
s.SetProjectFile(project)
|
||||
.SetVerbosity(DotNetVerbosity.normal)
|
||||
.SetProperty("configuration", BuildConfiguration.ToString())
|
||||
.SetPlatform(Platform)
|
||||
.When(_ => !string.IsNullOrEmpty(NuGetPackagesDirectory), o => o.SetPackageDirectory(NuGetPackagesDirectory));
|
||||
|
||||
foreach (var project in legacyRestoreProjects)
|
||||
if (LibraryVersion.TryGetVersions(project.Name, Platform, out var libraryVersions))
|
||||
{
|
||||
// Restore legacy projects
|
||||
NuGetTasks.NuGetRestore(s => s
|
||||
.SetTargetPath(project)
|
||||
.SetSolutionDirectory(Solution.Directory)
|
||||
.SetVerbosity(NuGetVerbosity.Normal)
|
||||
.When(!string.IsNullOrEmpty(NugetPackageDirectory), o =>
|
||||
o.SetPackagesDirectory(NugetPackageDirectory)));
|
||||
DotNetRestore(s =>
|
||||
Restore(s)
|
||||
.CombineWithBuildInfos(libraryVersions));
|
||||
}
|
||||
else
|
||||
{
|
||||
DotNetRestore(Restore);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (IsWin)
|
||||
{
|
||||
foreach (var project in Solution.GetCrossPlatformManagedProjects())
|
||||
{
|
||||
DotNetRestore(s => s
|
||||
.SetProjectFile(project)
|
||||
.SetVerbosity(DotNetVerbosity.Normal)
|
||||
.SetProperty("configuration", BuildConfiguration.ToString())
|
||||
.When(!string.IsNullOrEmpty(NugetPackageDirectory), o =>
|
||||
o.SetPackageDirectory(NugetPackageDirectory)));
|
||||
}
|
||||
// Projects using `packages.config` can't be restored via "dotnet restore", use a NuGet Task to restore these projects.
|
||||
var legacyRestoreProjects = Solution.GetNativeProjects()
|
||||
.Concat(Solution.GetProjectByName(Projects.Tests.Applications.AspNet))
|
||||
.Concat(Solution.GetProjectByName(Projects.Tests.Applications.WcfIis))
|
||||
.Concat(Solution.GetProjectByName(Projects.Tests.Applications.OwinIis));
|
||||
|
||||
RestoreLegacyNuGetPackagesConfig(legacyRestoreProjects);
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -117,50 +118,123 @@ partial class Build
|
|||
DotNetBuild(x => x
|
||||
.SetProjectFile(project)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.EnableNoRestore());
|
||||
.SetNoRestore(NoRestore));
|
||||
}
|
||||
});
|
||||
|
||||
Target CompileManagedTests => _ => _
|
||||
.Description("Compiles the managed code in the test directory")
|
||||
.After(CompileManagedSrc)
|
||||
.After(CompileNativeDependenciesForManagedTests)
|
||||
.Executes(() =>
|
||||
{
|
||||
var testApps = Solution.GetCrossPlatformTestApplications();
|
||||
if (IsWin)
|
||||
{
|
||||
testApps = testApps.Concat(Solution.GetWindowsOnlyTestApplications());
|
||||
if (TestTargetFramework == TargetFramework.NET462 ||
|
||||
TestTargetFramework == TargetFramework.NOT_SPECIFIED)
|
||||
{
|
||||
testApps = Solution.GetNetFrameworkOnlyTestApplications().Concat(testApps);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Special case: some WCF .NET tests need a WCF server app that only builds for .NET Framework 4.6.2
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(Solution.GetProjectByName(Projects.Tests.Applications.WcfServer))
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetPlatform(Platform)
|
||||
.SetNoRestore(NoRestore)
|
||||
.SetFramework(TargetFramework.NET462));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var app in testApps)
|
||||
{
|
||||
DotNetBuild(x => x
|
||||
.SetProjectFile(app)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetPlatform(Platform)
|
||||
.SetNoRestore(true));
|
||||
|
||||
// Special case: a test application using old packages.config needs special treatment.
|
||||
var legacyPackagesConfig = app.Directory.ContainsFile("packages.config");
|
||||
if (legacyPackagesConfig)
|
||||
{
|
||||
PerformLegacyRestoreIfNeeded(app);
|
||||
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(app)
|
||||
.SetNoRestore(true) // project w/ packages.config can't do the restore via dotnet CLI
|
||||
.SetPlatform(Platform)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED,
|
||||
x => x.SetFramework(TestTargetFramework)));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
string actualTestTfm = TestTargetFramework;
|
||||
if (TestTargetFramework != TargetFramework.NOT_SPECIFIED &&
|
||||
!app.GetTargetFrameworks().Contains(actualTestTfm))
|
||||
{
|
||||
// Before skipping this app check if not a special case for .NET Framework
|
||||
actualTestTfm = null;
|
||||
if (TestTargetFramework == TargetFramework.NET462)
|
||||
{
|
||||
actualTestTfm = app.GetTargetFrameworks().FirstOrDefault(tfm => tfm.StartsWith("net4"));
|
||||
}
|
||||
|
||||
if (actualTestTfm is null)
|
||||
{
|
||||
// App doesn't support the select TFM, skip it.
|
||||
Log.Information("Skipping {0}: no suitable TFM for {1}", app.Name, TestTargetFramework);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
DotNetBuildSettings BuildTestApplication(DotNetBuildSettings x, string targetFramework) =>
|
||||
x.SetProjectFile(app)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetPlatform(Platform)
|
||||
.SetNoRestore(NoRestore)
|
||||
.When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED,
|
||||
s => s.SetFramework(targetFramework));
|
||||
|
||||
if (LibraryVersion.Versions.TryGetValue(app.Name, out var libraryVersions))
|
||||
{
|
||||
foreach (var packageBuildInfo in libraryVersions)
|
||||
{
|
||||
var targetFramework = packageBuildInfo.SupportedFrameworks.Length == 0 || packageBuildInfo.SupportedFrameworks.Contains(actualTestTfm) ? actualTestTfm : TestTargetFramework;
|
||||
DotNetBuild(x =>
|
||||
BuildTestApplication(x, targetFramework)
|
||||
.CombineWithBuildInfos([packageBuildInfo], TestTargetFramework));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DotNetBuild(x => BuildTestApplication(x, actualTestTfm));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var project in Solution.GetManagedTestProjects())
|
||||
{
|
||||
if (TestTargetFramework != TargetFramework.NOT_SPECIFIED &&
|
||||
!project.GetTargetFrameworks().Contains(TestTargetFramework))
|
||||
{
|
||||
// Skip this test project if it doesn't support the selected test TFM.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Always AnyCPU
|
||||
DotNetBuild(x => x
|
||||
.SetProjectFile(project)
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetNoRestore(true));
|
||||
.SetNoRestore(NoRestore)
|
||||
.When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED,
|
||||
s => s.SetFramework(TestTargetFramework)));
|
||||
}
|
||||
});
|
||||
|
||||
Target CompileBenchmarks => _ => _
|
||||
.Description("Compiles the Benchmarks project in the test directory")
|
||||
.After(CompileManagedSrc)
|
||||
.Executes(() =>
|
||||
{
|
||||
DotNetBuild(x => x
|
||||
.SetProjectFile(Solution.GetBenchmarks())
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.EnableNoRestore());
|
||||
});
|
||||
Target CompileNativeDependenciesForManagedTests => _ => _
|
||||
.Description("Compiles the native dependencies for testing applications")
|
||||
.DependsOn(CompileNativeDependenciesForManagedTestsWindows)
|
||||
.DependsOn(CompileNativeDependenciesForManagedTestsLinux)
|
||||
.DependsOn(CompileNativeDependenciesForManagedTestsMacOs);
|
||||
|
||||
Target CompileNativeSrc => _ => _
|
||||
.Description("Compiles the native loader")
|
||||
|
@ -177,7 +251,7 @@ partial class Build
|
|||
.Description("Compiles all the example projects")
|
||||
.Executes(() =>
|
||||
{
|
||||
foreach (var exampleProject in Solution.GetProjects("Examples.*"))
|
||||
foreach (var exampleProject in Solution.GetAllProjects("Examples.*"))
|
||||
{
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(exampleProject)
|
||||
|
@ -196,11 +270,11 @@ partial class Build
|
|||
: TargetFrameworks.Where(framework => !framework.ToString().StartsWith("net4"));
|
||||
|
||||
DotNetPublish(s => s
|
||||
.SetProject(Solution.GetProject(Projects.AutoInstrumentation))
|
||||
.SetProject(Solution.GetProjectByName(Projects.AutoInstrumentation))
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.EnableNoBuild()
|
||||
.EnableNoRestore()
|
||||
.SetNoRestore(NoRestore)
|
||||
.CombineWith(targetFrameworks, (p, framework) => p
|
||||
.SetFramework(framework)
|
||||
.SetOutput(TracerHomeDirectory / MapToFolderOutput(framework))));
|
||||
|
@ -209,68 +283,105 @@ partial class Build
|
|||
// We need to emit AutoInstrumentationStartupHook for .Net Core 3.1 target framework
|
||||
// to avoid application crash with .Net Core 3.1 and .NET 5.0 apps.
|
||||
DotNetPublish(s => s
|
||||
.SetProject(Solution.GetProject(Projects.AutoInstrumentationStartupHook))
|
||||
.SetProject(Solution.GetProjectByName(Projects.AutoInstrumentationStartupHook))
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.EnableNoBuild()
|
||||
.EnableNoRestore()
|
||||
.SetNoRestore(NoRestore)
|
||||
.SetFramework(TargetFramework.NETCore3_1)
|
||||
.SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NETCore3_1)));
|
||||
|
||||
// AutoInstrumentationLoader publish is needed only for .NET 6.0 to support load from AutoInstrumentationStartupHook.
|
||||
// AutoInstrumentationLoader publish is needed only for .NET 8.0 to support load from AutoInstrumentationStartupHook.
|
||||
DotNetPublish(s => s
|
||||
.SetProject(Solution.GetProject(Projects.AutoInstrumentationLoader))
|
||||
.SetProject(Solution.GetProjectByName(Projects.AutoInstrumentationLoader))
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.EnableNoBuild()
|
||||
.EnableNoRestore()
|
||||
.SetFramework(TargetFramework.NET6_0)
|
||||
.SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET6_0)));
|
||||
.SetNoRestore(NoRestore)
|
||||
.SetFramework(TargetFramework.NET8_0)
|
||||
.SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET8_0)));
|
||||
|
||||
DotNetPublish(s => s
|
||||
.SetProject(Solution.GetProject(Projects.AutoInstrumentationAspNetCoreBootstrapper))
|
||||
.SetProject(Solution.GetProjectByName(Projects.AutoInstrumentationAspNetCoreBootstrapper))
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.EnableNoBuild()
|
||||
.EnableNoRestore()
|
||||
.SetFramework(TargetFramework.NET6_0)
|
||||
.SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET6_0)));
|
||||
.SetNoRestore(NoRestore)
|
||||
.SetFramework(TargetFramework.NET8_0)
|
||||
.SetOutput(TracerHomeDirectory / MapToFolderOutput(TargetFramework.NET8_0)));
|
||||
|
||||
// Remove non-library files
|
||||
TracerHomeDirectory.GlobFiles("**/*.xml").ForEach(DeleteFile);
|
||||
(TracerHomeDirectory / "net").GlobFiles("*.json").ForEach(DeleteFile);
|
||||
if (IsWin)
|
||||
{
|
||||
(TracerHomeDirectory / "netfx").GlobFiles("*.json").ForEach(DeleteFile);
|
||||
}
|
||||
RemoveFilesInNetFolderAvailableInAdditionalStore();
|
||||
|
||||
RemoveNonLibraryFilesFromOutput();
|
||||
});
|
||||
|
||||
void RemoveNonLibraryFilesFromOutput()
|
||||
{
|
||||
TracerHomeDirectory.GlobFiles("**/*.xml").ForEach(file => file.DeleteFile());
|
||||
(TracerHomeDirectory / "net").GlobFiles("*.json").ForEach(file => file.DeleteFile());
|
||||
if (IsWin)
|
||||
{
|
||||
(TracerHomeDirectory / "netfx").GlobFiles("*.json").ForEach(file => file.DeleteFile());
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveFilesInNetFolderAvailableInAdditionalStore()
|
||||
{
|
||||
Log.Debug("Removing files available in additional store from net folder");
|
||||
var netFolder = TracerHomeDirectory / "net";
|
||||
var additionalStoreFolder = TracerHomeDirectory / "store";
|
||||
|
||||
var netLibraries = netFolder.GlobFiles("**/*.dll");
|
||||
var netLibrariesByName = netLibraries.ToDictionary(x => x.Name);
|
||||
var additionalStoreLibraries = additionalStoreFolder.GlobFiles("**/*.dll");
|
||||
|
||||
foreach (var additionalStoreLibrary in additionalStoreLibraries)
|
||||
{
|
||||
if (netLibrariesByName.TryGetValue(additionalStoreLibrary.Name, out var netLibrary))
|
||||
{
|
||||
var netLibraryFileVersionInfo = FileVersionInfo.GetVersionInfo(netLibrary);
|
||||
var additionalStoreLibraryFileVersionInfo = FileVersionInfo.GetVersionInfo(additionalStoreLibrary);
|
||||
|
||||
if (netLibraryFileVersionInfo.FileVersion == additionalStoreLibraryFileVersionInfo.FileVersion)
|
||||
{
|
||||
Log.Debug("Delete file available in additional store from net folder " + additionalStoreLibrary.Name + " version: " + netLibraryFileVersionInfo.FileVersion);
|
||||
netLibrary.DeleteFile();
|
||||
netLibrariesByName.Remove(additionalStoreLibrary.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Warning("Cannot remove file available in additional store from net folder " + additionalStoreLibrary.Name + " net folder version: " + netLibraryFileVersionInfo.FileVersion + " additional store version: " + additionalStoreLibraryFileVersionInfo.FileVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Target PublishNativeProfiler => _ => _
|
||||
.Unlisted()
|
||||
.DependsOn(PublishNativeProfilerWindows)
|
||||
.DependsOn(PublishNativeProfilerLinux)
|
||||
.DependsOn(PublishNativeProfilerMacOs);
|
||||
|
||||
Target GenerateIntegrationsJson => _ => _
|
||||
Target VerifySdkVersions => _ => _
|
||||
.Executes(() =>
|
||||
{
|
||||
var verifier = Solution.GetProjectByName(Projects.Tools.SdkVersionAnalyzerTool);
|
||||
|
||||
DotNetRun(s => s
|
||||
.SetProjectFile(verifier)
|
||||
.SetApplicationArguments("--verify", RootDirectory));
|
||||
});
|
||||
|
||||
Target GenerateLibraryVersionFiles => _ => _
|
||||
.After(PublishManagedProfiler)
|
||||
.Executes(() =>
|
||||
{
|
||||
var generatorTool = Solution.GetProject(Projects.Tools.IntegrationsJsonGenerator);
|
||||
var generatorTool = Solution.GetProjectByName(Projects.Tools.LibraryVersionsGenerator);
|
||||
|
||||
DotNetRun(s => s
|
||||
.SetProjectFile(generatorTool));
|
||||
});
|
||||
|
||||
Target CopyIntegrationsJson => _ => _
|
||||
.Unlisted()
|
||||
.After(GenerateIntegrationsJson)
|
||||
.Executes(() =>
|
||||
{
|
||||
var source = RootDirectory / "integrations.json";
|
||||
var dest = TracerHomeDirectory;
|
||||
CopyFileToDirectory(source, dest, FileExistsPolicy.Overwrite);
|
||||
});
|
||||
|
||||
Target CopyInstrumentScripts => _ => _
|
||||
.Unlisted()
|
||||
.After(Clean)
|
||||
|
@ -279,7 +390,7 @@ partial class Build
|
|||
{
|
||||
var source = RootDirectory / "instrument.sh";
|
||||
var dest = TracerHomeDirectory;
|
||||
CopyFileToDirectory(source, dest, FileExistsPolicy.Overwrite);
|
||||
source.CopyToDirectory(dest, ExistsPolicy.FileOverwrite);
|
||||
});
|
||||
|
||||
Target CopyLegalFiles => _ => _
|
||||
|
@ -290,7 +401,7 @@ partial class Build
|
|||
{
|
||||
var source = RootDirectory / "LICENSE";
|
||||
var dest = TracerHomeDirectory;
|
||||
CopyFileToDirectory(source, dest, FileExistsPolicy.Overwrite);
|
||||
source.CopyToDirectory(dest, ExistsPolicy.FileOverwrite);
|
||||
});
|
||||
|
||||
Target RunNativeTests => _ => _
|
||||
|
@ -300,7 +411,7 @@ partial class Build
|
|||
|
||||
Target RunManagedTests => _ => _
|
||||
.Unlisted()
|
||||
.Produces(BuildDataDirectory / "profiler-logs" / "*")
|
||||
.Produces(TestArtifactsDirectory / "profiler-logs" / "*")
|
||||
.After(BuildTracer)
|
||||
.After(CompileManagedTests)
|
||||
.After(PublishMocks)
|
||||
|
@ -318,13 +429,23 @@ partial class Build
|
|||
var targetFrameworks = IsWin
|
||||
? TargetFrameworks
|
||||
: TargetFrameworks.ExceptNetFramework();
|
||||
if (TestTargetFramework != TargetFramework.NOT_SPECIFIED)
|
||||
{
|
||||
if (!targetFrameworks.Contains(TestTargetFramework))
|
||||
{
|
||||
// This test doesn't run for the selected test TFM, nothing to do.
|
||||
return;
|
||||
}
|
||||
|
||||
targetFrameworks = new[] { TestTargetFramework };
|
||||
}
|
||||
|
||||
DotNetPublish(s => s
|
||||
.SetProject(Solution.GetTestMock())
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.EnableNoBuild()
|
||||
.EnableNoRestore()
|
||||
.SetNoRestore(NoRestore)
|
||||
.CombineWith(targetFrameworks, (p, framework) => p
|
||||
.SetFramework(framework)
|
||||
.SetOutput(TestsDirectory / Projects.Tests.AutoInstrumentationLoaderTests / "bin" / BuildConfiguration / "Profiler" / framework)));
|
||||
|
@ -335,9 +456,11 @@ partial class Build
|
|||
.Executes(() =>
|
||||
{
|
||||
DotNetBuild(x => x
|
||||
.SetProjectFile(Solution.GetProject(Projects.Mocks.AutoInstrumentationMock))
|
||||
.SetProjectFile(Solution.GetProjectByName(Projects.Mocks.AutoInstrumentationMock))
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetNoRestore(true)
|
||||
.SetNoRestore(NoRestore)
|
||||
.When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED,
|
||||
s => s.SetFramework(TestTargetFramework))
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -349,8 +472,10 @@ partial class Build
|
|||
|
||||
var unitTestProjects = new[]
|
||||
{
|
||||
Solution.GetProject(Projects.Tests.AutoInstrumentationLoaderTests),
|
||||
Solution.GetProject(Projects.Tests.AutoInstrumentationTests)
|
||||
Solution.GetProjectByName(Projects.Tests.AutoInstrumentationBuildTasksTests),
|
||||
Solution.GetProjectByName(Projects.Tests.AutoInstrumentationLoaderTests),
|
||||
Solution.GetProjectByName(Projects.Tests.AutoInstrumentationStartupHookTests),
|
||||
Solution.GetProjectByName(Projects.Tests.AutoInstrumentationTests)
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(TestProject))
|
||||
|
@ -364,14 +489,26 @@ partial class Build
|
|||
}
|
||||
}
|
||||
|
||||
if (TestTargetFramework != TargetFramework.NOT_SPECIFIED)
|
||||
{
|
||||
unitTestProjects = unitTestProjects
|
||||
.Where(p =>
|
||||
p.GetTargetFrameworks().Contains(TestTargetFramework) &&
|
||||
(p.Name != Projects.Tests.AutoInstrumentationLoaderTests || TargetFrameworks.Contains(TestTargetFramework)))
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
for (int i = 0; i < TestCount; i++)
|
||||
{
|
||||
DotNetTest(config => config
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.SetFilter(TestNameFilter())
|
||||
.EnableNoRestore()
|
||||
.SetNoRestore(NoRestore)
|
||||
.SetProcessEnvironmentVariable("OTEL_DOTNET_AUTO_LOG_DIRECTORY", ProfilerTestLogs)
|
||||
.EnableNoBuild()
|
||||
.When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED,
|
||||
x => x.SetFramework(TestTargetFramework))
|
||||
.CombineWith(unitTestProjects, (s, project) => s
|
||||
.EnableTrxLogOutput(GetResultsDirectory(project))
|
||||
.SetProjectFile(project)), degreeOfParallelism: 4);
|
||||
|
@ -380,6 +517,7 @@ partial class Build
|
|||
|
||||
Target RunManagedIntegrationTests => _ => _
|
||||
.Unlisted()
|
||||
.After(InstallNetFxAssembliesGAC)
|
||||
.After(RunManagedUnitTests)
|
||||
.Executes(() =>
|
||||
{
|
||||
|
@ -389,165 +527,124 @@ partial class Build
|
|||
return;
|
||||
}
|
||||
|
||||
var frameworks = IsWin ? TestFrameworks : TestFrameworks.ExceptNetFramework();
|
||||
|
||||
for (int i = 0; i < TestCount; i++)
|
||||
{
|
||||
DotNetMSBuild(config => config
|
||||
DotNetTest(config => config
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetFilter(AndFilter(TestNameFilter(), ContainersFilter()))
|
||||
.SetBlameHangTimeout("5m")
|
||||
.EnableTrxLogOutput(GetResultsDirectory(project))
|
||||
.SetTargetPath(project)
|
||||
.DisableRestore()
|
||||
.RunTests()
|
||||
.SetProjectFile(project)
|
||||
.SetNoRestore(NoRestore)
|
||||
.When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED,
|
||||
s => s.SetFramework(TestTargetFramework))
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Target CopyAdditionalDeps => _ =>
|
||||
{
|
||||
return _
|
||||
.Unlisted()
|
||||
.Description("Creates AutoInstrumentation.AdditionalDeps and shared store in tracer-home")
|
||||
.After(CompileManagedSrc)
|
||||
.Executes(() =>
|
||||
{
|
||||
if (AdditionalDepsDirectory.DirectoryExists())
|
||||
{
|
||||
Directory.Delete(AdditionalDepsDirectory, true);
|
||||
}
|
||||
|
||||
if (StoreDirectory.DirectoryExists())
|
||||
{
|
||||
Directory.Delete(StoreDirectory, true);
|
||||
}
|
||||
|
||||
DotNetPublish(s => s
|
||||
.SetProject(Solution.GetProject(Projects.AutoInstrumentationAdditionalDeps))
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.SetProperty("TracerHomePath", TracerHomeDirectory)
|
||||
.EnableNoBuild()
|
||||
.EnableNoRestore()
|
||||
.CombineWith(TestFrameworks.ExceptNetFramework(), (p, framework) => p
|
||||
.SetFramework(framework)
|
||||
// Additional-deps probes the directory using SemVer format.
|
||||
// Example: For netcoreapp3.1 framework, additional-deps uses 3.1.0 or 3.1.1 and so on.
|
||||
// Major and Minor version are extracted from framework and default value of 0 is appended for patch.
|
||||
.SetOutput(AdditionalDepsDirectory / "shared" / "Microsoft.NETCore.App" / framework.ToString().Substring(framework.ToString().Length - 3) + ".0")));
|
||||
|
||||
AdditionalDepsDirectory.GlobFiles("**/*deps.json")
|
||||
.ForEach(file =>
|
||||
{
|
||||
var depsJsonContent = File.ReadAllText(file);
|
||||
using var jsonDocument = JsonDocument.Parse(depsJsonContent);
|
||||
|
||||
var folderRuntimeName = GetFolderRuntimeName(jsonDocument);
|
||||
|
||||
var architectureStores = new List<string>
|
||||
{
|
||||
Path.Combine(StoreDirectory, "x64", folderRuntimeName),
|
||||
Path.Combine(StoreDirectory, "x86", folderRuntimeName),
|
||||
}.AsReadOnly();
|
||||
|
||||
CopyNativeDependenciesToStore(file, jsonDocument, architectureStores);
|
||||
|
||||
RemoveDuplicatedLibraries(depsJsonContent, architectureStores);
|
||||
|
||||
RemoveOpenTelemetryAutoInstrumentationAdditionalDepsFromDepsFile(depsJsonContent, file);
|
||||
});
|
||||
RemoveFilesFromAdditionalDepsDirectory();
|
||||
|
||||
|
||||
void CopyNativeDependenciesToStore(AbsolutePath file, JsonDocument jsonDocument, IReadOnlyList<string> architectureStores)
|
||||
{
|
||||
var depsDirectory = file.Parent;
|
||||
|
||||
foreach (var targetProperty in jsonDocument.RootElement.GetProperty("targets").EnumerateObject())
|
||||
{
|
||||
var target = targetProperty.Value;
|
||||
|
||||
foreach (var packages in target.EnumerateObject())
|
||||
{
|
||||
if (!packages.Value.TryGetProperty("runtimeTargets", out var runtimeTargets))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (var runtimeDependency in runtimeTargets.EnumerateObject())
|
||||
{
|
||||
var sourceFileName = Path.Combine(depsDirectory, runtimeDependency.Name);
|
||||
|
||||
foreach (var architectureStore in architectureStores)
|
||||
{
|
||||
var targetFileName = Path.Combine(architectureStore, packages.Name.ToLowerInvariant(), runtimeDependency.Name);
|
||||
var targetDirectory = Path.GetDirectoryName(targetFileName);
|
||||
Directory.CreateDirectory(targetDirectory);
|
||||
File.Copy(sourceFileName, targetFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveDuplicatedLibraries(string depsJsonContent, IReadOnlyList<string> architectureStores)
|
||||
{
|
||||
var duplicatedLibraries = new List<(string Name, string Version)> { };
|
||||
|
||||
foreach (var duplicatedLibrary in duplicatedLibraries)
|
||||
{
|
||||
if (depsJsonContent.Contains(duplicatedLibrary.Name.ToLower() + "/" + duplicatedLibrary.Version))
|
||||
{
|
||||
throw new NotSupportedException($"Cannot remove {duplicatedLibrary.Name.ToLower()}/{duplicatedLibrary.Version} folder. It is referenced in json file");
|
||||
}
|
||||
|
||||
foreach (var architectureStore in architectureStores)
|
||||
{
|
||||
var directoryToBeRemoved = Path.Combine(architectureStore, duplicatedLibrary.Name.ToLower(), duplicatedLibrary.Version);
|
||||
|
||||
if (!Directory.Exists(directoryToBeRemoved))
|
||||
{
|
||||
throw new NotSupportedException($"Directory {directoryToBeRemoved} does not exists. Verify it.");
|
||||
}
|
||||
|
||||
Directory.Delete(directoryToBeRemoved, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveOpenTelemetryAutoInstrumentationAdditionalDepsFromDepsFile(string depsJsonContent, AbsolutePath file)
|
||||
{
|
||||
// Remove OpenTelemetry.Instrumentation.AutoInstrumentationAdditionalDeps entry from target section.
|
||||
depsJsonContent = Regex.Replace(depsJsonContent,
|
||||
"\"OpenTelemetry(.+)AutoInstrumentation.AdditionalDeps.dll(.+?)}," + Environment.NewLine + "(.+?)\"", "\"",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Singleline);
|
||||
// Remove OpenTelemetry.Instrumentation.AutoInstrumentationAdditionalDeps entry from library section and write to file.
|
||||
depsJsonContent = Regex.Replace(depsJsonContent, "\"OpenTelemetry(.+?)}," + Environment.NewLine + "(.+?)\"", "\"",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Singleline);
|
||||
File.WriteAllText(file, depsJsonContent);
|
||||
}
|
||||
|
||||
void RemoveFilesFromAdditionalDepsDirectory()
|
||||
{
|
||||
AdditionalDepsDirectory.GlobFiles("**/*.dll", "**/*.pdb", "**/*.xml", "**/*.dylib", "**/*.so").ForEach(DeleteFile);
|
||||
AdditionalDepsDirectory.GlobDirectories("**/runtimes").ForEach(DeleteDirectory);
|
||||
}
|
||||
});
|
||||
|
||||
string GetFolderRuntimeName(JsonDocument jsonDocument)
|
||||
Target CopyAdditionalDeps => _ => _
|
||||
.Unlisted()
|
||||
.Description("Creates AutoInstrumentation.AdditionalDeps and shared store in tracer-home")
|
||||
.After(CompileManagedSrc)
|
||||
.Executes(() =>
|
||||
{
|
||||
var runtimeName = jsonDocument.RootElement.GetProperty("runtimeTarget").GetProperty("name").GetString();
|
||||
var folderRuntimeName = runtimeName switch
|
||||
if (AdditionalDepsDirectory.DirectoryExists())
|
||||
{
|
||||
".NETCoreApp,Version=v6.0" => "net6.0",
|
||||
".NETCoreApp,Version=v7.0" => "net7.0",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(runtimeName), runtimeName,
|
||||
"This value is not supported. You have probably introduced new .NET version to AutoInstrumentation")
|
||||
};
|
||||
return folderRuntimeName;
|
||||
}
|
||||
};
|
||||
Directory.Delete(AdditionalDepsDirectory, true);
|
||||
}
|
||||
|
||||
if (StoreDirectory.DirectoryExists())
|
||||
{
|
||||
Directory.Delete(StoreDirectory, true);
|
||||
}
|
||||
|
||||
DotNetPublish(s => s
|
||||
.SetProject(Solution.GetProjectByName(Projects.AutoInstrumentationAdditionalDeps))
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.SetProperty("NukePlatform", Platform)
|
||||
.SetProperty("TracerHomePath", TracerHomeDirectory)
|
||||
.EnableNoBuild()
|
||||
.SetNoRestore(NoRestore)
|
||||
.CombineWith(TestFrameworks.ExceptNetFramework(), (p, framework) => p
|
||||
.SetFramework(framework)
|
||||
// Additional-deps probes the directory using SemVer format.
|
||||
// Example: For netcoreapp3.1 framework, additional-deps uses 3.1.0 or 3.1.1 and so on.
|
||||
// Major and Minor version are extracted from framework and default value of 0 is appended for patch.
|
||||
.SetOutput(AdditionalDepsDirectory / "shared" / "Microsoft.NETCore.App" / framework.ToString().Substring(framework.ToString().Length - 3) + ".0")));
|
||||
|
||||
AdditionalDepsDirectory.GlobFiles("**/*deps.json")
|
||||
.ForEach(file =>
|
||||
{
|
||||
var rawJson = File.ReadAllText(file);
|
||||
var depsJson = JsonNode.Parse(rawJson).AsObject();
|
||||
|
||||
var folderRuntimeName = depsJson.GetFolderRuntimeName();
|
||||
var architectureStores = new List<AbsolutePath>()
|
||||
.AddIf(StoreDirectory / "x64" / folderRuntimeName, RuntimeInformation.OSArchitecture == Architecture.X64)
|
||||
.AddIf(StoreDirectory / "x86" / folderRuntimeName, IsWin) // Only Windows supports x86 runtime
|
||||
.AddIf(StoreDirectory / "arm64" / folderRuntimeName, IsArm64)
|
||||
.AsReadOnly();
|
||||
|
||||
depsJson.CopyNativeDependenciesToStore(file, architectureStores);
|
||||
depsJson.RemoveDuplicatedLibraries(architectureStores);
|
||||
depsJson.RemoveOpenTelemetryLibraries();
|
||||
|
||||
// To allow roll forward for applications, like Roslyn, that target one tfm
|
||||
// but have a later runtime move the libraries under the original tfm folder
|
||||
// to the latest one.
|
||||
if (folderRuntimeName == TargetFramework.NET8_0 || folderRuntimeName == TargetFramework.NET9_0)
|
||||
{
|
||||
depsJson.RollFrameworkForward(TargetFramework.NET8_0, TargetFramework.NET9_0, architectureStores);
|
||||
}
|
||||
|
||||
// Write the updated deps.json file.
|
||||
File.WriteAllText(file, depsJson.ToJsonString(new()
|
||||
{
|
||||
WriteIndented = true
|
||||
}));
|
||||
});
|
||||
|
||||
// Cleanup Additional Deps Directory
|
||||
AdditionalDepsDirectory.GlobFiles("**/*.dll", "**/*.pdb", "**/*.xml", "**/*.dylib", "**/*.so").ForEach(file => file.DeleteFile());
|
||||
AdditionalDepsDirectory.GlobDirectories("**/runtimes").ForEach(directory => directory.DeleteDirectory());
|
||||
});
|
||||
|
||||
Target PublishRuleEngineJson => _ => _
|
||||
.After(PublishManagedProfiler)
|
||||
.Description("Publishes a file with assembly name and version for rule engine validation.")
|
||||
.Executes(() =>
|
||||
{
|
||||
var netPath = TracerHomeDirectory / "net";
|
||||
var files = Directory.GetFiles(netPath);
|
||||
var fileInfoList = new List<object>(files.Length);
|
||||
|
||||
foreach (string file in files)
|
||||
{
|
||||
var fileName = Path.GetFileNameWithoutExtension(file);
|
||||
|
||||
if (fileName == "System.Diagnostics.DiagnosticSource" ||
|
||||
(fileName.StartsWith("OpenTelemetry.") && !fileName.StartsWith("OpenTelemetry.Api") && !fileName.StartsWith("OpenTelemetry.AutoInstrumentation")))
|
||||
{
|
||||
var fileVersion = FileVersionInfo.GetVersionInfo(file).FileVersion;
|
||||
fileInfoList.Add(new
|
||||
{
|
||||
FileName = fileName,
|
||||
FileVersion = fileVersion
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
JsonSerializerOptions options = new JsonSerializerOptions { WriteIndented = true };
|
||||
string jsonContent = JsonSerializer.Serialize(fileInfoList, options);
|
||||
|
||||
var ruleEngineJsonFilePath = netPath / "ruleEngine.json";
|
||||
File.WriteAllText(ruleEngineJsonFilePath, jsonContent);
|
||||
|
||||
var ruleEngineJsonNugetFilePath = RootDirectory / "nuget" / "OpenTelemetry.AutoInstrumentation" / "contentFiles" / "any" / "any" / "RuleEngine.json";
|
||||
File.Delete(ruleEngineJsonNugetFilePath);
|
||||
File.Copy(ruleEngineJsonFilePath, ruleEngineJsonNugetFilePath);
|
||||
});
|
||||
|
||||
Target InstallDocumentationTools => _ => _
|
||||
.Description("Installs markdownlint-cli and cspell locally. npm is required")
|
||||
|
@ -585,7 +682,7 @@ partial class Build
|
|||
.DependsOn(MarkdownLint)
|
||||
.DependsOn(SpellcheckDocumentation);
|
||||
|
||||
private AbsolutePath GetResultsDirectory(Project proj) => BuildDataDirectory / "results" / proj.Name;
|
||||
private AbsolutePath GetResultsDirectory(Project proj) => TestArtifactsDirectory / "results" / proj.Name;
|
||||
|
||||
/// <summary>
|
||||
/// Bootstrapping tests require every single test to be run in a separate process
|
||||
|
@ -593,7 +690,7 @@ partial class Build
|
|||
/// </summary>
|
||||
private void RunBootstrappingTests()
|
||||
{
|
||||
var project = Solution.GetProject(Projects.Tests.AutoInstrumentationBootstrappingTests);
|
||||
var project = Solution.GetProjectByName(Projects.Tests.AutoInstrumentationBootstrappingTests);
|
||||
if (!string.IsNullOrWhiteSpace(TestProject) && !project.Name.Contains(TestProject, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// Test project was not selected.
|
||||
|
@ -615,11 +712,13 @@ partial class Build
|
|||
DotNetTest(config => config
|
||||
.SetConfiguration(BuildConfiguration)
|
||||
.SetTargetPlatformAnyCPU()
|
||||
.EnableNoRestore()
|
||||
.SetNoRestore(NoRestore)
|
||||
.EnableNoBuild()
|
||||
.EnableTrxLogOutput(GetResultsDirectory(project))
|
||||
.SetProjectFile(project)
|
||||
.SetFilter(AndFilter(TestNameFilter(), testName))
|
||||
.When(_ => TestTargetFramework != TargetFramework.NOT_SPECIFIED, s => s.SetFramework(TestTargetFramework))
|
||||
.SetProcessEnvironmentVariable("OTEL_DOTNET_AUTO_LOG_DIRECTORY", ProfilerTestLogs)
|
||||
.SetProcessEnvironmentVariable("BOOSTRAPPING_TESTS", "true"));
|
||||
}
|
||||
}
|
||||
|
@ -629,4 +728,18 @@ partial class Build
|
|||
{
|
||||
return targetFramework.ToString().StartsWith("net4") ? "netfx" : "net";
|
||||
}
|
||||
|
||||
private void RestoreLegacyNuGetPackagesConfig(IEnumerable<Project> legacyRestoreProjects)
|
||||
{
|
||||
foreach (var project in legacyRestoreProjects)
|
||||
{
|
||||
// Restore legacy projects
|
||||
NuGetTasks.NuGetRestore(s => s
|
||||
.SetTargetPath(project)
|
||||
.SetSolutionDirectory(Solution.Directory)
|
||||
.SetVerbosity(NuGetVerbosity.Normal)
|
||||
.When(_ => !string.IsNullOrEmpty(NuGetPackagesDirectory), o =>
|
||||
o.SetPackagesDirectory(NuGetPackagesDirectory)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using Nuke.Common.Tools.MSBuild;
|
||||
|
||||
partial class Build
|
||||
{
|
||||
private static string AndFilter(params string[] args)
|
||||
{
|
||||
return string.Join("&", args.Where(s => !string.IsNullOrEmpty(s)));
|
||||
}
|
||||
|
||||
private static MSBuildTargetPlatform GetDefaultTargetPlatform()
|
||||
{
|
||||
if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
|
||||
{
|
||||
return Arm64TargetPlatform;
|
||||
}
|
||||
|
||||
if (RuntimeInformation.OSArchitecture == Architecture.X86)
|
||||
{
|
||||
return MSBuildTargetPlatform.x86;
|
||||
}
|
||||
|
||||
return MSBuildTargetPlatform.x64;
|
||||
}
|
||||
|
||||
private static MSBuildTargetPlatform Arm64TargetPlatform = (MSBuildTargetPlatform)"ARM64";
|
||||
}
|
110
build/Build.cs
110
build/Build.cs
|
@ -3,7 +3,6 @@ using Nuke.Common.IO;
|
|||
using Nuke.Common.Tools.MSBuild;
|
||||
using Nuke.Common.Utilities.Collections;
|
||||
using static Nuke.Common.EnvironmentInfo;
|
||||
using static Nuke.Common.IO.FileSystemTasks;
|
||||
|
||||
partial class Build : NukeBuild
|
||||
{
|
||||
|
@ -12,15 +11,20 @@ partial class Build : NukeBuild
|
|||
[Parameter("Configuration to build. Default is 'Release'")]
|
||||
readonly Configuration BuildConfiguration = Configuration.Release;
|
||||
|
||||
[Parameter("Platform to build - x86 or x64. Default is 'x64'")]
|
||||
readonly MSBuildTargetPlatform Platform = MSBuildTargetPlatform.x64;
|
||||
[Parameter("Platform to build - x86, x64, ARM64. Default is current architecture.")]
|
||||
readonly MSBuildTargetPlatform Platform = GetDefaultTargetPlatform();
|
||||
|
||||
[Parameter($"Docker containers type to be used. One of '{ContainersNone}', '{ContainersLinux}', '{ContainersWindows}'. Default is '{ContainersLinux}'")]
|
||||
[Parameter($"Docker containers type to be used in tests. One of '{ContainersNone}', '{ContainersLinux}', '{ContainersWindows}', '{ContainersWindowsOnly}'. Default is '{ContainersLinux}'")]
|
||||
readonly string Containers = ContainersLinux;
|
||||
|
||||
[Parameter("TargetFramework to be tested. Default is empty, meaning all TFMs supported by each test")]
|
||||
readonly TargetFramework TestTargetFramework = TargetFramework.NOT_SPECIFIED;
|
||||
|
||||
const string ContainersNone = "none";
|
||||
const string ContainersAny = "any";
|
||||
const string ContainersLinux = "linux";
|
||||
const string ContainersWindows = "windows";
|
||||
const string ContainersWindowsOnly = "windows-only";
|
||||
|
||||
[Parameter("Test projects filter. Optional, default matches all test projects. The project will be selected if the string is part of its name.")]
|
||||
readonly string TestProject = "";
|
||||
|
@ -31,16 +35,17 @@ partial class Build : NukeBuild
|
|||
[Parameter("Number of times each dotnet test is run. Default is '1'")]
|
||||
readonly int TestCount = 1;
|
||||
|
||||
[Parameter("Windows Server Core container version. Use it if your Windows does not support the default value. Default is 'ltsc2022'")]
|
||||
readonly string WindowsContainerVersion = "ltsc2022";
|
||||
|
||||
[Parameter("The location to create the tracer home directory. Default is './bin/tracer-home'")]
|
||||
readonly AbsolutePath TracerHome;
|
||||
[Parameter("The location to place NuGet packages and other packages. Default is './bin/artifacts'")]
|
||||
readonly AbsolutePath Artifacts;
|
||||
|
||||
[Parameter("The location to restore Nuget packages. Optional")]
|
||||
readonly AbsolutePath NugetPackageDirectory;
|
||||
[Parameter("The location to place the NuGet packages built from the project. Default is './bin/nuget-artifacts'")]
|
||||
readonly AbsolutePath NuGetArtifacts;
|
||||
|
||||
[Parameter("The location to restore NuGet packages. Optional")]
|
||||
readonly AbsolutePath NuGetPackagesDirectory;
|
||||
|
||||
[Parameter("Do not restore the projects before building.")]
|
||||
readonly bool NoRestore;
|
||||
|
||||
Target Clean => _ => _
|
||||
.Description("Cleans all build output")
|
||||
|
@ -53,14 +58,14 @@ partial class Build : NukeBuild
|
|||
DeleteReparsePoints(SourceDirectory);
|
||||
DeleteReparsePoints(TestsDirectory);
|
||||
}
|
||||
SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(x => DeleteDirectory(x));
|
||||
TestsDirectory.GlobDirectories("**/bin", "**/obj").ForEach(x => DeleteDirectory(x));
|
||||
EnsureCleanDirectory(OutputDirectory);
|
||||
EnsureCleanDirectory(TracerHomeDirectory);
|
||||
EnsureCleanDirectory(ArtifactsDirectory);
|
||||
EnsureCleanDirectory(NativeProfilerProject.Directory / "build");
|
||||
EnsureCleanDirectory(NativeProfilerProject.Directory / "deps");
|
||||
EnsureCleanDirectory(BuildDataDirectory);
|
||||
SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(x => x.DeleteDirectory());
|
||||
TestsDirectory.GlobDirectories("**/bin", "**/obj").ForEach(x => x.DeleteDirectory());
|
||||
OutputDirectory.CreateOrCleanDirectory();
|
||||
TracerHomeDirectory.CreateOrCleanDirectory();
|
||||
NuGetArtifactsDirectory.CreateOrCleanDirectory();
|
||||
(NativeProfilerProject.Directory / "build").CreateOrCleanDirectory();
|
||||
(NativeProfilerProject.Directory / "deps").CreateOrCleanDirectory();
|
||||
TestArtifactsDirectory.CreateOrCleanDirectory();
|
||||
|
||||
void DeleteReparsePoints(string path)
|
||||
{
|
||||
|
@ -72,27 +77,41 @@ partial class Build : NukeBuild
|
|||
});
|
||||
|
||||
Target Workflow => _ => _
|
||||
.Description("GitHub workflow entry point")
|
||||
.DependsOn(Clean)
|
||||
.Description("Full workflow including build of deliverables (except NuGet packages) and run the respective tests")
|
||||
.DependsOn(BuildWorkflow)
|
||||
.DependsOn(TestWorkflow);
|
||||
|
||||
Target BuildWorkflow => _ => _
|
||||
.Description("Builds the project deliverables (except NuGet packages)")
|
||||
.DependsOn(BuildTracer)
|
||||
.DependsOn(CompileExamples)
|
||||
.DependsOn(CompileExamples);
|
||||
|
||||
Target BuildNativeWorkflow => _ => _
|
||||
.Description("Builds the native code project deliverables.")
|
||||
.After(Clean)
|
||||
.DependsOn(CreateRequiredDirectories)
|
||||
.DependsOn(CompileNativeSrc)
|
||||
.DependsOn(PublishNativeProfiler);
|
||||
|
||||
Target TestWorkflow => _ => _
|
||||
.Description("Builds and run the tests against the local deliverables (except NuGet packages)")
|
||||
.After(BuildWorkflow)
|
||||
.DependsOn(NativeTests)
|
||||
.DependsOn(ManagedTests)
|
||||
.DependsOn(CompileBenchmarks);
|
||||
.DependsOn(ManagedTests);
|
||||
|
||||
Target BuildTracer => _ => _
|
||||
.Description("Builds the native and managed src, and publishes the tracer home directory")
|
||||
.After(Clean)
|
||||
.After(Restore)
|
||||
.DependsOn(CreateRequiredDirectories)
|
||||
.DependsOn(Restore)
|
||||
.DependsOn(BuildInstallationScripts)
|
||||
.DependsOn(GenerateNetFxTransientDependencies)
|
||||
.DependsOn(CompileManagedSrc)
|
||||
.DependsOn(PublishManagedProfiler)
|
||||
.DependsOn(PublishRuleEngineJson)
|
||||
.DependsOn(GenerateNetFxAssemblyRedirectionSource)
|
||||
.DependsOn(CompileNativeSrc)
|
||||
.DependsOn(PublishNativeProfiler)
|
||||
.DependsOn(GenerateIntegrationsJson)
|
||||
.DependsOn(CopyIntegrationsJson)
|
||||
.DependsOn(CopyInstrumentScripts)
|
||||
.DependsOn(CopyLegalFiles);
|
||||
|
||||
|
@ -107,10 +126,14 @@ partial class Build : NukeBuild
|
|||
.Description("Builds the managed unit / integration tests and runs them")
|
||||
.After(Clean, BuildTracer)
|
||||
.DependsOn(CreateRequiredDirectories)
|
||||
.DependsOn(BuildInstallationScripts)
|
||||
.DependsOn(GenerateLibraryVersionFiles)
|
||||
.DependsOn(CompileNativeDependenciesForManagedTests)
|
||||
.DependsOn(CompileManagedTests)
|
||||
.DependsOn(CompileMocks)
|
||||
.DependsOn(PublishMocks)
|
||||
.DependsOn(PublishIisTestApplications)
|
||||
.DependsOn(InstallNetFxAssembliesGAC)
|
||||
.DependsOn(RunManagedTests);
|
||||
|
||||
string ContainersFilter()
|
||||
|
@ -118,13 +141,17 @@ partial class Build : NukeBuild
|
|||
switch (Containers)
|
||||
{
|
||||
case ContainersNone:
|
||||
return "Containers!=Linux&Containers!=Windows";
|
||||
return "Containers!=Linux&Containers!=Windows&Containers!=Any";
|
||||
case ContainersLinux:
|
||||
return "Containers!=Windows";
|
||||
case ContainersWindows:
|
||||
return "Containers!=Linux";
|
||||
case ContainersWindowsOnly:
|
||||
return "Containers=Windows";
|
||||
case ContainersAny:
|
||||
throw new InvalidOperationException($"Containers={ContainersAny} is not supported directly. Specify concrete value, see help for options.");
|
||||
default:
|
||||
throw new InvalidOperationException($"Container={Containers} is not supported");
|
||||
throw new InvalidOperationException($"Containers={Containers} is not supported");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,29 +164,4 @@ partial class Build : NukeBuild
|
|||
|
||||
return "FullyQualifiedName~" + TestName;
|
||||
}
|
||||
|
||||
string AndFilter(params string[] args)
|
||||
{
|
||||
var result = string.Empty;
|
||||
var first = true;
|
||||
|
||||
foreach (var arg in args)
|
||||
{
|
||||
if (string.IsNullOrEmpty(arg))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (first)
|
||||
{
|
||||
result = arg;
|
||||
first = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
result += "&" + arg;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
<Project>
|
||||
<!-- This file prevents unintended imports of unrelated MSBuild files -->
|
||||
<!-- Uncomment to include parent Directory.Packages.props file -->
|
||||
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Packages.props', '$(MSBuildThisFileDirectory)../'))" />-->
|
||||
<Import Project="..\Directory.Packages.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Mono.Cecil" Version="0.11.4" />
|
||||
<PackageVersion Include="Nuke.Common" Version="6.3.0" />
|
||||
<PackageVersion Include="Nuget.CommandLine" Version="6.4.0" />
|
||||
<PackageVersion Include="Mono.Cecil" Version="0.11.6" />
|
||||
<PackageVersion Include="Nuke.Common" Version="9.0.4" />
|
||||
<!-- Microsoft.Build.Tasks.Core is an indirect reference from Nuke.Common. Fixes https://github.com/advisories/GHSA-h4j7-5rxr-p4wc -->
|
||||
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.14.8" />
|
||||
<PackageVersion Include="Nuget.CommandLine" Version="6.14.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,149 @@
|
|||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json.Nodes;
|
||||
using Nuke.Common.IO;
|
||||
|
||||
namespace Extensions;
|
||||
|
||||
internal static class DepsJsonExtensions
|
||||
{
|
||||
public static string GetFolderRuntimeName(this JsonObject depsJson)
|
||||
{
|
||||
var runtimeName = depsJson["runtimeTarget"]["name"].GetValue<string>();
|
||||
var folderRuntimeName = runtimeName switch
|
||||
{
|
||||
".NETCoreApp,Version=v8.0" => "net8.0",
|
||||
".NETCoreApp,Version=v9.0" => "net9.0",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(runtimeName), runtimeName,
|
||||
"This value is not supported. You have probably introduced new .NET version to AutoInstrumentation")
|
||||
};
|
||||
|
||||
return folderRuntimeName;
|
||||
}
|
||||
|
||||
public static void CopyNativeDependenciesToStore(this JsonObject depsJson, AbsolutePath file, IReadOnlyList<AbsolutePath> architectureStores)
|
||||
{
|
||||
var depsDirectory = file.Parent;
|
||||
|
||||
foreach (var targetProperty in depsJson["targets"].AsObject())
|
||||
{
|
||||
var target = targetProperty.Value.AsObject();
|
||||
|
||||
foreach (var packages in target)
|
||||
{
|
||||
if (!packages.Value.AsObject().TryGetPropertyValue("runtimeTargets", out var runtimeTargets))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (var runtimeDependency in runtimeTargets.AsObject())
|
||||
{
|
||||
var sourceFileName = Path.Combine(depsDirectory, runtimeDependency.Key);
|
||||
|
||||
foreach (var architectureStore in architectureStores)
|
||||
{
|
||||
var targetFileName = Path.Combine(architectureStore, packages.Key.ToLowerInvariant(), runtimeDependency.Key);
|
||||
var targetDirectory = Path.GetDirectoryName(targetFileName);
|
||||
Directory.CreateDirectory(targetDirectory);
|
||||
File.Copy(sourceFileName, targetFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveOpenTelemetryLibraries(this JsonObject depsJson)
|
||||
{
|
||||
var dependencies = depsJson.GetDependencies();
|
||||
var runtimeLibraries = depsJson["libraries"].AsObject();
|
||||
var keysToRemove = dependencies
|
||||
.Where(x => x.Key.StartsWith("OpenTelemetry"))
|
||||
.Select(x => x.Key)
|
||||
.ToList();
|
||||
|
||||
foreach (var key in keysToRemove)
|
||||
{
|
||||
dependencies.Remove(key);
|
||||
runtimeLibraries.Remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RollFrameworkForward(this JsonObject depsJson, string runtime, string rollForwardRuntime, IReadOnlyList<AbsolutePath> architectureStores)
|
||||
{
|
||||
// Update the contents of the json file.
|
||||
foreach (var dep in depsJson.GetDependencies())
|
||||
{
|
||||
var depObject = dep.Value.AsObject();
|
||||
if (depObject.TryGetPropertyValue("runtime", out var runtimeNode))
|
||||
{
|
||||
var runtimeObject = runtimeNode.AsObject();
|
||||
var libKeys = runtimeObject
|
||||
.Select(x => x.Key)
|
||||
.Where(x => x.StartsWith($"lib/{runtime}"))
|
||||
.ToList();
|
||||
|
||||
foreach (var libKey in libKeys)
|
||||
{
|
||||
var libNode = runtimeObject[libKey];
|
||||
var newKey = libKey.Replace($"lib/{runtime}", $"lib/{rollForwardRuntime}");
|
||||
|
||||
runtimeObject.Remove(libKey);
|
||||
runtimeObject.Add(newKey, libNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Roll forward each architecture by renaming the tfm folder holding the assemblies.
|
||||
foreach (var architectureStore in architectureStores)
|
||||
{
|
||||
var assemblyDirectories = architectureStore.GetDirectories();
|
||||
foreach (var assemblyDirectory in assemblyDirectories)
|
||||
{
|
||||
var assemblyVersionDirectories = assemblyDirectory.GetDirectories().ToList();
|
||||
if (assemblyVersionDirectories.Count != 1)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
$"Expected exactly one directory under {assemblyDirectory} but found {assemblyVersionDirectories.Count} instead.");
|
||||
}
|
||||
|
||||
var assemblyVersionDirectory = assemblyVersionDirectories[0];
|
||||
var sourceDir = assemblyVersionDirectory / "lib" / runtime;
|
||||
if (sourceDir.Exists())
|
||||
{
|
||||
var destDir = assemblyVersionDirectory / "lib" / rollForwardRuntime;
|
||||
|
||||
sourceDir.Copy(destDir);
|
||||
|
||||
// Since the json was also rolled forward the original tfm folder can be deleted.
|
||||
sourceDir.DeleteDirectory();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveDuplicatedLibraries(this JsonObject depsJson, ReadOnlyCollection<AbsolutePath> architectureStores)
|
||||
{
|
||||
var duplicatedLibraries = new List<(string Name, string Version)>(0);
|
||||
|
||||
foreach (var duplicatedLibrary in duplicatedLibraries)
|
||||
{
|
||||
if ((depsJson["libraries"] as JsonObject)!.ContainsKey(duplicatedLibrary.Name + "/" + duplicatedLibrary.Version))
|
||||
{
|
||||
throw new NotSupportedException($"Cannot remove {duplicatedLibrary.Name.ToLower()}/{duplicatedLibrary.Version} folder. It is referenced in json file");
|
||||
}
|
||||
foreach (var architectureStore in architectureStores)
|
||||
{
|
||||
var directoryToBeRemoved = architectureStore / duplicatedLibrary.Name.ToLower() / duplicatedLibrary.Version;
|
||||
if (!Directory.Exists(directoryToBeRemoved))
|
||||
{
|
||||
throw new NotSupportedException($"Directory {directoryToBeRemoved} does not exists. Verify it.");
|
||||
}
|
||||
Directory.Delete(directoryToBeRemoved, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static JsonObject GetDependencies(this JsonObject depsJson)
|
||||
{
|
||||
return depsJson["targets"].AsObject().First().Value.AsObject();
|
||||
}
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
using Models;
|
||||
using Nuke.Common.Tooling;
|
||||
using Nuke.Common.Tools.DotNet;
|
||||
using Nuke.Common.Tools.MSBuild;
|
||||
|
||||
|
@ -42,31 +44,46 @@ internal static class DotNetSettingsExtensions
|
|||
.SetResultsDirectory(resultsDirectory);
|
||||
}
|
||||
|
||||
public static DotNetMSBuildSettings EnableTrxLogOutput(this DotNetMSBuildSettings settings, string resultsDirectory)
|
||||
public static DotNetBuildSettings[] CombineWithBuildInfos(this DotNetBuildSettings settings, IReadOnlyCollection<PackageBuildInfo> buildInfos, TargetFramework targetFramework)
|
||||
{
|
||||
return settings
|
||||
.SetProperty("VSTestLogger", "trx")
|
||||
.SetProperty("VSTestResultsDirectory", resultsDirectory);
|
||||
// NOTE: SetProperty creates internally a new instance!
|
||||
return settings.CombineWith(buildInfos.Where(buildInfo => targetFramework == TargetFramework.NOT_SPECIFIED || buildInfo.SupportedFrameworks.Length == 0 || buildInfo.SupportedFrameworks.Contains(targetFramework)), (p, buildInfo) =>
|
||||
{
|
||||
p = p.SetProperty("LibraryVersion", buildInfo.LibraryVersion);
|
||||
|
||||
foreach (var item in buildInfo.AdditionalMetaData)
|
||||
{
|
||||
p = p.SetProperty(item.Key, item.Value);
|
||||
}
|
||||
|
||||
if (buildInfo.SupportedFrameworks.Length > 0)
|
||||
{
|
||||
p = p.SetProperty("TargetFrameworks", "\"\"\"" + string.Join(";", buildInfo.SupportedFrameworks) + "\"\"\"");
|
||||
}
|
||||
|
||||
return p;
|
||||
});
|
||||
}
|
||||
|
||||
public static DotNetMSBuildSettings SetBlameHangTimeout(this DotNetMSBuildSettings settings, string timeout)
|
||||
public static DotNetRestoreSettings[] CombineWithBuildInfos(this DotNetRestoreSettings settings, IReadOnlyCollection<PackageBuildInfo> buildInfos)
|
||||
{
|
||||
return settings
|
||||
.SetProperty("VSTestBlameHang", true)
|
||||
.SetProperty("VSTestBlameHangTimeout", timeout);
|
||||
}
|
||||
// NOTE: SetProperty creates internally a new instance!
|
||||
return settings.CombineWith(buildInfos, (p, buildInfo) =>
|
||||
{
|
||||
p = p.SetProperty("LibraryVersion", buildInfo.LibraryVersion);
|
||||
|
||||
public static DotNetMSBuildSettings RunTests(this DotNetMSBuildSettings settings)
|
||||
{
|
||||
return settings
|
||||
.SetTargets("VSTest")
|
||||
.SetProperty("VSTestNoBuild", true);
|
||||
}
|
||||
foreach (var item in buildInfo.AdditionalMetaData)
|
||||
{
|
||||
p = p.SetProperty(item.Key, item.Value);
|
||||
}
|
||||
|
||||
public static DotNetMSBuildSettings SetFilter(this DotNetMSBuildSettings settings, string filter)
|
||||
{
|
||||
return settings
|
||||
.SetProperty("VSTestTestCaseFilter", filter);
|
||||
if (buildInfo.SupportedFrameworks.Length > 0)
|
||||
{
|
||||
p = p.SetProperty("TargetFrameworks", string.Join(";", buildInfo.SupportedFrameworks));
|
||||
}
|
||||
|
||||
return p;
|
||||
});
|
||||
}
|
||||
|
||||
private static string GetTargetPlatform(MSBuildTargetPlatform platform) =>
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
namespace Extensions;
|
||||
|
||||
public static class ListExtensions
|
||||
{
|
||||
public static List<T> AddIf<T>(this List<T> list, T item, bool condition)
|
||||
{
|
||||
if (condition)
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using Models;
|
||||
using Nuke.Common.Tools.MSBuild;
|
||||
|
||||
public static partial class LibraryVersion
|
||||
{
|
||||
public static bool TryGetVersions(string applicationName, MSBuildTargetPlatform platform, out IReadOnlyCollection<PackageBuildInfo> libraryVersions)
|
||||
{
|
||||
var result = Versions.TryGetValue(applicationName, out libraryVersions);
|
||||
if (result)
|
||||
{
|
||||
libraryVersions = libraryVersions
|
||||
.Where(x =>
|
||||
x.SupportedPlatforms.Contains(platform.ToString(), StringComparer.OrdinalIgnoreCase))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,183 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by the LibraryVersionsGenerator tool. To safely
|
||||
// modify this file, edit PackageVersionDefinitions.cs and
|
||||
// re-run the LibraryVersionsGenerator project in Visual Studio.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Models;
|
||||
|
||||
public static partial class LibraryVersion
|
||||
{
|
||||
public static IReadOnlyDictionary<string, IReadOnlyCollection<PackageBuildInfo>> Versions = new Dictionary<string, IReadOnlyCollection<PackageBuildInfo>>
|
||||
{
|
||||
{
|
||||
"TestApplication.Azure",
|
||||
[
|
||||
new("12.22.2"),
|
||||
new("12.24.1"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.Elasticsearch",
|
||||
[
|
||||
new("8.15.10"),
|
||||
new("9.0.7"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.EntityFrameworkCore",
|
||||
[
|
||||
new("6.0.35"),
|
||||
new("8.0.10"),
|
||||
new("9.0.6"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.EntityFrameworkCore.Pomelo.MySql",
|
||||
[
|
||||
new("6.0.3"),
|
||||
new("7.0.0"),
|
||||
new("8.0.0"),
|
||||
new("8.0.3"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.GraphQL",
|
||||
[
|
||||
new("7.5.0", additionalMetaData: new() { { "GraphQLMicrosoftDI", "7.5.0" }, { "GraphQLServerTransportsAspNetCore", "7.5.0" }, { "GraphQLServerUIPGraphiQL", "7.5.0" } }),
|
||||
new("8.0.2", additionalMetaData: new() { { "GraphQLMicrosoftDI", "8.0.2" }, { "GraphQLServerTransportsAspNetCore", "8.0.2" }, { "GraphQLServerUIPGraphiQL", "8.0.2" } }),
|
||||
new("8.5.0", additionalMetaData: new() { { "GraphQLMicrosoftDI", "8.5.0" }, { "GraphQLServerTransportsAspNetCore", "8.2.0" }, { "GraphQLServerUIPGraphiQL", "8.2.0" } }),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.GrpcNetClient",
|
||||
[
|
||||
new("2.52.0"),
|
||||
new("2.67.0"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.Log4NetBridge",
|
||||
[
|
||||
new("2.0.13"),
|
||||
new("3.1.0"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.MassTransit",
|
||||
[
|
||||
new("8.3.0"),
|
||||
new("8.5.0"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.SqlClient.Microsoft",
|
||||
[
|
||||
new("5.2.2"),
|
||||
new("6.0.2"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.SqlClient.System",
|
||||
[
|
||||
new("4.8.6"),
|
||||
new("4.9.0"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.MongoDB",
|
||||
[
|
||||
new("2.19.0", supportedFrameworks: [ "net9.0", "net8.0", "net462" ]),
|
||||
new("2.30.0", supportedFrameworks: [ "net9.0", "net8.0", "net462" ]),
|
||||
new("3.0.0", supportedFrameworks: [ "net9.0", "net8.0", "net472" ]),
|
||||
new("3.4.0", supportedFrameworks: [ "net9.0", "net8.0", "net472" ]),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.MySqlConnector",
|
||||
[
|
||||
new("2.0.0"),
|
||||
new("2.4.0"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.MySqlData",
|
||||
[
|
||||
new("9.0.0"),
|
||||
new("9.3.0"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.Npgsql",
|
||||
[
|
||||
new("8.0.5"),
|
||||
new("9.0.3", supportedFrameworks: [ "net9.0", "net8.0" ]),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.NServiceBus",
|
||||
[
|
||||
new("8.2.5"),
|
||||
new("9.1.0", supportedFrameworks: [ "net9.0", "net8.0" ]),
|
||||
new("9.2.7", supportedFrameworks: [ "net9.0", "net8.0" ]),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.OracleMda.NetFramework",
|
||||
[
|
||||
new("23.5.1", supportedFrameworks: [ "net472" ]),
|
||||
new("23.8.0", supportedFrameworks: [ "net472" ]),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.OracleMda.Core",
|
||||
[
|
||||
new("23.5.1"),
|
||||
new("23.8.0"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.Quartz",
|
||||
[
|
||||
new("3.6.0"),
|
||||
new("3.14.0"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.RabbitMq",
|
||||
[
|
||||
new("5.1.2"),
|
||||
new("6.8.1"),
|
||||
new("7.0.0"),
|
||||
new("7.1.2"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.StackExchangeRedis",
|
||||
[
|
||||
new("2.6.122"),
|
||||
new("2.8.41"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.Wcf.Client.DotNet",
|
||||
[
|
||||
new("4.10.2"),
|
||||
new("6.2.0"),
|
||||
new("8.1.2"),
|
||||
]
|
||||
},
|
||||
{
|
||||
"TestApplication.Kafka",
|
||||
[
|
||||
new("1.8.2"),
|
||||
new("2.10.1"),
|
||||
]
|
||||
},
|
||||
};
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
namespace Models;
|
||||
|
||||
public class PackageBuildInfo
|
||||
{
|
||||
public PackageBuildInfo(string libraryVersion, string[] supportedFrameworks = null, string[] supportedPlatforms = null, Dictionary<string, string> additionalMetaData = null)
|
||||
{
|
||||
LibraryVersion = libraryVersion;
|
||||
SupportedFrameworks = supportedFrameworks ?? Array.Empty<string>();
|
||||
SupportedPlatforms = supportedPlatforms ?? Array.Empty<string>();
|
||||
AdditionalMetaData = additionalMetaData ?? new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public string LibraryVersion { get; }
|
||||
|
||||
public string[] SupportedFrameworks { get; }
|
||||
|
||||
public string[] SupportedPlatforms { get; }
|
||||
|
||||
public Dictionary<string, string> AdditionalMetaData { get; }
|
||||
}
|
|
@ -12,28 +12,30 @@ public static class Projects
|
|||
public const string AutoInstrumentationMock = "OpenTelemetry.AutoInstrumentation.Mock";
|
||||
}
|
||||
|
||||
public static class Benchmarks
|
||||
{
|
||||
public const string AutoInstrumentationBenchmarks = "Benchmarks";
|
||||
}
|
||||
|
||||
public static class Tests
|
||||
{
|
||||
public const string AutoInstrumentationNativeTests = "OpenTelemetry.AutoInstrumentation.Native.Tests";
|
||||
public const string AutoInstrumentationBuildTasksTests = "OpenTelemetry.AutoInstrumentation.BuildTasks.Tests";
|
||||
public const string AutoInstrumentationLoaderTests = "OpenTelemetry.AutoInstrumentation.Loader.Tests";
|
||||
public const string AutoInstrumentationBootstrappingTests = "OpenTelemetry.AutoInstrumentation.Bootstrapping.Tests";
|
||||
public const string AutoInstrumentationTests = "OpenTelemetry.AutoInstrumentation.Tests";
|
||||
public const string AutoInstrumentationStartupHookTests = "OpenTelemetry.AutoInstrumentation.StartupHook.Tests";
|
||||
public const string IntegrationTests = "IntegrationTests";
|
||||
|
||||
public static class Applications
|
||||
{
|
||||
public const string AspNet = "TestApplication.AspNet.NetFramework";
|
||||
public const string ContinuousProfilerNativeDep = "TestApplication.ContinuousProfiler.NativeDep";
|
||||
public const string OwinIis = "TestApplication.Owin.IIS.NetFramework";
|
||||
public const string WcfIis = "TestApplication.Wcf.Server.IIS.NetFramework";
|
||||
public const string WcfServer = "TestApplication.Wcf.Server.NetFramework";
|
||||
}
|
||||
}
|
||||
|
||||
public static class Tools
|
||||
{
|
||||
public const string IntegrationsJsonGenerator = "IntegrationsJsonGenerator";
|
||||
|
||||
public const string LibraryVersionsGenerator = "LibraryVersionsGenerator";
|
||||
public const string GacInstallTool = "GacInstallTool";
|
||||
public const string SdkVersionAnalyzerTool = "SdkVersionAnalyzer";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,18 +7,21 @@ public static class ProjectsHelper
|
|||
private const string NativeProjectMarker = "Native"; // Contains word Native
|
||||
private const string TestsProjectMarker = "Tests"; // Ends with word Tests
|
||||
private const string NetFrameworkMarker = ".NetFramework"; // Ends with word .NetFramework
|
||||
private const string NativeDepMarker = ".NativeDep"; // Ends with word .NativeDep
|
||||
|
||||
private const string CoreProjectSelector = "OpenTelemetry.AutoInstrumentation*";
|
||||
private const string TestApplicationSelector = "TestApplication.*";
|
||||
private const string TestLibrarySelector = "TestLibrary.*";
|
||||
|
||||
private readonly static AbsolutePath SrcDirectory = NukeBuild.RootDirectory / "src";
|
||||
private readonly static AbsolutePath TestDirectory = NukeBuild.RootDirectory / "test";
|
||||
private static readonly AbsolutePath SrcDirectory = NukeBuild.RootDirectory / "src";
|
||||
private static readonly AbsolutePath TestDirectory = NukeBuild.RootDirectory / "test";
|
||||
private static readonly AbsolutePath TestIntegrationApps = TestDirectory / "test-applications" / "integrations";
|
||||
private static readonly AbsolutePath TestNuGetPackagesApps = TestDirectory / "test-applications" / "nuget-packages";
|
||||
|
||||
public static IEnumerable<Project> GetManagedSrcProjects(this Solution solution)
|
||||
{
|
||||
return solution
|
||||
.GetProjects(CoreProjectSelector)
|
||||
.GetAllProjects(CoreProjectSelector)
|
||||
.Where(x =>
|
||||
// Should contain in the src directory
|
||||
SrcDirectory.Contains(x.Directory) &&
|
||||
|
@ -29,7 +32,7 @@ public static class ProjectsHelper
|
|||
public static IEnumerable<Project> GetNativeSrcProjects(this Solution solution)
|
||||
{
|
||||
return solution
|
||||
.GetProjects(CoreProjectSelector)
|
||||
.GetAllProjects(CoreProjectSelector)
|
||||
.Where(x =>
|
||||
// Should contain in the src directory
|
||||
SrcDirectory.Contains(x.Directory) &&
|
||||
|
@ -46,7 +49,7 @@ public static class ProjectsHelper
|
|||
public static IEnumerable<Project> GetManagedUnitTestProjects(this Solution solution)
|
||||
{
|
||||
return solution
|
||||
.GetProjects(CoreProjectSelector)
|
||||
.GetAllProjects(CoreProjectSelector)
|
||||
.Where(x =>
|
||||
// Should contain in the test directory
|
||||
TestDirectory.Contains(x.Directory) &&
|
||||
|
@ -58,44 +61,54 @@ public static class ProjectsHelper
|
|||
|
||||
public static Project GetManagedIntegrationTestProject(this Solution solution)
|
||||
{
|
||||
return solution.GetProject(Projects.Tests.IntegrationTests);
|
||||
return solution.AllProjects.First(project => project.Name == Projects.Tests.IntegrationTests);
|
||||
}
|
||||
|
||||
public static IEnumerable<Project> GetTestApplications(this Solution solution)
|
||||
public static IEnumerable<Project> GetIntegrationTestApplications(this Solution solution)
|
||||
{
|
||||
var testApplications = solution.GetProjects(TestApplicationSelector);
|
||||
var testLibraries = solution.GetProjects(TestLibrarySelector);
|
||||
var testApplications = solution
|
||||
.GetAllProjects(TestApplicationSelector)
|
||||
.Where(p => TestIntegrationApps.Contains(p.Directory));
|
||||
var testLibraries = solution.GetAllProjects(TestLibrarySelector);
|
||||
|
||||
return testApplications.Concat(testLibraries);
|
||||
}
|
||||
|
||||
public static Project GetTestMock(this Solution solution)
|
||||
{
|
||||
return solution.GetProject(Projects.Mocks.AutoInstrumentationMock);
|
||||
}
|
||||
|
||||
public static Project GetBenchmarks(this Solution solution)
|
||||
{
|
||||
return solution.GetProject(Projects.Benchmarks.AutoInstrumentationBenchmarks);
|
||||
}
|
||||
|
||||
public static IEnumerable<Project> GetWindowsOnlyTestApplications(this Solution solution)
|
||||
public static IEnumerable<Project> GetNuGetPackagesTestApplications(this Solution solution)
|
||||
{
|
||||
return solution
|
||||
.GetTestApplications()
|
||||
.GetAllProjects(TestApplicationSelector)
|
||||
.Where(p => TestNuGetPackagesApps.Contains(p.Directory));
|
||||
}
|
||||
|
||||
public static Project GetTestMock(this Solution solution)
|
||||
{
|
||||
return solution.GetProjectByName(Projects.Mocks.AutoInstrumentationMock);
|
||||
}
|
||||
|
||||
public static Project GetContinuousProfilerNativeDep(this Solution solution)
|
||||
{
|
||||
return solution.GetProjectByName(Projects.Tests.Applications.ContinuousProfilerNativeDep);
|
||||
}
|
||||
|
||||
public static IEnumerable<Project> GetNetFrameworkOnlyTestApplications(this Solution solution)
|
||||
{
|
||||
return solution
|
||||
.GetIntegrationTestApplications()
|
||||
.Where(x => x.Name.EndsWith(NetFrameworkMarker));
|
||||
}
|
||||
|
||||
public static IEnumerable<Project> GetCrossPlatformTestApplications(this Solution solution)
|
||||
{
|
||||
return solution
|
||||
.GetTestApplications()
|
||||
.Where(x => !x.Name.EndsWith(NetFrameworkMarker));
|
||||
.GetIntegrationTestApplications()
|
||||
.Where(x => !x.Name.EndsWith(NetFrameworkMarker))
|
||||
.Where(x => !x.Name.EndsWith(NativeDepMarker));
|
||||
}
|
||||
|
||||
public static Project GetNativeTestProject(this Solution solution)
|
||||
{
|
||||
return solution.GetProject(Projects.Tests.AutoInstrumentationNativeTests);
|
||||
return solution.GetProjectByName(Projects.Tests.AutoInstrumentationNativeTests);
|
||||
}
|
||||
|
||||
public static IEnumerable<Project> GetCrossPlatformManagedProjects(this Solution solution)
|
||||
|
@ -103,8 +116,7 @@ public static class ProjectsHelper
|
|||
return solution.GetManagedSrcProjects()
|
||||
.Concat(solution.GetManagedTestProjects())
|
||||
.Concat(solution.GetCrossPlatformTestApplications())
|
||||
.Concat(new[] { solution.GetTestMock() })
|
||||
.Concat(new[] { solution.GetBenchmarks() });
|
||||
.Concat(new[] { solution.GetTestMock() });
|
||||
}
|
||||
|
||||
public static IEnumerable<Project> GetNativeProjects(this Solution solution)
|
||||
|
@ -112,4 +124,9 @@ public static class ProjectsHelper
|
|||
return solution.GetNativeSrcProjects()
|
||||
.Concat(new[] { solution.GetNativeTestProject() });
|
||||
}
|
||||
|
||||
public static Project GetProjectByName(this Solution solution, string projectName)
|
||||
{
|
||||
return solution.AllProjects.First(projest => projest.Name == projectName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using Nuke.Common;
|
||||
using Nuke.Common.Tooling;
|
||||
using Serilog;
|
||||
|
||||
[TypeConverter(typeof(TargetFrameworkTypeConverter))]
|
||||
public class TargetFramework : Enumeration
|
||||
{
|
||||
public static readonly TargetFramework NOT_SPECIFIED = new() { Value = string.Empty };
|
||||
public static readonly TargetFramework NET462 = new() { Value = "net462" };
|
||||
public static readonly TargetFramework NETCore3_1 = new() { Value = "netcoreapp3.1" };
|
||||
public static readonly TargetFramework NET6_0 = new() { Value = "net6.0" };
|
||||
public static readonly TargetFramework NET7_0 = new() { Value = "net7.0" };
|
||||
public static readonly TargetFramework NET8_0 = new() { Value = "net8.0" };
|
||||
public static readonly TargetFramework NET9_0 = new() { Value = "net9.0" };
|
||||
|
||||
public static readonly TargetFramework[] NetFramework = {
|
||||
NET462
|
||||
|
@ -25,6 +26,7 @@ public class TargetFramework : Enumeration
|
|||
{
|
||||
private static readonly TargetFramework[] AllTargetFrameworks = typeof(TargetFramework)
|
||||
.GetFields(BindingFlags.Static | BindingFlags.Public)
|
||||
.Where(x => x.FieldType == typeof(TargetFramework))
|
||||
.Select(x => x.GetValue(null))
|
||||
.Cast<TargetFramework>()
|
||||
.ToArray();
|
||||
|
@ -36,8 +38,13 @@ public class TargetFramework : Enumeration
|
|||
var matchingFields = AllTargetFrameworks
|
||||
.Where(x => string.Equals(x.Value, stringValue, StringComparison.OrdinalIgnoreCase))
|
||||
.ToList();
|
||||
Assert.True(matchingFields.Count == 1);
|
||||
return matchingFields.Single();
|
||||
if (matchingFields.Count == 1)
|
||||
{
|
||||
return matchingFields.Single();
|
||||
}
|
||||
|
||||
Log.Warning($"Invalid target framework '{stringValue}' falling back to the default value.");
|
||||
return NOT_SPECIFIED;
|
||||
}
|
||||
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
using System.Reflection;
|
||||
|
||||
public static class VersionHelper
|
||||
{
|
||||
static Lazy<string> Version = new Lazy<string>(() =>
|
||||
typeof(VersionHelper).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!.InformationalVersion);
|
||||
|
||||
public static string GetVersion()
|
||||
{
|
||||
return Version.Value.Split('+')[0];
|
||||
}
|
||||
|
||||
public static string GetCommitId()
|
||||
{
|
||||
return Version.Value.Split('+')[1];
|
||||
}
|
||||
|
||||
public static string GetVersionWithoutSuffixes()
|
||||
{
|
||||
return Version.Value.Split('-', '+')[0];
|
||||
}
|
||||
|
||||
public static (string Major, string Minor, string Patch) GetVersionParts()
|
||||
{
|
||||
var split = GetVersionWithoutSuffixes().Split(".");
|
||||
return (split[0], split[1], split[2]);
|
||||
}
|
||||
}
|
|
@ -2,20 +2,40 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace></RootNamespace>
|
||||
<NoWarn>CS0649;CS0169</NoWarn>
|
||||
<NukeRootDirectory>..\..</NukeRootDirectory>
|
||||
<NukeScriptDirectory>..\..</NukeScriptDirectory>
|
||||
<NukeRootDirectory>..\</NukeRootDirectory>
|
||||
<NukeScriptDirectory>..\</NukeScriptDirectory>
|
||||
<NukeTelemetryVersion>1</NukeTelemetryVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>13.0</LangVersion>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<NuGetAudit>true</NuGetAudit>
|
||||
<NuGetAuditMode>all</NuGetAuditMode>
|
||||
<NuGetAuditLevel>low</NuGetAuditLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Mono.Cecil" />
|
||||
<PackageReference Include="Nuke.Common" />
|
||||
<!-- Microsoft.Build.Tasks.Core is an indirect reference from Nuke.Common. Fixes https://github.com/advisories/GHSA-h4j7-5rxr-p4wc -->
|
||||
<PackageReference Include="Microsoft.Build.Tasks.Core" />
|
||||
<PackageReference Include="Nuget.CommandLine" ExcludeAssets="all" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotNet.ReproducibleBuilds">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MinVer">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MinVerTagPrefix>v</MinVerTagPrefix>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\tools\DependencyListGenerator\DependencyListGenerator.csproj" />
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ANONYMOUSMETHOD_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue"><Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue"><Policy><Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
|
@ -24,4 +26,5 @@
|
|||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
|
|
|
@ -4,8 +4,8 @@ set -ex
|
|||
# install .NET tools
|
||||
dotnet tool restore
|
||||
|
||||
# install .NET 6.0 SDK
|
||||
# install .NET 9.0 SDK
|
||||
curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh
|
||||
chmod +x ./dotnet-install.sh
|
||||
sudo ./dotnet-install.sh -c 6.0 --install-dir /usr/share/dotnet --no-path
|
||||
sudo ./dotnet-install.sh -c 9.0 --install-dir /usr/share/dotnet --no-path
|
||||
rm dotnet-install.sh
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
version: "2"
|
||||
services:
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.61.0
|
||||
image: otel/opentelemetry-collector-contrib:0.88.0
|
||||
volumes:
|
||||
- ./otel-config.yaml:/etc/otel/config.yaml
|
||||
- ./log:/log/otel
|
||||
|
@ -20,8 +20,6 @@ services:
|
|||
- jaeger
|
||||
|
||||
jaeger:
|
||||
image: jaegertracing/all-in-one:1.38.1
|
||||
environment:
|
||||
- COLLECTOR_OTLP_ENABLED=true
|
||||
image: jaegertracing/all-in-one:1.50.0
|
||||
ports:
|
||||
- "16686:16686"
|
||||
|
|
116
dev/envvars.sh
116
dev/envvars.sh
|
@ -1,116 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# guess OS_TYPE if not provided
|
||||
OS_TYPE=${OS_TYPE:-}
|
||||
if [ -z "$OS_TYPE" ]; then
|
||||
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
|
||||
cygwin_nt*|mingw*|msys_nt*)
|
||||
OS_TYPE="windows"
|
||||
;;
|
||||
linux*)
|
||||
if [ "$(ldd /bin/ls | grep -m1 'musl')" ]; then
|
||||
OS_TYPE="linux-musl"
|
||||
else
|
||||
OS_TYPE="linux-glibc"
|
||||
fi
|
||||
;;
|
||||
darwin*)
|
||||
OS_TYPE="macos"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# validate input
|
||||
case "$OS_TYPE" in
|
||||
"linux-glibc")
|
||||
DOTNET_RUNTIME_ID="linux-x64"
|
||||
;;
|
||||
"linux-musl")
|
||||
DOTNET_RUNTIME_ID="linux-musl-x64"
|
||||
;;
|
||||
"macos")
|
||||
DOTNET_RUNTIME_ID="osx-x64"
|
||||
;;
|
||||
"windows")
|
||||
;;
|
||||
*)
|
||||
echo "Set the operating system type using the OS_TYPE environment variable. Supported values: linux-glibc, linux-musl, macos, windows." >&2
|
||||
return 2
|
||||
;;
|
||||
esac
|
||||
|
||||
uname_os() {
|
||||
os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
case "$os" in
|
||||
cygwin_nt*) echo "windows" ;;
|
||||
mingw*) echo "windows" ;;
|
||||
msys_nt*) echo "windows" ;;
|
||||
*) echo "$os" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
native_sufix() {
|
||||
os=$(uname_os)
|
||||
case "$os" in
|
||||
windows*) echo "dll" ;;
|
||||
linux*) echo "so" ;;
|
||||
darwin*) echo "dylib" ;;
|
||||
*) echo "OS: ${os} is not supported" ; exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
current_dir() {
|
||||
os=$(uname_os)
|
||||
case "$os" in
|
||||
windows*) pwd -W ;;
|
||||
*) pwd ;;
|
||||
esac
|
||||
}
|
||||
|
||||
CURDIR=$(current_dir)
|
||||
SUFIX=$(native_sufix)
|
||||
OS=$(uname_os)
|
||||
ENABLE_PROFILING=${ENABLE_PROFILING:-1}
|
||||
|
||||
# Configure .NET Core runtime
|
||||
export DOTNET_ADDITIONAL_DEPS="${CURDIR}/bin/tracer-home/AdditionalDeps"
|
||||
export DOTNET_SHARED_STORE="${CURDIR}/bin/tracer-home/store"
|
||||
export DOTNET_STARTUP_HOOKS="${CURDIR}/bin/tracer-home/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll"
|
||||
|
||||
# Configure ASP.NET Core startup
|
||||
export ASPNETCORE_HOSTINGSTARTUPASSEMBLIES="OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper"
|
||||
|
||||
# Configure OpenTelemetry .NET Auto-Instrumentation
|
||||
export OTEL_DOTNET_AUTO_HOME="${CURDIR}/bin/tracer-home"
|
||||
export OTEL_DOTNET_AUTO_INTEGRATIONS_FILE="${CURDIR}/bin/tracer-home/integrations.json"
|
||||
export OTEL_DOTNET_AUTO_DEBUG="1"
|
||||
export OTEL_DOTNET_AUTO_DUMP_ILREWRITE_ENABLED="0"
|
||||
export OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES=${OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES:-dotnet.exe,dotnet}
|
||||
|
||||
# Enable console exporters
|
||||
export OTEL_DOTNET_AUTO_TRACES_CONSOLE_EXPORTER_ENABLED=${OTEL_DOTNET_AUTO_TRACES_CONSOLE_EXPORTER_ENABLED:-true}
|
||||
export OTEL_DOTNET_AUTO_METRICS_CONSOLE_EXPORTER_ENABLED=${OTEL_DOTNET_AUTO_METRICS_CONSOLE_EXPORTER_ENABLED:-true}
|
||||
export OTEL_DOTNET_AUTO_LOGS_CONSOLE_EXPORTER_ENABLED=${OTEL_DOTNET_AUTO_LOGS_CONSOLE_EXPORTER_ENABLED:-true}
|
||||
|
||||
# Enable .NET Framework Profiling API
|
||||
if [ "$OS" == "windows" ]
|
||||
then
|
||||
export COR_ENABLE_PROFILING="${ENABLE_PROFILING}"
|
||||
export COR_PROFILER="{918728DD-259F-4A6A-AC2B-B85E1B658318}"
|
||||
export COR_PROFILER_PATH="${CURDIR}/bin/tracer-home/OpenTelemetry.AutoInstrumentation.Native.${SUFIX}"
|
||||
# Set paths for both bitness on Windows, see https://docs.microsoft.com/en-us/dotnet/core/run-time-config/debugging-profiling#profiler-location
|
||||
export COR_PROFILER_PATH_64="${CURDIR}/bin/tracer-home/win-x64/OpenTelemetry.AutoInstrumentation.Native.${SUFIX}"
|
||||
export COR_PROFILER_PATH_32="${CURDIR}/bin/tracer-home/win-x86/OpenTelemetry.AutoInstrumentation.Native.${SUFIX}"
|
||||
fi
|
||||
|
||||
# Enable .NET Core Profiling API
|
||||
export CORECLR_ENABLE_PROFILING="${ENABLE_PROFILING}"
|
||||
export CORECLR_PROFILER="{918728DD-259F-4A6A-AC2B-B85E1B658318}"
|
||||
if [ "$OS_TYPE" == "windows" ]
|
||||
then
|
||||
# Set paths for both bitness on Windows, see https://docs.microsoft.com/en-us/dotnet/core/run-time-config/debugging-profiling#profiler-location
|
||||
export CORECLR_PROFILER_PATH_64="$OTEL_DOTNET_AUTO_HOME/win-x64/OpenTelemetry.AutoInstrumentation.Native.$SUFIX"
|
||||
export CORECLR_PROFILER_PATH_32="$OTEL_DOTNET_AUTO_HOME/win-x86/OpenTelemetry.AutoInstrumentation.Native.$SUFIX"
|
||||
else
|
||||
export CORECLR_PROFILER_PATH="$OTEL_DOTNET_AUTO_HOME/$DOTNET_RUNTIME_ID/OpenTelemetry.AutoInstrumentation.Native.$SUFIX"
|
||||
fi
|
|
@ -18,8 +18,8 @@ processors:
|
|||
batch:
|
||||
|
||||
exporters:
|
||||
logging:
|
||||
# logLevel: debug
|
||||
debug:
|
||||
# verbosity: detailed
|
||||
file/traces:
|
||||
path: /log/otel/traces.log
|
||||
file/metrics:
|
||||
|
@ -41,7 +41,7 @@ service:
|
|||
- zipkin
|
||||
processors: [batch]
|
||||
exporters:
|
||||
- logging
|
||||
- debug
|
||||
- file/traces
|
||||
- otlp
|
||||
metrics:
|
||||
|
@ -49,7 +49,7 @@ service:
|
|||
- otlp
|
||||
processors: [batch]
|
||||
exporters:
|
||||
- logging
|
||||
- debug
|
||||
- file/metrics
|
||||
- prometheus
|
||||
logs:
|
||||
|
@ -57,9 +57,8 @@ service:
|
|||
- otlp
|
||||
processors: [batch]
|
||||
exporters:
|
||||
- logging
|
||||
- debug
|
||||
- file/logs
|
||||
- otlp
|
||||
extensions:
|
||||
- health_check
|
||||
- zpages
|
||||
|
|
|
@ -1,24 +1,26 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine3.16
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0.304-alpine3.21@sha256:430bd56f4348f9dd400331f0d71403554ec83ae1700a7dcfe1e1519c9fd12174
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache --update \
|
||||
clang \
|
||||
cmake \
|
||||
make \
|
||||
bash \
|
||||
alpine-sdk \
|
||||
protobuf \
|
||||
protobuf-dev \
|
||||
grpc
|
||||
clang=19.1.4-r0 \
|
||||
cmake=3.31.1-r0 \
|
||||
make=4.4.1-r2 \
|
||||
bash=5.2.37-r0 \
|
||||
alpine-sdk=1.1-r0 \
|
||||
protobuf=24.4-r4 \
|
||||
protobuf-dev=24.4-r4 \
|
||||
grpc=1.62.1-r2 \
|
||||
grpc-plugins=1.62.1-r2
|
||||
|
||||
ENV IsAlpine=true
|
||||
ENV PROTOBUF_PROTOC=/usr/bin/protoc
|
||||
ENV gRPC_PluginFullPath=/usr/bin/grpc_csharp_plugin
|
||||
|
||||
RUN curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh \
|
||||
&& chmod +x ./dotnet-install.sh \
|
||||
&& ./dotnet-install.sh -c 6.0 --install-dir /usr/share/dotnet --no-path \
|
||||
&& rm dotnet-install.sh
|
||||
COPY ./scripts/dotnet-install.sh ./dotnet-install.sh
|
||||
|
||||
# Install older SDKs using the install script
|
||||
RUN chmod +x ./dotnet-install.sh \
|
||||
&& ./dotnet-install.sh -v 8.0.413 --install-dir /usr/share/dotnet --no-path \
|
||||
&& rm dotnet-install.sh
|
||||
|
||||
WORKDIR /project
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
FROM quay.io/centos/centos:stream9@sha256:11e44d30c45661567009402629a7eeb3579739957fe3827d469a353d0fe1801f
|
||||
|
||||
# Install dotnet sdk
|
||||
RUN dnf install -y \
|
||||
libicu-devel
|
||||
|
||||
COPY ./scripts/dotnet-install.sh ./dotnet-install.sh
|
||||
|
||||
RUN chmod +x ./dotnet-install.sh \
|
||||
&& ./dotnet-install.sh -v 9.0.304 --install-dir /usr/share/dotnet --no-path \
|
||||
&& ./dotnet-install.sh -v 8.0.413 --install-dir /usr/share/dotnet --no-path \
|
||||
&& rm dotnet-install.sh
|
||||
|
||||
ENV PATH="$PATH:/usr/share/dotnet"
|
||||
|
||||
# https://github.com/dotnet/runtime/issues/65874
|
||||
RUN update-crypto-policies --set LEGACY
|
||||
|
||||
# Install dependencies
|
||||
RUN dnf install -y \
|
||||
cmake-3.26.5-2.el9 \
|
||||
clang-20.1.3-1.el9 \
|
||||
git-2.43.5-1.el9
|
||||
|
||||
WORKDIR /project
|
|
@ -0,0 +1,16 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:9.0.304-bookworm-slim@sha256:ae000be75dac94fc40e00f0eee903289e985995cc06dac3937469254ce5b60b6
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
cmake \
|
||||
clang \
|
||||
make
|
||||
|
||||
COPY ./scripts/dotnet-install.sh ./dotnet-install.sh
|
||||
|
||||
# Install older SDKs using the install script as there are no arm64 SDK packages.
|
||||
RUN chmod +x ./dotnet-install.sh \
|
||||
&& ./dotnet-install.sh -v 8.0.413 --install-dir /usr/share/dotnet --no-path \
|
||||
&& rm dotnet-install.sh
|
||||
|
||||
WORKDIR /project
|
|
@ -0,0 +1,13 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:9.0.304-bookworm-slim@sha256:ae000be75dac94fc40e00f0eee903289e985995cc06dac3937469254ce5b60b6
|
||||
|
||||
RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
|
||||
dpkg -i packages-microsoft-prod.deb && \
|
||||
rm packages-microsoft-prod.deb && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
dotnet-sdk-8.0 \
|
||||
cmake \
|
||||
clang \
|
||||
make
|
||||
|
||||
WORKDIR /project
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
#enable software collection
|
||||
source /opt/rh/devtoolset-9/enable
|
||||
exec "$@"
|
|
@ -0,0 +1,40 @@
|
|||
FROM ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
build-essential software-properties-common \
|
||||
gnupg \
|
||||
libicu-dev
|
||||
|
||||
# Install newer clang
|
||||
RUN apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" && \
|
||||
apt-get update && \
|
||||
apt-get install -y --allow-unauthenticated clang-5.0 && \
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 1000 && \
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 1000 && \
|
||||
update-alternatives --config clang && \
|
||||
update-alternatives --config clang++
|
||||
|
||||
# Install newer g++
|
||||
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
|
||||
apt-get update && \
|
||||
apt-get install -y g++-9 && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
|
||||
|
||||
# Install newer cmake, based on https://apt.kitware.com/
|
||||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
|
||||
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \
|
||||
apt-get update && \
|
||||
apt-get install -y --allow-unauthenticated cmake
|
||||
|
||||
COPY ./scripts/dotnet-install.sh ./dotnet-install.sh
|
||||
|
||||
RUN chmod +x ./dotnet-install.sh \
|
||||
&& ./dotnet-install.sh -v 9.0.304 --install-dir /usr/share/dotnet --no-path \
|
||||
&& rm dotnet-install.sh
|
||||
|
||||
WORKDIR /project
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
We'd love your help!
|
||||
|
||||
[The project board](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/projects/1)
|
||||
[The project board](https://github.com/orgs/open-telemetry/projects/39)
|
||||
shows the current work in progress.
|
||||
|
||||
Please join our weekly [SIG meeting](https://github.com/open-telemetry/community#special-interest-groups).
|
||||
Meeting notes are available as a public [Google
|
||||
doc](https://docs.google.com/document/d/1XedN2D8_PH4YLej-maT8sp4RKogfuhFpccRi3QpUcoI/edit?usp=sharing).
|
||||
doc](https://docs.google.com/document/d/1dYdwRQVE3zu0vlp_lqGctNm0dCQUkDo2LfScUJzpuT8/edit?usp=sharing).
|
||||
|
||||
Get in touch on [Slack](https://cloud-native.slack.com/archives/C01NR1YLSE7).
|
||||
If you are new, you can create a CNCF Slack account [here](http://slack.cncf.io/).
|
||||
|
@ -39,7 +39,7 @@ project, then create an issue and describe your proposal.
|
|||
|
||||
## How to contribute
|
||||
|
||||
Please read the [contribution guide](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md)
|
||||
Please read the [OpenTelemetry New Contributor Guide](https://github.com/open-telemetry/community/tree/main/guides/contributor)
|
||||
and the [code of conduct](https://github.com/open-telemetry/community/blob/main/code-of-conduct.md).
|
||||
for general practices of the OpenTelemetry project.
|
||||
|
||||
|
@ -60,3 +60,92 @@ on something that maintainers may decide this repo is not the right place for.
|
|||
|
||||
See [developing.md](developing.md) to learn more about
|
||||
the development environment setup and usage.
|
||||
|
||||
## Create Your First Pull Request
|
||||
|
||||
### How to Send Pull Requests
|
||||
|
||||
Everyone is welcome to contribute code to `opentelemetry-dotnet-instrumentation`
|
||||
via GitHub pull requests (PRs).
|
||||
|
||||
To create a new PR, fork the project in GitHub and clone the upstream repo:
|
||||
|
||||
> [!NOTE]
|
||||
> Please fork to a personal GitHub account rather than a corporate/enterprise
|
||||
> one so maintainers can push commits to your branch.
|
||||
> **Pull requests from protected forks will not be accepted.**
|
||||
|
||||
```sh
|
||||
git clone https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation.git
|
||||
```
|
||||
|
||||
Navigate to the repo root:
|
||||
|
||||
```sh
|
||||
cd opentelemetry-dotnet-instrumentation
|
||||
```
|
||||
|
||||
Add your fork as an origin:
|
||||
|
||||
```sh
|
||||
git remote add fork https://github.com/YOUR_GITHUB_USERNAME/opentelemetry-dotnet-instrumentation.git
|
||||
```
|
||||
|
||||
Check out a new branch, make modifications and push the branch to your fork:
|
||||
|
||||
```sh
|
||||
$ git checkout -b feature
|
||||
# change files
|
||||
# Test your changes locally.
|
||||
$ nuke Workflow
|
||||
$ git add my/changed/files
|
||||
$ git commit -m "short description of the change"
|
||||
$ git push fork feature
|
||||
```
|
||||
|
||||
Open a pull request against the main `opentelemetry-demo` repo.
|
||||
|
||||
### How to Receive Comments
|
||||
|
||||
* 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.
|
||||
* 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.
|
||||
|
||||
### How to Get PRs Merged
|
||||
|
||||
A PR is considered to be **ready to merge** when:
|
||||
|
||||
* It has received approval from
|
||||
[Approvers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver)
|
||||
/
|
||||
[Maintainers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
|
||||
* Major feedbacks are resolved.
|
||||
* The documentation and [Changelog](../CHANGELOG.md) have been updated
|
||||
to reflect the new changes.
|
||||
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
* 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
|
||||
with a summary in the PR conversation.
|
||||
* Tagging subdomain experts (by looking at the change history) in the PR asking
|
||||
for suggestion.
|
||||
* Reaching out to more people on the [CNCF OpenTelemetry Automatic
|
||||
instrumentation for .NET Slack channel](https://cloud-native.slack.com/archives/C01NR1YLSE7).
|
||||
* Stepping back to see if it makes sense to narrow down the scope of the PR or
|
||||
split it up.
|
||||
* If none of the above worked and the PR has been stuck for more than 2 weeks,
|
||||
the owner should bring it to the OpenTelemetry Automatic Instrumentation SIG
|
||||
[meeting](README.md#contributing).
|
||||
|
|
265
docs/README.md
265
docs/README.md
|
@ -1,25 +1,61 @@
|
|||
# OpenTelemetry .NET Automatic Instrumentation
|
||||
|
||||
[](https://cloud-native.slack.com/archives/C01NR1YLSE7)
|
||||
[](https://www.nuget.org/packages/OpenTelemetry.AutoInstrumentation)
|
||||
[](https://www.nuget.org/packages/OpenTelemetry.AutoInstrumentation)
|
||||
[](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-dotnet-instrumentation)
|
||||
[](https://www.bestpractices.dev/projects/10371)
|
||||
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet-instrumentation?ref=badge_shield&issueType=license)
|
||||
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet-instrumentation?ref=badge_shield&issueType=security)
|
||||
|
||||
This project adds [OpenTelemetry instrumentation](https://opentelemetry.io/docs/concepts/instrumenting/#automatic-instrumentation)
|
||||
to .NET applications without having to modify their source code.
|
||||
|
||||
---
|
||||
|
||||
⚠️ The following documentation refers to the in-development version
|
||||
> [!WARNING]
|
||||
> The following documentation refers to the in-development version
|
||||
of OpenTelemetry .NET Automatic Instrumentation. Docs for the latest version
|
||||
([0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest))
|
||||
can be found [here](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v0.5.0/docs/README.md).
|
||||
([1.12.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest))
|
||||
can be found in [opentelemetry.io](https://opentelemetry.io/docs/zero-code/net/)
|
||||
or [here](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v1.12.0/docs/README.md).
|
||||
|
||||
---
|
||||
|
||||
## Quick start
|
||||
|
||||
If you'd like to try the instrumentation on an existing application before
|
||||
learning more about the configuration options and the project, use the
|
||||
recommended installation method described at
|
||||
[Using the OpenTelemetry.AutoInstrumentation NuGet packages](./using-the-nuget-packages.md#using-the-opentelemetryautoinstrumentation-nuget-packages)
|
||||
or use the appropriate install script:
|
||||
|
||||
- On Linux and macOS, use the [shell scripts](#shell-scripts).
|
||||
- On Windows, use the [PowerShell module](#powershell-module-windows).
|
||||
|
||||
> [!NOTE]
|
||||
> The NuGet packages are the recommended way to deploy automatic instrumentation,
|
||||
> but they can't be used in all cases. See [Limitations](./using-the-nuget-packages.md#limitations)
|
||||
> for details.
|
||||
|
||||
To see the telemetry from your application directly on the standard output, set
|
||||
the following environment variables to `console` before launching your application:
|
||||
|
||||
- `OTEL_TRACES_EXPORTER`
|
||||
- `OTEL_METRICS_EXPORTER`
|
||||
- `OTEL_LOGS_EXPORTER`
|
||||
|
||||
For a demo using `docker compose`, clone this repository and
|
||||
follow the [examples/demo/README.md](../examples/demo/README.md).
|
||||
|
||||
## Components
|
||||
|
||||
OpenTelemetry .NET Automatic Instrumentation is built on top of
|
||||
[OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):
|
||||
|
||||
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
|
||||
[`1.4.0-rc.3`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.4.0-rc.3)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`7.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/7.0.0)
|
||||
[`1.12.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.12.0)
|
||||
- `System.Diagnostics.DiagnosticSource`: [`9.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/9.0.0)
|
||||
referencing `System.Runtime.CompilerServices.Unsafe`: [`6.0.0`](https://www.nuget.org/packages/System.Runtime.CompilerServices.Unsafe/6.0.0)
|
||||
|
||||
You can find all references in
|
||||
|
@ -49,26 +85,32 @@ can be found in the [versioning documentation](versioning.md).
|
|||
|
||||
## Compatibility
|
||||
|
||||
OpenTelemetry .NET Automatic Instrumentation attempts to work with all officially
|
||||
OpenTelemetry .NET Automatic Instrumentation should work with all officially
|
||||
supported operating systems and versions of
|
||||
[.NET](https://dotnet.microsoft.com/download/dotnet),
|
||||
and [.NET Framework](https://dotnet.microsoft.com/download/dotnet-framework).
|
||||
[.NET](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core).
|
||||
|
||||
> Versions lower than `.NET Framework 4.6.2` are not supported.
|
||||
>
|
||||
> `.NET Core 3.1` is not supported.
|
||||
> [0.4.0-beta.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.4.0-beta.1)
|
||||
> is the latest version supporting it.
|
||||
>
|
||||
> `Red Hat Enterprise Linux` lower than `9` are not supported.
|
||||
> See [(#2083)](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2083).
|
||||
The minimal supported version of
|
||||
[.NET Framework](https://dotnet.microsoft.com/download/dotnet-framework)
|
||||
is `4.6.2`.
|
||||
|
||||
Supported processor architectures are:
|
||||
|
||||
- x86
|
||||
- AMD64 (x86-64)
|
||||
- ARM64 ([Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md))
|
||||
|
||||
CI tests run against the following operating systems:
|
||||
|
||||
- [macOS Big Sur 11](https://github.com/actions/runner-images/blob/main/images/macos/macos-11-Readme.md)
|
||||
- [Microsoft Windows Server 2022](https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md)
|
||||
- [Ubuntu 20.04 LTS](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md)
|
||||
- [Alpine](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docker/alpine.dockerfile)
|
||||
- [Alpine x64](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docker/alpine.dockerfile)
|
||||
- [Alpine ARM64](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docker/alpine.dockerfile)
|
||||
- [Debian x64](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docker/debian.dockerfile)
|
||||
- [Debian ARM64](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docker/debian-arm64.dockerfile)
|
||||
- [CentOS Stream 9 x64](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docker/centos-stream9.dockerfile)
|
||||
- [macOS Ventura 13 x64](https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md)
|
||||
- [Microsoft Windows Server 2022 x64](https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md)
|
||||
- [Microsoft Windows Server 2025 x64](https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md)
|
||||
- [Ubuntu 22.04 LTS x64](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md)
|
||||
- [Ubuntu 22.04 LTS ARM64](https://github.com/actions/partner-runner-images/blob/main/images/arm-ubuntu-22-image.md)
|
||||
|
||||
### Instrumented libraries and frameworks
|
||||
|
||||
|
@ -78,29 +120,27 @@ See [config.md#instrumented-libraries-and-frameworks](config.md#instrumented-lib
|
|||
|
||||
### Considerations on scope
|
||||
|
||||
Currently, instrumenting [`self-contained`](https://learn.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained)
|
||||
applications is not supported. Note that a `self-contained` applications is
|
||||
automatically generated in .NET 7.0 whenever the `dotnet publish` or `dotnet build`
|
||||
Instrumenting [`self-contained`](https://learn.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained)
|
||||
applications is supported through [NuGet packages](./using-the-nuget-packages.md).
|
||||
Note that a `self-contained` application is
|
||||
automatically generated in .NET 7+ whenever the `dotnet publish` or `dotnet build`
|
||||
command is used with a Runtime Identifier (RID) parameter, for example when `-r`
|
||||
or `--runtime` is used when running the command. The `dotnet` CLI is
|
||||
a `self-contained` application and it's incompatible with automatic instrumentation.
|
||||
or `--runtime` is used when running the command.
|
||||
|
||||
To build and launch an instrumented application, take the following into account:
|
||||
### Install using NuGet packages
|
||||
|
||||
- Don't set the automatic instrumentation environment variables in the same session
|
||||
used to run the `dotnet` tool.
|
||||
- Don't launch the application to be instrumented using `dotnet run` or
|
||||
`dotnet <dll>`. Build the application in an isolated shell, without the
|
||||
automatic instrumentation environment variables set, and use a separate
|
||||
session with the automatic instrumentation variables to directly launch
|
||||
the executable.
|
||||
The NuGet packages are the recommended way to deploy automatic instrumentation,
|
||||
but they can't be used in all cases. To install using the NuGet packages,
|
||||
see [Using the OpenTelemetry.AutoInstrumentation NuGet packages](./using-the-nuget-packages.md).
|
||||
See [Limitations](./using-the-nuget-packages.md#limitations) for incompatible scenarios.
|
||||
|
||||
### Install
|
||||
### Install manually
|
||||
|
||||
Download and extract the appropriate binaries from
|
||||
To install the automatic instrumentation manually, download and extract the appropriate binaries from
|
||||
[the latest release](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest).
|
||||
|
||||
> The path where you put the binaries is referenced as `$INSTALL_DIR`
|
||||
> [!NOTE]
|
||||
> The path where you put the binaries is referenced as `$INSTALL_DIR`.
|
||||
|
||||
### Instrument a .NET application
|
||||
|
||||
|
@ -109,40 +149,50 @@ When running your application, make sure to:
|
|||
1. Set the [resources](config.md#resources).
|
||||
1. Set the environment variables from the table below.
|
||||
|
||||
| Environment variable | .NET version | Value |
|
||||
|--------------------------------------|---------------------|---------------------------------------------------------------------------|
|
||||
| `COR_ENABLE_PROFILING` | .NET Framework | `1` |
|
||||
| `COR_PROFILER` | .NET Framework | `{918728DD-259F-4A6A-AC2B-B85E1B658318}` |
|
||||
| `COR_PROFILER_PATH_32` | .NET Framework | `$INSTALL_DIR/win-x86/OpenTelemetry.AutoInstrumentation.Native.dll` |
|
||||
| `COR_PROFILER_PATH_64` | .NET Framework | `$INSTALL_DIR/win-x64/OpenTelemetry.AutoInstrumentation.Native.dll` |
|
||||
| `CORECLR_ENABLE_PROFILING` | .NET | `1` |
|
||||
| `CORECLR_PROFILER` | .NET | `{918728DD-259F-4A6A-AC2B-B85E1B658318}` |
|
||||
| `CORECLR_PROFILER_PATH` | .NET on Linux glibc | `$INSTALL_DIR/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so` |
|
||||
| `CORECLR_PROFILER_PATH` | .NET on Linux musl | `$INSTALL_DIR/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so` |
|
||||
| `CORECLR_PROFILER_PATH` | .NET on macOS | `$INSTALL_DIR/osx-x64/OpenTelemetry.AutoInstrumentation.Native.dylib` |
|
||||
| `CORECLR_PROFILER_PATH_32` | .NET on Windows | `$INSTALL_DIR/win-x86/OpenTelemetry.AutoInstrumentation.Native.dll` |
|
||||
| `CORECLR_PROFILER_PATH_64` | .NET on Windows | `$INSTALL_DIR/win-x64/OpenTelemetry.AutoInstrumentation.Native.dll` |
|
||||
| `DOTNET_ADDITIONAL_DEPS` | .NET | `$INSTALL_DIR/AdditionalDeps` |
|
||||
| `DOTNET_SHARED_STORE` | .NET | `$INSTALL_DIR/store` |
|
||||
| `DOTNET_STARTUP_HOOKS` | .NET | `$INSTALL_DIR/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll` |
|
||||
| `OTEL_DOTNET_AUTO_HOME` | All versions | `$INSTALL_DIR` |
|
||||
| `OTEL_DOTNET_AUTO_INTEGRATIONS_FILE` | All versions | `$INSTALL_DIR/integrations.json` |
|
||||
| Environment variable | .NET version | Value |
|
||||
|----------------------------|---------------------|---------------------------------------------------------------------------|
|
||||
| `COR_ENABLE_PROFILING` | .NET Framework | `1` |
|
||||
| `COR_PROFILER` | .NET Framework | `{918728DD-259F-4A6A-AC2B-B85E1B658318}` |
|
||||
| `COR_PROFILER_PATH_32` | .NET Framework | `$INSTALL_DIR/win-x86/OpenTelemetry.AutoInstrumentation.Native.dll` |
|
||||
| `COR_PROFILER_PATH_64` | .NET Framework | `$INSTALL_DIR/win-x64/OpenTelemetry.AutoInstrumentation.Native.dll` |
|
||||
| `CORECLR_ENABLE_PROFILING` | .NET | `1` |
|
||||
| `CORECLR_PROFILER` | .NET | `{918728DD-259F-4A6A-AC2B-B85E1B658318}` |
|
||||
| `CORECLR_PROFILER_PATH` | .NET on Linux glibc | `$INSTALL_DIR/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so` |
|
||||
| `CORECLR_PROFILER_PATH` | .NET on Linux musl | `$INSTALL_DIR/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so` |
|
||||
| `CORECLR_PROFILER_PATH` | .NET on macOS | `$INSTALL_DIR/osx-x64/OpenTelemetry.AutoInstrumentation.Native.dylib` |
|
||||
| `CORECLR_PROFILER_PATH_32` | .NET on Windows | `$INSTALL_DIR/win-x86/OpenTelemetry.AutoInstrumentation.Native.dll` |
|
||||
| `CORECLR_PROFILER_PATH_64` | .NET on Windows | `$INSTALL_DIR/win-x64/OpenTelemetry.AutoInstrumentation.Native.dll` |
|
||||
| `DOTNET_ADDITIONAL_DEPS` | .NET | `$INSTALL_DIR/AdditionalDeps` |
|
||||
| `DOTNET_SHARED_STORE` | .NET | `$INSTALL_DIR/store` |
|
||||
| `DOTNET_STARTUP_HOOKS` | .NET | `$INSTALL_DIR/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll` |
|
||||
| `OTEL_DOTNET_AUTO_HOME` | All versions | `$INSTALL_DIR` |
|
||||
|
||||
> [!NOTE]
|
||||
> Some settings can be omitted on .NET. For more information, see [config.md](config.md#net-clr-profiler).
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Starting in .NET 8, the environment variable `DOTNET_EnableDiagnostics=0` disables all diagnostics, including the CLR Profiler facility which is needed to launch the instrumentation, if not using .NET Startup hooks. Ensure that `DOTNET_EnableDiagnostics=1`, or if you'd like to limit diagnostics only to the CLR Profiler, you may set both `DOTNET_EnableDiagnostics=1` and `DOTNET_EnableDiagnostics_Profiler=1` while setting other diagnostics features to 0. See this [issue](https://github.com/dotnet/runtime/issues/96227#issuecomment-1865326080) for more guidance.
|
||||
|
||||
### Shell scripts
|
||||
|
||||
You can install OpenTelemetry .NET Automatic Instrumentation
|
||||
and instrument your .NET application using the provided Shell scripts.
|
||||
|
||||
> [!NOTE]
|
||||
> On macOS [`coreutils`](https://formulae.brew.sh/formula/coreutils) is required.
|
||||
|
||||
Example usage:
|
||||
|
||||
```sh
|
||||
# Download the bash script
|
||||
curl -sSfL https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v0.6.0-beta.1/otel-dotnet-auto-install.sh -O
|
||||
curl -sSfL https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v1.12.0/otel-dotnet-auto-install.sh -O
|
||||
|
||||
# Install core files
|
||||
sh ./otel-dotnet-auto-install.sh
|
||||
|
||||
# Enable execution for the instrumentation script
|
||||
chmod +x $HOME/.otel-dotnet-auto/instrument.sh
|
||||
|
||||
# Setup the instrumentation for the current shell session
|
||||
. $HOME/.otel-dotnet-auto/instrument.sh
|
||||
|
||||
|
@ -150,15 +200,32 @@ sh ./otel-dotnet-auto-install.sh
|
|||
OTEL_SERVICE_NAME=myapp OTEL_RESOURCE_ATTRIBUTES=deployment.environment=staging,service.version=1.0.0 ./MyNetApp
|
||||
```
|
||||
|
||||
[otel-dotnet-auto-install.sh](../otel-dotnet-auto-install.sh) script
|
||||
NOTE: for air-gapped environments you can provide either the installation archive directly with:
|
||||
|
||||
```sh
|
||||
LOCAL_PATH=<PATH_TO_ARCHIVE> sh ./otel-dotnet-auto-install.sh
|
||||
```
|
||||
|
||||
or the folder with the archives, this has the added benefit that the install script will determine
|
||||
the correct archive to choose.
|
||||
|
||||
```sh
|
||||
DOWNLOAD_DIR=<PATH_TO_FOLDER_WITH_ARCHIVES> sh ./otel-dotnet-auto-install.sh
|
||||
```
|
||||
|
||||
|
||||
`otel-dotnet-auto-install.sh` script
|
||||
uses environment variables as parameters:
|
||||
|
||||
| Parameter | Description | Required | Default value |
|
||||
|-------------------------|------------------------------------------------------------------|----------|---------------------------|
|
||||
| `OTEL_DOTNET_AUTO_HOME` | Location where binaries are to be installed | No | `$HOME/.otel-dotnet-auto` |
|
||||
| `OS_TYPE` | Possible values: `linux-glibc`, `linux-musl`, `macos`, `windows` | No | *Calculated* |
|
||||
| `TMPDIR` | Temporary directory used when downloading the files | No | `$(mktemp -d)` |
|
||||
| `VERSION` | Version to download | No | `v0.6.0-beta.1` |
|
||||
| Parameter | Description | Required | Default value |
|
||||
|-------------------------|---------------------------------------------------------------------------------|----------|-----------------------------|
|
||||
| `OTEL_DOTNET_AUTO_HOME` | Location where binaries are to be installed | No | `$HOME/.otel-dotnet-auto` |
|
||||
| `OS_TYPE` | Possible values: `linux-glibc`, `linux-musl`, `macos`, `windows` | No | *Calculated* |
|
||||
| `ARCHITECTURE` | Possible values for Linux: `x64`, `arm64` | No | *Calculated* |
|
||||
| `TMPDIR` | (deprecated) prefer `DOWNLOAD_DIR` | No | `$(mktemp -d)` |
|
||||
| `DOWNLOAD_DIR` | Folder to download the archive to. Will use local archive if it already exists | No | `$TMPDIR` or `$(mktemp -d)` |
|
||||
| `LOCAL_PATH` | Full path the archive to use for installation. (ideal for air-gapped scenarios) | No | *Calculated* |
|
||||
| `VERSION` | Version to download | No | `1.12.0` |
|
||||
|
||||
[instrument.sh](../instrument.sh) script
|
||||
uses environment variables as parameters:
|
||||
|
@ -168,20 +235,27 @@ uses environment variables as parameters:
|
|||
| `ENABLE_PROFILING` | Whether to set the .NET CLR Profiler, possible values: `true`, `false` | No | `true` |
|
||||
| `OTEL_DOTNET_AUTO_HOME` | Location where binaries are to be installed | No | `$HOME/.otel-dotnet-auto` |
|
||||
| `OS_TYPE` | Possible values: `linux-glibc`, `linux-musl`, `macos`, `windows` | No | *Calculated* |
|
||||
|
||||
> On macOS [`coreutils`](https://formulae.brew.sh/formula/coreutils) is required.
|
||||
| `ARCHITECTURE` | Possible values for Linux: `x64`, `arm64` | No | *Calculated* |
|
||||
|
||||
### PowerShell module (Windows)
|
||||
|
||||
On Windows, you should install OpenTelemetry .NET Automatic Instrumentation
|
||||
and instrument your .NET application using the provided PowerShell module.
|
||||
|
||||
> [!WARNING]
|
||||
> The PowerShell module works only on PowerShell 5.1
|
||||
which is the one installed by default on Windows.
|
||||
|
||||
Example usage (run as administrator):
|
||||
|
||||
```powershell
|
||||
# PowerShell 5.1 is required
|
||||
#Requires -PSEdition Desktop
|
||||
|
||||
# Download the module
|
||||
$module_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v0.6.0-beta.1/OpenTelemetry.DotNet.Auto.psm1"
|
||||
$module_url = "https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v1.12.0/OpenTelemetry.DotNet.Auto.psm1"
|
||||
$download_path = Join-Path $env:temp "OpenTelemetry.DotNet.Auto.psm1"
|
||||
Invoke-WebRequest -Uri $module_url -OutFile $download_path
|
||||
Invoke-WebRequest -Uri $module_url -OutFile $download_path -UseBasicParsing
|
||||
|
||||
# Import the module to use its functions
|
||||
Import-Module $download_path
|
||||
|
@ -207,8 +281,41 @@ Get-Command -Module OpenTelemetry.DotNet.Auto
|
|||
Get-Help Install-OpenTelemetryCore -Detailed
|
||||
```
|
||||
|
||||
⚠️ The PowerShell module works only on PowerShell 5.1
|
||||
which is the one installed by default on Windows.
|
||||
Updating OpenTelemetry installation:
|
||||
|
||||
```powershell
|
||||
# Import the previously downloaded module. After an update the module is found in the default install directory.
|
||||
# Note: It's best to use the same version of the module for installation and uninstallation to ensure proper removal.
|
||||
Import-Module "C:\Program Files\OpenTelemetry .NET AutoInstrumentation\OpenTelemetry.DotNet.Auto.psm1"
|
||||
|
||||
# If IIS was previously registered, use RegisterIIS = $true.
|
||||
Update-OpenTelemetryCore -RegisterIIS $true
|
||||
|
||||
# If Windows services were previously registered, these must be re-registered manually.
|
||||
Unregister-OpenTelemetryForWindowsService -WindowsServiceName MyServiceName
|
||||
Update-OpenTelemetryCore
|
||||
Register-OpenTelemetryForWindowsService -WindowsServiceName MyServiceName -OTelServiceName MyOtelServiceName
|
||||
```
|
||||
|
||||
Uninstalling OpenTelemetry:
|
||||
|
||||
```powershell
|
||||
# PowerShell 5.1 is required
|
||||
#Requires -PSEdition Desktop
|
||||
|
||||
# Import the previously downloaded module. After installation or an update the module is found in the default install directory.
|
||||
# Note: It's best to use the same version of the module for installation and uninstallation to ensure proper removal.
|
||||
Import-Module "C:\Program Files\OpenTelemetry .NET AutoInstrumentation\OpenTelemetry.DotNet.Auto.psm1"
|
||||
|
||||
# If IIS was previously registered, unregister it.
|
||||
Unregister-OpenTelemetryForIIS
|
||||
|
||||
# If Windows services were previously registered, unregister them.
|
||||
Unregister-OpenTelemetryForWindowsService -WindowsServiceName MyServiceName
|
||||
|
||||
# Finally, uninstall OpenTelemetry instrumentation
|
||||
Uninstall-OpenTelemetryCore
|
||||
```
|
||||
|
||||
## Instrument a container
|
||||
|
||||
|
@ -234,6 +341,10 @@ See [config.md](config.md).
|
|||
|
||||
See [manual-instrumentation.md](manual-instrumentation.md).
|
||||
|
||||
## Log to trace correlation
|
||||
|
||||
See [log-trace-correlation.md](log-trace-correlation.md).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
See [troubleshooting.md](troubleshooting.md).
|
||||
|
@ -248,29 +359,31 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|||
|
||||
## Community Roles
|
||||
|
||||
[Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer)
|
||||
([@open-telemetry/dotnet-instrumentation-maintainers](https://github.com/orgs/open-telemetry/teams/dotnet-instrumentation-maintainers)):
|
||||
### Maintainers
|
||||
|
||||
- [Chris Ventura](https://github.com/nrcventura), New Relic
|
||||
- [Paulo Janotti](https://github.com/pjanotti), Splunk
|
||||
- [Piotr Kiełkowicz](https://github.com/Kielek), Splunk
|
||||
- [Rajkumar Rangaraj](https://github.com/rajkumar-rangaraj), Microsoft
|
||||
- [Robert Pająk](https://github.com/pellared), Splunk
|
||||
- [Zach Montoya](https://github.com/zacharycmontoya), Datadog
|
||||
|
||||
[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
|
||||
([@open-telemetry/dotnet-instrumentation-approvers](https://github.com/orgs/open-telemetry/teams/dotnet-instrumentation-approvers)):
|
||||
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
|
||||
|
||||
### Approvers
|
||||
|
||||
- [Mateusz Łach](https://github.com/lachmatt), Splunk
|
||||
- [Rasmus Kuusmann](https://github.com/RassK), 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/community-membership.md#approver).
|
||||
|
||||
### Emeritus Maintainer/Approver/Triager
|
||||
|
||||
- [Colin Higgins](https://github.com/colin-higgins)
|
||||
- [Greg Paperin](https://github.com/macrogreg)
|
||||
- [Kevin Gosse](https://github.com/kevingosse)
|
||||
- [Lucas Pimentel-Ordyna](https://github.com/lucaspimentel)
|
||||
- [Mike Goldsmith](https://github.com/MikeGoldsmith)
|
||||
- [Paulo Janotti](https://github.com/pjanotti)
|
||||
- [Tony Redondo](https://github.com/tonyredondo)
|
||||
|
||||
Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md).
|
||||
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).
|
||||
|
|
414
docs/config.md
414
docs/config.md
|
@ -20,10 +20,11 @@ with environment variables taking precedence over `App.config` or `Web.config` f
|
|||
|
||||
- `OTEL_DOTNET_AUTO_HOME`
|
||||
- `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES`
|
||||
- `OTEL_DOTNET_AUTO_INTEGRATIONS_FILE`
|
||||
- `OTEL_DOTNET_AUTO_[TRACES|METRICS|LOGS]_[ENABLED|DISABLED]_INSTRUMENTATIONS`
|
||||
- `OTEL_DOTNET_AUTO_FAIL_FAST_ENABLED`
|
||||
- `OTEL_DOTNET_AUTO_[TRACES|METRICS|LOGS]_INSTRUMENTATION_ENABLED`
|
||||
- `OTEL_DOTNET_AUTO_[TRACES|METRICS|LOGS]_{INSTRUMENTATION_ID}_INSTRUMENTATION_ENABLED`
|
||||
- `OTEL_DOTNET_AUTO_LOG_DIRECTORY`
|
||||
- `OTEL_DOTNET_AUTO_DEBUG`
|
||||
- `OTEL_LOG_LEVEL`
|
||||
- `OTEL_DOTNET_AUTO_NETFX_REDIRECT_ENABLED`
|
||||
|
||||
Example with `OTEL_SERVICE_NAME` setting:
|
||||
|
@ -36,6 +37,14 @@ with environment variables taking precedence over `App.config` or `Web.config` f
|
|||
</configuration>
|
||||
```
|
||||
|
||||
3. Service name automatic detection
|
||||
|
||||
If no service name is explicitly configured one will be generated for you.
|
||||
This can be helpful in some circumstances.
|
||||
- If the application is hosted on IIS in .NET Framework this will be
|
||||
`SiteName\VirtualPath` ex: `MySite\MyApp`
|
||||
- If that is not the case it will use the name of the application [entry Assembly](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assembly.getentryassembly?view=net-7.0).
|
||||
|
||||
By default we recommend using environment variables for configuration.
|
||||
However, if given setting supports it, then:
|
||||
|
||||
|
@ -44,21 +53,50 @@ However, if given setting supports it, then:
|
|||
|
||||
## Global settings
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||
| `OTEL_DOTNET_AUTO_HOME` | Installation location. | |
|
||||
| `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES` | Names of the executable files that the profiler cannot instrument. Supports multiple comma-separated values, for example: `ReservedProcess.exe,powershell.exe`. If unset, the profiler attaches to all processes by default. | |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_HOME` | Installation location. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES` | Names of the executable files that the profiler cannot instrument. Supports multiple comma-separated values, for example: `ReservedProcess.exe,powershell.exe`. If unset, the profiler attaches to all processes by default. \[1\]\[2\] | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_FAIL_FAST_ENABLED` | Enables possibility to fail process when automatic instrumentation cannot be executed. It is designed for debugging purposes. It should not be used in production environment. \[1\] | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_LOGGER` | AutoInstrumentation diagnostic logs sink. (supported values: `none`,`file`,`console`) | `file` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_LOG_LEVEL` | SDK log level. (supported values: `none`,`error`,`warn`,`info`,`debug`) | `info` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
\[1\] If `OTEL_DOTNET_AUTO_FAIL_FAST_ENABLED` is set to `true` then processes
|
||||
excluded from instrumentation by `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES` will fail
|
||||
instead of silently continue.
|
||||
\[2\] Notice that applications launched via `dotnet MyApp.dll` have process
|
||||
name `dotnet` or `dotnet.exe`.
|
||||
|
||||
## Resources
|
||||
|
||||
A resource is the immutable representation of the entity producing the telemetry.
|
||||
See [Resource semantic conventions](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/resource/semantic_conventions)
|
||||
See [Resource semantic conventions](https://github.com/open-telemetry/semantic-conventions/tree/main/docs/resource)
|
||||
for more details.
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_RESOURCE_ATTRIBUTES` | Key-value pairs to be used as resource attributes. See [Resource SDK](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable) for more details. | See [Resource semantic conventions](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#semantic-attributes-with-sdk-provided-default-value) for details. |
|
||||
| `OTEL_SERVICE_NAME` | Sets the value of the [`service.name`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#service) resource attribute. If `service.name` is provided in `OTEL_RESOURCE_ATTRIBUTES`, the value of `OTEL_SERVICE_NAME` takes precedence. | `unknown_service:%ProcessName%` |
|
||||
### Resource attributes
|
||||
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_RESOURCE_ATTRIBUTES` | Key-value pairs to be used as resource attributes. See [Resource SDK](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable) for more details. | See [Resource semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#semantic-attributes-with-sdk-provided-default-value) for details. | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_SERVICE_NAME` | Sets the value of the [`service.name`](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#service) resource attribute. If `service.name` is provided in `OTEL_RESOURCE_ATTRIBUTES`, the value of `OTEL_SERVICE_NAME` takes precedence. | See [Service name automatic detection](#configuration-methods) under Configuration method section. | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
### Resource detectors
|
||||
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_RESOURCE_DETECTOR_ENABLED` | Enables all resource detectors. | `true` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_{0}_RESOURCE_DETECTOR_ENABLED` | Configuration pattern for enabling a specific resource detector, where `{0}` is the uppercase id of the resource detector you want to enable. Overrides `OTEL_DOTNET_AUTO_RESOURCE_DETECTOR_ENABLED`. | `true` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
The following resource detectors are included and enabled by default:
|
||||
|
||||
| ID | Description | Documentation | Status |
|
||||
|-------------------|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `AZUREAPPSERVICE` | Azure App Service detector | [Azure resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Resources.Azure-1.0.0-beta.9/src/OpenTelemetry.Resources.Azure/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `CONTAINER` | Container detector | [Container resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Resources.Container-1.0.0-beta.9/src/OpenTelemetry.Resources.Container/README.md) **Not supported on .NET Framework** | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `HOST` | Host detector | [Host resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Resources.Host-0.1.0-beta.3/src/OpenTelemetry.Resources.Host/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OPERATINGSYSTEM` | Operating System detector | [Operating System resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Resources.OperatingSystem-0.1.0-alpha.4/src/OpenTelemetry.Resources.OperatingSystem/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `PROCESS` | Process detector | [Process resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Resources.Process-0.1.0-beta.3/src/OpenTelemetry.Resources.Process/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `PROCESSRUNTIME` | Process Runtime detector | [Process Runtime resource detector documentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Resources.ProcessRuntime-0.1.0-beta.2/src/OpenTelemetry.Resources.ProcessRuntime/README.md) | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
## Instrumentations
|
||||
|
||||
|
@ -75,78 +113,130 @@ the `OTEL_DOTNET_AUTO_{SIGNAL}_{0}_INSTRUMENTATION_ENABLED`
|
|||
environment variable to `false`, where `{SIGNAL}` is the type of signal,
|
||||
for example `TRACES`, and `{0}` is the case-sensitive name of the instrumentation.
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|--------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_INTEGRATIONS_FILE` | List of bytecode instrumentations JSON configuration filepaths, delimited by the platform-specific path separator (`;` on Windows, `:` on Linux and macOS). For example: `%ProfilerDirectory%/integrations.json`. It is required for bytecode instrumentations. | |
|
||||
| `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED` | Disables all instrumentations. | `true` |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED` | Disables all trace instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED` |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_{0}_INSTRUMENTATION_ENABLED` | Configuration pattern for enabling or disabling a specific trace instrumentation, where `{0}` is the uppercase id of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED` |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED` | Disables all metric instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED` |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_{0}_INSTRUMENTATION_ENABLED` | Configuration pattern for enabling or disabling a specific metric instrumentation, where `{0}` is the uppercase id of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED` |
|
||||
| `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED` | Disables all log instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED` |
|
||||
| `OTEL_DOTNET_AUTO_LOGS_{0}_INSTRUMENTATION_ENABLED` | Configuration pattern for enabling or disabling a specific log instrumentation, where `{0}` is the uppercase id of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED` |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|--------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED` | Enables all instrumentations. | `true` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED` | Enables all trace instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_{0}_INSTRUMENTATION_ENABLED` | Configuration pattern for enabling a specific trace instrumentation, where `{0}` is the uppercase id of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_TRACES_INSTRUMENTATION_ENABLED` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED` | Disables all metric instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_{0}_INSTRUMENTATION_ENABLED` | Configuration pattern for enabling a specific metric instrumentation, where `{0}` is the uppercase id of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_METRICS_INSTRUMENTATION_ENABLED` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED` | Disables all log instrumentations. Overrides `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_LOGS_{0}_INSTRUMENTATION_ENABLED` | Configuration pattern for enabling a specific log instrumentation, where `{0}` is the uppercase id of the instrumentation you want to enable. Overrides `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED`. | Inherited from the current value of `OTEL_DOTNET_AUTO_LOGS_INSTRUMENTATION_ENABLED` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
### Traces instrumentations
|
||||
|
||||
| ID | Instrumented library | Supported versions | Instrumentation type |
|
||||
|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|-------------------------|
|
||||
| `ASPNET` | ASP.NET (.NET Framework) MVC / WebApi \[1\] **Not supported on .NET** | * | source |
|
||||
| `ASPNETCORE` | ASP.NET Core **Not supported on .NET Framework** | * | source |
|
||||
| `ELASTICSEARCH` | [Elastic.Clients.Elasticsearch](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch) | ≥8.0.0 | source |
|
||||
| `ENTITYFRAMEWORKCORE` | [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/) **Not supported on .NET Framework** | ≥6.0.12 | source |
|
||||
| `GRAPHQL` | [GraphQL](https://www.nuget.org/packages/GraphQL) | ≥2.3.0 & < 3.0.0 | bytecode |
|
||||
| `GRPCNETCLIENT` | [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) | ≥2.43.0 & < 3.0.0 | source |
|
||||
| `HTTPCLIENT` | [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) and [System.Net.HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | * | source |
|
||||
| `QUARTZ` | [Quartz](https://www.nuget.org/packages/Quartz) **Not supported on .NET Framework 4.7.1 and older** | ≥3.4.0 | source |
|
||||
| `MASSTRANSIT` | [MassTransit](https://www.nuget.org/packages/MassTransit) **Not supported on .NET Framework** | ≥8.0.0 | source |
|
||||
| `MONGODB` | [MongoDB.Driver.Core](https://www.nuget.org/packages/MongoDB.Driver.Core) **Not supported on .NET Framework** | ≥2.13.3 & < 3.0.0 | source & bytecode |
|
||||
| `MYSQLDATA` | [MySql.Data](https://www.nuget.org/packages/MySql.Data) **Not supported on .NET Framework** | ≥6.10.7 | source & bytecode \[2\] |
|
||||
| `NPGSQL` | [Npgsql](https://www.nuget.org/packages/Npgsql) | ≥6.0.0 | source |
|
||||
| `NSERVICEBUS` | [NServiceBus](https://www.nuget.org/packages/NServiceBus) | ≥8.0.0 | source & bytecode |
|
||||
| `SQLCLIENT` | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | * | source |
|
||||
| `STACKEXCHANGEREDIS` | [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis) **Not supported on .NET Framework** | ≥2.0.405 < 3.0.0 | source & bytecode |
|
||||
| `WCF` | [System.ServiceModel](https://www.nuget.org/packages/System.ServiceModel) **No support for server side on .NET**. For configuration see [WCF Instrumentation Configuration](wcf-config.md) | * \[3\] | source |
|
||||
**Status**: [Mixed](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md).
|
||||
Traces are stable, but particular instrumentation are in Experimental status
|
||||
due to lack of stable semantic convention.
|
||||
|
||||
| ID | Instrumented library | Supported versions | Instrumentation type | Status |
|
||||
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `ASPNET` | ASP.NET (.NET Framework) MVC / WebApi \[1\] **Not supported on .NET** | * \[2\] | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `ASPNETCORE` | ASP.NET Core **Not supported on .NET Framework** | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `AZURE` | [Azure SDK](https://azure.github.io/azure-sdk/releases/latest/index.html) | \[3\] | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `ELASTICSEARCH` | [Elastic.Clients.Elasticsearch](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch) | * \[4\] | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `ELASTICTRANSPORT` | [Elastic.Transport](https://www.nuget.org/packages/Elastic.Transport) | ≥0.4.16 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `ENTITYFRAMEWORKCORE` | [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) **Not supported on .NET Framework** | ≥6.0.12 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `GRAPHQL` | [GraphQL](https://www.nuget.org/packages/GraphQL) **Not supported on .NET Framework** | ≥7.5.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `GRPCNETCLIENT` | [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) | ≥2.52.0 & < 3.0.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `HTTPCLIENT` | [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) and [System.Net.HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `KAFKA` | [Confluent.Kafka](https://www.nuget.org/packages/Confluent.Kafka) | ≥1.4.0 & < 3.0.0 \[5\] | bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `MASSTRANSIT` | [MassTransit](https://www.nuget.org/packages/MassTransit) **Not supported on .NET Framework** | ≥8.0.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `MONGODB` | [MongoDB.Driver.Core](https://www.nuget.org/packages/MongoDB.Driver.Core) / [MongoDB.Driver](https://www.nuget.org/packages/MongoDB.Driver) | ≥2.7.0 < 4.0.0 | bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `MYSQLCONNECTOR` | [MySqlConnector](https://www.nuget.org/packages/MySqlConnector) | ≥2.0.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `MYSQLDATA` | [MySql.Data](https://www.nuget.org/packages/MySql.Data) **Not supported on .NET Framework** | ≥8.1.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `NPGSQL` | [Npgsql](https://www.nuget.org/packages/Npgsql) | ≥6.0.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `NSERVICEBUS` | [NServiceBus](https://www.nuget.org/packages/NServiceBus) | ≥8.0.0 & < 10.0.0 | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `ORACLEMDA` | [Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core) and [Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess) **Not supported on ARM64** | ≥23.4.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `RABBITMQ` | [RabbitMQ.Client](https://www.nuget.org/packages/RabbitMQ.Client/) | ≥5.0.0 | source or bytecode \[6\] | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `QUARTZ` | [Quartz](https://www.nuget.org/packages/Quartz) **Not supported on .NET Framework 4.7.1 and older** | ≥3.4.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `SQLCLIENT` | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient), [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) \[7\] and `System.Data` (shipped with .NET Framework) | * \[8\] | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `STACKEXCHANGEREDIS` | [StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis) **Not supported on .NET Framework** | ≥2.6.122 & < 3.0.0 | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `WCFCLIENT` | WCF | * | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `WCFSERVICE` | WCF **Not supported on .NET**. | * | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
\[1\]: Only integrated pipeline mode is supported.
|
||||
|
||||
\[2\]: MySql.Data 8.0.31 and higher requires bytecode instrumentation.
|
||||
\[2\]: `ASP.NET (.NET Framework) MVC / WebApi` is not supported on ARM64.
|
||||
|
||||
\[3\]: On .NET it supports [System.ServiceModel.Primitives](https://www.nuget.org/packages/System.ServiceModel.Primitives)
|
||||
≥ 4.7.0.
|
||||
\[3\]: `Azure.` prefixed packages, released after October 1, 2021.
|
||||
|
||||
\[4\]: `Elastic.Clients.Elasticsearch` version ≥8.0.0 and <8.10.0.
|
||||
Version ≥8.10.0 is supported by `Elastic.Transport` instrumentation.
|
||||
|
||||
\[5\]: `Confluent.Kafka` is supported from version ≥1.8.2 on ARM64.
|
||||
|
||||
\[6\]: `RabbitMq.Client` needs bytecode instrumentation only for `5.*` and `6.*`
|
||||
versions, `7.0.0+` uses only source instrumentation.
|
||||
|
||||
\[7\]: `System.Data.SqlClient` is [deprecated](https://www.nuget.org/packages/System.Data.SqlClient/4.9.0#readme-body-tab).
|
||||
|
||||
\[8\]: `Microsoft.Data.SqlClient` v3.* is not supported on .NET Framework,
|
||||
due to [issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/4243).
|
||||
`System.Data.SqlClient` is supported from version 4.8.5.
|
||||
|
||||
### Metrics instrumentations
|
||||
|
||||
| ID | Instrumented library | Supported versions | Instrumentation type |
|
||||
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|----------------------|
|
||||
| `ASPNET` | ASP.NET Framework \[1\] **Not supported on .NET** | * | source |
|
||||
| `ASPNETCORE` | ASP.NET Core \[2\] **Not supported on .NET Framework** | * | source |
|
||||
| `HTTPCLIENT` | [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) and [System.Net.HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | * | source |
|
||||
| `NETRUNTIME` | [OpenTelemetry.Instrumentation.Runtime](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) | * | source |
|
||||
| `PROCESS` | [OpenTelemetry.Instrumentation.Process](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Process) | * | source |
|
||||
| `NSERVICEBUS` | [NServiceBus](https://www.nuget.org/packages/NServiceBus) | ≥8.0.0 | source & bytecode |
|
||||
**Status**: [Mixed](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md).
|
||||
Metrics are stable, but particular instrumentation are in Experimental status
|
||||
due to lack of stable semantic convention.
|
||||
|
||||
| ID | Instrumented library | Documentation | Supported versions | Instrumentation type | Status |
|
||||
|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `ASPNET` | ASP.NET Framework \[1\] **Not supported on .NET** | [ASP.NET metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNet-1.12.0-beta.1/src/OpenTelemetry.Instrumentation.AspNet/README.md#list-of-metrics-produced) | * | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `ASPNETCORE` | ASP.NET Core **Not supported on .NET Framework** | [ASP.NET Core metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNetCore-1.12.0/src/OpenTelemetry.Instrumentation.AspNetCore/README.md#list-of-metrics-produced) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `HTTPCLIENT` | [System.Net.Http.HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) and [System.Net.HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | [HttpClient metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Http-1.12.0/src/OpenTelemetry.Instrumentation.Http/README.md#list-of-metrics-produced) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `NETRUNTIME` | [OpenTelemetry.Instrumentation.Runtime](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Runtime) | [Runtime metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Runtime-1.12.0/src/OpenTelemetry.Instrumentation.Runtime/README.md#metrics) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `NPGSQL` | [Npgsql](https://www.nuget.org/packages/Npgsql) **Not supported on .NET Framework** | [Npgsql metrics](https://www.npgsql.org/doc/diagnostics/metrics.html) | ≥6.0.0 | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `NSERVICEBUS` | [NServiceBus](https://www.nuget.org/packages/NServiceBus) | [NServiceBus metrics](https://docs.particular.net/samples/open-telemetry/prometheus-grafana/#reporting-metric-values) | ≥8.0.0 & < 10.0.0 | source & bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `PROCESS` | [OpenTelemetry.Instrumentation.Process](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Process) | [Process metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Process-1.12.0-beta.1/src/OpenTelemetry.Instrumentation.Process/README.md#metrics) | * | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `SQLCLIENT` | [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient), [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) \[2\] and `System.Data` (shipped with .NET Framework) | [SqlClient metrics](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/releases/tag/Instrumentation.SqlClient-1.12.0-beta.2) | * \[3\] | source | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
\[1\]: The ASP.NET metrics are generated only if the `AspNet` trace instrumentation
|
||||
is also enabled.
|
||||
|
||||
\[2\]: This instrumentation automatically enables the
|
||||
`Microsoft.AspNetCore.Hosting.HttpRequestIn` spans.
|
||||
\[2\]: `System.Data.SqlClient` is [deprecated](https://www.nuget.org/packages/System.Data.SqlClient/4.9.0#readme-body-tab).
|
||||
|
||||
\[3\]: `Microsoft.Data.SqlClient` v3.* is not supported on .NET Framework,
|
||||
due to [issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/4243).
|
||||
`System.Data.SqlClient` is supported from version 4.8.5.
|
||||
|
||||
### Logs instrumentations
|
||||
|
||||
| ID | Instrumented library | Supported versions | Instrumentation type |
|
||||
|---------|---------------------------------------------------------------------------------------------------------------------------------|--------------------|------------------------|
|
||||
| ILOGGER | [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) **Not supported on .NET Framework** | ≥6.0.0 | bytecode or source [1] |
|
||||
**Status**: [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md).
|
||||
|
||||
**[1]**: For ASP.NET Core applications, the `LoggingBuilder` instrumentation
|
||||
| ID | Instrumented library | Supported versions | Instrumentation type | Status |
|
||||
|-----------|---------------------------------------------------------------------------------------------------------------------------------|--------------------|------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `ILOGGER` | [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging) **Not supported on .NET Framework** | ≥9.0.0 | bytecode or source \[1\] | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `LOG4NET` | [log4net](https://www.nuget.org/packages/log4net) \[2\] | ≥2.0.13 && < 4.0.0 | bytecode | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
\[1\]: For ASP.NET Core applications, the `LoggingBuilder` instrumentation
|
||||
can be enabled without using the .NET CLR Profiler by setting
|
||||
the `ASPNETCORE_HOSTINGSTARTUPASSEMBLIES` environment variable to
|
||||
`OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper`.
|
||||
|
||||
\[2\]: Instrumentation provides both [trace context injection](./log-trace-correlation.md#log4net-trace-context-injection)
|
||||
and [logs bridge](./log4net-bridge.md).
|
||||
|
||||
### Instrumentation options
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||
| `OTEL_DOTNET_AUTO_GRAPHQL_SET_DOCUMENT` | Whether GraphQL instrumentation can pass raw queries as `graphql.document` attribute. This may contain sensitive information and therefore is disabled by default. | `false` |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_ENTITYFRAMEWORKCORE_SET_DBSTATEMENT_FOR_TEXT` | Whether the Entity Framework Core instrumentation can pass SQL statements through the `db.statement` attribute. Queries might contain sensitive information. If set to `false`, `db.statement` is recorded only for executing stored procedures. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_GRAPHQL_SET_DOCUMENT` | Whether the GraphQL instrumentation can pass raw queries through the `graphql.document` attribute. Queries might contain sensitive information. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_ORACLEMDA_SET_DBSTATEMENT_FOR_TEXT` | Whether the Oracle Client instrumentation can pass SQL statements through the `db.statement` attribute. Queries might contain sensitive information. If set to `false`, `db.statement` is recorded only for executing stored procedures. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_SQLCLIENT_SET_DBSTATEMENT_FOR_TEXT` | Whether the SQL Client instrumentation can pass SQL statements through the `db.statement` attribute. Queries might contain sensitive information. If set to `false`, `db.statement` is recorded only for executing stored procedures. **Not supported on .NET Framework for System.Data.SqlClient.** | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS` | A comma-separated list of HTTP header names. ASP.NET instrumentations will capture HTTP request header values for all configured header names. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS` | A comma-separated list of HTTP header names. ASP.NET instrumentations will capture HTTP response header values for all configured header names. **Not supported on IIS Classic mode.** | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS` | A comma-separated list of HTTP header names. ASP.NET Core instrumentations will capture HTTP request header values for all configured header names. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS` | A comma-separated list of HTTP header names. ASP.NET Core instrumentations will capture HTTP response header values for all configured header names. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_GRPCNETCLIENT_INSTRUMENTATION_CAPTURE_REQUEST_METADATA` | A comma-separated list of gRPC metadata names. Grpc.Net.Client instrumentations will capture gRPC request metadata values for all configured metadata names. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_GRPCNETCLIENT_INSTRUMENTATION_CAPTURE_RESPONSE_METADATA` | A comma-separated list of gRPC metadata names. Grpc.Net.Client instrumentations will capture gRPC response metadata values for all configured metadata names. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_HTTP_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS` | A comma-separated list of HTTP header names. HTTP Client instrumentations will capture HTTP request header values for all configured header names. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_HTTP_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS` | A comma-separated list of HTTP header names. HTTP Client instrumentations will capture HTTP response header values for all configured header names. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_DISABLE_URL_QUERY_REDACTION` | Whether the ASP.NET Core instrumentation turns off redaction of the `url.query` attribute value. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_EXPERIMENTAL_HTTPCLIENT_DISABLE_URL_QUERY_REDACTION` | Whether the HTTP client instrumentation turns off redaction of the `url.full` attribute value. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_EXPERIMENTAL_ASPNET_DISABLE_URL_QUERY_REDACTION` | Whether the ASP.NET instrumentation turns off redaction of the `url.query` attribute value. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
## Propagators
|
||||
|
||||
|
@ -165,10 +255,10 @@ to collect and export.
|
|||
See [the OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.15.0/specification/sdk-environment-variables.md?plain=1#L45-L80)
|
||||
for more details.
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|---------------------------|-------------------------------------------------------|-------------------------|
|
||||
| `OTEL_TRACES_SAMPLER` | Sampler to be used for traces \[1\] | `parentbased_always_on` |
|
||||
| `OTEL_TRACES_SAMPLER_ARG` | String value to be used as the sampler argument \[2\] | |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|---------------------------|-------------------------------------------------------|-------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_TRACES_SAMPLER` | Sampler to be used for traces \[1\] | `parentbased_always_on` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_TRACES_SAMPLER_ARG` | String value to be used as the sampler argument \[2\] | | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
\[1\]: Supported values are:
|
||||
|
||||
|
@ -187,77 +277,108 @@ for more details.
|
|||
|
||||
Exporters output the telemetry.
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|-------------------------|---------------------------------------------------------------------------------------------------|---------------|
|
||||
| `OTEL_TRACES_EXPORTER` | Traces exporter to be used. The value can be one of the following: `zipkin`, `otlp`, `none`. | `otlp` |
|
||||
| `OTEL_METRICS_EXPORTER` | Metrics exporter to be used. The value can be one of the following: `otlp`, `prometheus`, `none`. | `otlp` |
|
||||
| `OTEL_LOGS_EXPORTER` | Logs exporter to be used. The value can be one of the following: `otlp`, `none`. | `otlp` |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_TRACES_EXPORTER` | Comma-separated list of exporters. Supported options: `otlp`, `zipkin`, `console`, `none`. See [the OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.35.0/specification/configuration/sdk-environment-variables.md#exporter-selection) for more details. | `otlp` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_METRICS_EXPORTER` | Comma-separated list of exporters. Supported options: `otlp`, `prometheus`, `console`, `none`. See [the OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.35.0/specification/configuration/sdk-environment-variables.md#exporter-selection) for more details. | `otlp` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_LOGS_EXPORTER` | Comma-separated list of exporters. Supported options: `otlp`, `console`, `none`. See [the OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.35.0/specification/configuration/sdk-environment-variables.md#exporter-selection) for more details. | `otlp` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
### Traces exporter
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|----------------------------------|------------------------------------------------------------------------------|---------------|
|
||||
| `OTEL_BSP_SCHEDULE_DELAY` | Delay interval (in milliseconds) between two consecutive exports. | `5000` |
|
||||
| `OTEL_BSP_EXPORT_TIMEOUT` | Maximum allowed time (in milliseconds) to export data | `30000` |
|
||||
| `OTEL_BSP_MAX_QUEUE_SIZE` | Maximum queue size. | `2048` |
|
||||
| `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` | Maximum batch size. Must be less than or equal to `OTEL_BSP_MAX_QUEUE_SIZE`. | `512` |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|----------------------------------|------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_BSP_SCHEDULE_DELAY` | Delay interval (in milliseconds) between two consecutive exports. | `5000` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_BSP_EXPORT_TIMEOUT` | Maximum allowed time (in milliseconds) to export data | `30000` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_BSP_MAX_QUEUE_SIZE` | Maximum queue size. | `2048` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` | Maximum batch size. Must be less than or equal to `OTEL_BSP_MAX_QUEUE_SIZE`. | `512` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
### Metrics exporter
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|-------------------------------|-------------------------------------------------------------------------------|---------------------------------------------------------|
|
||||
| `OTEL_METRIC_EXPORT_INTERVAL` | The time interval (in milliseconds) between the start of two export attempts. | `60000` for OTLP exporter, `10000` for console exporter |
|
||||
| `OTEL_METRIC_EXPORT_TIMEOUT` | Maximum allowed time (in milliseconds) to export data. | `30000` for OTLP exporter, none for console exporter |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|-------------------------------|-------------------------------------------------------------------------------|---------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_METRIC_EXPORT_INTERVAL` | The time interval (in milliseconds) between the start of two export attempts. | `60000` for OTLP exporter, `10000` for console exporter | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_METRIC_EXPORT_TIMEOUT` | Maximum allowed time (in milliseconds) to export data. | `30000` for OTLP exporter, none for console exporter | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
### Logs exporter
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|---------------------------------------------------|---------------------------------------------------------|---------------|
|
||||
| `OTEL_DOTNET_AUTO_LOGS_INCLUDE_FORMATTED_MESSAGE` | Whether the formatted log message should be set or not. | `false` |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|---------------------------------------------------|---------------------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_LOGS_INCLUDE_FORMATTED_MESSAGE` | Whether the formatted log message should be set or not. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
### OTLP
|
||||
|
||||
**Status**: [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md)
|
||||
|
||||
To enable the OTLP exporter, set the `OTEL_TRACES_EXPORTER`/`OTEL_METRICS_EXPORTER`/`OTEL_LOGS_EXPORTER`
|
||||
environment variable to `otlp`.
|
||||
|
||||
To customize the OTLP exporter using environment variables, see the
|
||||
[OTLP exporter documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.4.0-rc.3/src/OpenTelemetry.Exporter.OpenTelemetryProtocol#environment-variables).
|
||||
[OTLP exporter documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.12.0/src/OpenTelemetry.Exporter.OpenTelemetryProtocol#environment-variables).
|
||||
Important environment variables include:
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_EXPORTER_OTLP_ENDPOINT` | Target endpoint for the OTLP exporter. See [the OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md) for more details. | `http://localhost:4318` for the `http/protobuf` protocol, `http://localhost:4317` for the `grpc` protocol |
|
||||
| `OTEL_EXPORTER_OTLP_PROTOCOL` | OTLP exporter transport protocol. Supported values are `grpc`, `http/protobuf`. [1] | `http/protobuf` |
|
||||
| `OTEL_EXPORTER_OTLP_TIMEOUT` | The max waiting time (in milliseconds) for the backend to process each batch. | `10000` |
|
||||
| `OTEL_EXPORTER_OTLP_HEADERS` | Comma-separated list of additional HTTP headers sent with each export, for example: `Authorization=secret,X-Key=Value`. | |
|
||||
| `OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT` | Maximum allowed attribute value size. | none |
|
||||
| `OTEL_ATTRIBUTE_COUNT_LIMIT` | Maximum allowed span attribute count. | 128 |
|
||||
| `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` | Maximum allowed attribute value size. [Not applicable for metrics.](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.15.0/specification/metrics/sdk.md#attribute-limits). | none |
|
||||
| `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT` | Maximum allowed span attribute count. [Not applicable for metrics.](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.15.0/specification/metrics/sdk.md#attribute-limits). | 128 |
|
||||
| `OTEL_SPAN_EVENT_COUNT_LIMIT` | Maximum allowed span event count. | 128 |
|
||||
| `OTEL_SPAN_LINK_COUNT_LIMIT` | Maximum allowed span link count. | 128 |
|
||||
| `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT` | Maximum allowed attribute per span event count. | 128 |
|
||||
| `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT` | Maximum allowed attribute per span link count. | 128 |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|-----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_EXPORTER_OTLP_ENDPOINT` | Target endpoint for the OTLP exporter. See [the OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md) for more details. | `http/protobuf`: `http://localhost:4318`, `grpc`: `http://localhost:4317` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | Equivalent to `OTEL_EXPORTER_OTLP_ENDPOINT`, but applies only to traces. | `http/protobuf`: `http://localhost:4318/v1/traces`, `grpc`: `http://localhost:4317` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | Equivalent to `OTEL_EXPORTER_OTLP_ENDPOINT`, but applies only to metrics. | `http/protobuf`: `http://localhost:4318/v1/metrics`, `grpc`: `http://localhost:4317` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` | Equivalent to `OTEL_EXPORTER_OTLP_ENDPOINT`, but applies only to logs. | `http/protobuf`: `http://localhost:4318/v1/logs`, `grpc`: `http://localhost:4317` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_PROTOCOL` | OTLP exporter transport protocol. Supported values are `grpc`, `http/protobuf`. [1] | `http/protobuf` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` | Equivalent to `OTEL_EXPORTER_OTLP_PROTOCOL`, but applies only to traces. | `http/protobuf` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL` | Equivalent to `OTEL_EXPORTER_OTLP_PROTOCOL`, but applies only to metrics. | `http/protobuf` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_LOGS_PROTOCOL` | Equivalent to `OTEL_EXPORTER_OTLP_PROTOCOL`, but applies only to logs. | `http/protobuf` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_TIMEOUT` | The max waiting time (in milliseconds) for the backend to process each batch. | `10000` (10s) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` | Equivalent to `OTEL_EXPORTER_OTLP_TIMEOUT`, but applies only to traces. | `10000` (10s) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` | Equivalent to `OTEL_EXPORTER_OTLP_TIMEOUT`, but applies only to metrics. | `10000` (10s) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_LOGS_TIMEOUT` | Equivalent to `OTEL_EXPORTER_OTLP_TIMEOUT`, but applies only to logs. | `10000` (10s) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_HEADERS` | Comma-separated list of additional HTTP headers sent with each export, for example: `Authorization=secret,X-Key=Value`. | | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_TRACES_HEADERS` | Equivalent to `OTEL_EXPORTER_OTLP_HEADERS`, but applies only to traces. | | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_METRICS_HEADERS` | Equivalent to `OTEL_EXPORTER_OTLP_HEADERS`, but applies only to metrics. | | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_LOGS_HEADERS` | Equivalent to `OTEL_EXPORTER_OTLP_HEADERS`, but applies only to logs. | | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT` | Maximum allowed attribute value size. | none | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_ATTRIBUTE_COUNT_LIMIT` | Maximum allowed span attribute count. | 128 | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` | Maximum allowed attribute value size. [Not applicable for metrics.](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.15.0/specification/metrics/sdk.md#attribute-limits). | none | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT` | Maximum allowed span attribute count. [Not applicable for metrics.](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.15.0/specification/metrics/sdk.md#attribute-limits). | 128 | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_SPAN_EVENT_COUNT_LIMIT` | Maximum allowed span event count. | 128 | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_SPAN_LINK_COUNT_LIMIT` | Maximum allowed span link count. | 128 | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT` | Maximum allowed attribute per span event count. | 128 | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT` | Maximum allowed attribute per span link count. | 128 | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` | The aggregation temporality to use on the basis of instrument kind. [2] | `cumulative` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
**[1]**: Considerations on the `OTEL_EXPORTER_OTLP_PROTOCOL`:
|
||||
|
||||
- The OpenTelemetry .NET Automatic Instrumentation defaults to `http/protobuf`,
|
||||
which differs from the OpenTelemetry .NET SDK default value of `grpc`.
|
||||
- On .NET 6 and higher, the application must reference [`Grpc.Net.Client`](https://www.nuget.org/packages/Grpc.Net.Client/)
|
||||
- On .NET 8 and higher, the application must reference [`Grpc.Net.Client`](https://www.nuget.org/packages/Grpc.Net.Client/)
|
||||
to use the `grpc` OTLP exporter protocol. For example, by adding
|
||||
`<PackageReference Include="Grpc.Net.Client" Version="2.43.0" />` to the
|
||||
`<PackageReference Include="Grpc.Net.Client" Version="2.65.0" />` to the
|
||||
`.csproj` file.
|
||||
- On .NET Framework, the `grpc` OTLP exporter protocol is not supported.
|
||||
|
||||
**[2]**: The recognized (case-insensitive) values for `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` are:
|
||||
|
||||
- `Cumulative`: Choose cumulative aggregation temporality for all instrument kinds.
|
||||
- `Delta`: Choose Delta aggregation temporality for Counter, Asynchronous
|
||||
Counter and Histogram instrument kinds, choose Cumulative aggregation for
|
||||
UpDownCounter and Asynchronous UpDownCounter instrument kinds.
|
||||
- `LowMemory`: This configuration uses Delta aggregation temporality for
|
||||
Synchronous Counter and Histogram and uses Cumulative aggregation temporality
|
||||
for Synchronous UpDownCounter, Asynchronous Counter, and Asynchronous
|
||||
UpDownCounter instrument kinds.
|
||||
- ⚠️ This value known from [specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.35.0/specification/metrics/sdk_exporters/otlp.md?plain=1#L48)
|
||||
is not supported.
|
||||
|
||||
### Prometheus
|
||||
|
||||
> ⚠️ **Do NOT use in production.**
|
||||
**Status**: [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md)
|
||||
|
||||
> [!WARNING]
|
||||
> **Do NOT use in production.**
|
||||
>
|
||||
> Prometheus exporter is intended for the inner dev loop.
|
||||
> Production environments can use a combination of OTLP exporter
|
||||
> with [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-releases)
|
||||
> having [`otlp` receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.61.0/receiver/otlpreceiver)
|
||||
> and [`prometheus` exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/exporter/prometheusexporter).
|
||||
> having [`otlp` receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/v0.97.0/receiver/otlpreceiver)
|
||||
> and [`prometheus` exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.97.0/exporter/prometheusexporter).
|
||||
|
||||
To enable the Prometheus exporter, set the `OTEL_METRICS_EXPORTER` environment
|
||||
variable to `prometheus`.
|
||||
|
@ -266,36 +387,54 @@ The exporter exposes the metrics HTTP endpoint on `http://localhost:9464/metrics
|
|||
and it caches the responses for 300 milliseconds.
|
||||
|
||||
See the
|
||||
[Prometheus Exporter HttpListener documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.4.0-rc.3/src/OpenTelemetry.Exporter.Prometheus.HttpListener).
|
||||
[Prometheus Exporter HttpListener documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/coreunstable-1.12.0-beta.1/src/OpenTelemetry.Exporter.Prometheus.HttpListener).
|
||||
to learn more.
|
||||
|
||||
### Zipkin
|
||||
|
||||
**Status**: [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md)
|
||||
|
||||
To enable the Zipkin exporter, set the `OTEL_TRACES_EXPORTER` environment
|
||||
variable to `zipkin`.
|
||||
|
||||
To customize the Zipkin exporter using environment variables,
|
||||
see the [Zipkin exporter documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.4.0-rc.3/src/OpenTelemetry.Exporter.Zipkin#configuration-using-environment-variables).
|
||||
see the [Zipkin exporter documentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/core-1.12.0/src/OpenTelemetry.Exporter.Zipkin#configuration-using-environment-variables).
|
||||
Important environment variables include:
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|---------------------------------|-------------|--------------------------------------|
|
||||
| `OTEL_EXPORTER_ZIPKIN_ENDPOINT` | Zipkin URL | `http://localhost:9411/api/v2/spans` |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|---------------------------------|-------------|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_EXPORTER_ZIPKIN_ENDPOINT` | Zipkin URL | `http://localhost:9411/api/v2/spans` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
## Additional settings
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ENABLED` | Enables traces. | `true` |
|
||||
| `OTEL_DOTNET_AUTO_OPENTRACING_ENABLED` | Enables OpenTracing tracer. | `false` |
|
||||
| `OTEL_DOTNET_AUTO_LOGS_ENABLED` | Enables logs. | `true` |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_ENABLED` | Enables metrics. | `true` |
|
||||
| `OTEL_DOTNET_AUTO_NETFX_REDIRECT_ENABLED` | Enables automatic redirection of the assemblies used by the automatic instrumentation on the .NET Framework. | `true` |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES` | Comma-separated list of additional `System.Diagnostics.ActivitySource` names to be added to the tracer at the startup. Use it to capture manually instrumented spans. | |
|
||||
| `OTEL_DOTNET_AUTO_LEGACY_SOURCES` | Comma-separated list of additional legacy source names to be added to the tracer at the startup. Use it to capture `System.Diagnostics.Activity` objects created without using the `System.Diagnostics.ActivitySource` API. | |
|
||||
| `OTEL_DOTNET_AUTO_FLUSH_ON_UNHANDLEDEXCEPTION` | Controls whether the telemetry data is flushed when an [AppDomain.UnhandledException](https://docs.microsoft.com/en-us/dotnet/api/system.appdomain.unhandledexception) event is raised. Set to `true` when you suspect that you are experiencing a problem with missing telemetry data and also experiencing unhandled exceptions. | `false` |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_ADDITIONAL_SOURCES` | Comma-separated list of additional `System.Diagnostics.Metrics.Meter` names to be added to the meter at the startup. Use it to capture manually instrumented spans. | |
|
||||
| `OTEL_DOTNET_AUTO_PLUGINS` | Colon-separated list of OTel SDK instrumentation plugin types, specified with the [assembly-qualified name](https://docs.microsoft.com/en-us/dotnet/api/system.type.assemblyqualifiedname?view=net-6.0#system-type-assemblyqualifiedname). _Note: This list must be colon-separated because the type names may include commas._ See more info on how to write plugins at [plugins.md](plugins.md). | |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|-----------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ENABLED` | Enables traces. | `true` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_OPENTRACING_ENABLED` | Enables OpenTracing tracer. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_LOGS_ENABLED` | Enables logs. | `true` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_ENABLED` | Enables metrics. | `true` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_NETFX_REDIRECT_ENABLED` | Enables automatic redirection of the assemblies used by the automatic instrumentation on the .NET Framework. | `true` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES` | Comma-separated list of additional `System.Diagnostics.ActivitySource` names to be added to the tracer at the startup. Use it to capture manually instrumented spans. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_LEGACY_SOURCES` | Comma-separated list of additional legacy source names to be added to the tracer at the startup. Use it to capture `System.Diagnostics.Activity` objects created without using the `System.Diagnostics.ActivitySource` API. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_FLUSH_ON_UNHANDLEDEXCEPTION` | Controls whether the telemetry data is flushed when an [AppDomain.UnhandledException](https://docs.microsoft.com/en-us/dotnet/api/system.appdomain.unhandledexception) event is raised. Set to `true` when you suspect that you are experiencing a problem with missing telemetry data and also experiencing unhandled exceptions. | `false` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_ADDITIONAL_SOURCES` | Comma-separated list of additional `System.Diagnostics.Metrics.Meter` names to be added to the meter at the startup. Use it to capture manually created metrics. | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_DOTNET_AUTO_PLUGINS` | Colon-separated list of OTel SDK instrumentation plugin types, specified with the [assembly-qualified name](https://docs.microsoft.com/en-us/dotnet/api/system.type.assemblyqualifiedname?view=net-6.0#system-type-assemblyqualifiedname). *Note: This list must be colon-separated because the type names may include commas.* See more info on how to write plugins at [plugins.md](plugins.md). | | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
## RuleEngine
|
||||
|
||||
RuleEngine is a feature that validates OpenTelemetry API, SDK,
|
||||
Instrumentation, and Exporter assemblies for unsupported scenarios,
|
||||
ensuring that OpenTelemetry automatic instrumentation is more
|
||||
stable by backing of instead of crashing. It works on .NET 8 and higher.
|
||||
|
||||
Enable RuleEngine only during the first run of the application,
|
||||
or when the deployment changes or the Automatic Instrumentation
|
||||
library is upgraded. Once validated, there's no need to revalidate
|
||||
the rules when the application restarts.
|
||||
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|----------------------------------------|---------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_RULE_ENGINE_ENABLED` | Enables RuleEngine. | `true` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
## .NET CLR Profiler
|
||||
|
||||
|
@ -304,13 +443,13 @@ environment variables to set up the profiler. See
|
|||
[.NET Runtime Profiler Loading](https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/profiling/Profiler%20Loading.md)
|
||||
for more information.
|
||||
|
||||
| .NET Framework environment variable | .NET environment variable | Description | Required value |
|
||||
|-------------------------------------|----------------------------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `COR_ENABLE_PROFILING` | `CORECLR_ENABLE_PROFILING` | Enables the profiler. | `1` |
|
||||
| `COR_PROFILER` | `CORECLR_PROFILER` | CLSID of the profiler. | `{918728DD-259F-4A6A-AC2B-B85E1B658318}` |
|
||||
| `COR_PROFILER_PATH` | `CORECLR_PROFILER_PATH` | Path to the profiler. | `$INSTALL_DIR/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so` for Linux glibc, `$INSTALL_DIR/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so` for Linux musl, `$INSTALL_DIR/osx-x64/OpenTelemetry.AutoInstrumentation.Native.dylib` for macOS |
|
||||
| `COR_PROFILER_PATH_32` | `CORECLR_PROFILER_PATH_32` | Path to the 32-bit profiler. Bitness-specific paths take precedence over generic paths. | `$INSTALL_DIR/win-x86/OpenTelemetry.AutoInstrumentation.Native.dll` for Windows |
|
||||
| `COR_PROFILER_PATH_64` | `CORECLR_PROFILER_PATH_64` | Path to the 64-bit profiler. Bitness-specific paths take precedence over generic paths. | `$INSTALL_DIR/win-x64/OpenTelemetry.AutoInstrumentation.Native.dll` for Windows |
|
||||
| .NET Framework environment variable | .NET environment variable | Description | Required value | Status |
|
||||
|-------------------------------------|----------------------------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `COR_ENABLE_PROFILING` | `CORECLR_ENABLE_PROFILING` | Enables the profiler. | `1` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `COR_PROFILER` | `CORECLR_PROFILER` | CLSID of the profiler. | `{918728DD-259F-4A6A-AC2B-B85E1B658318}` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `COR_PROFILER_PATH` | `CORECLR_PROFILER_PATH` | Path to the profiler. | `$INSTALL_DIR/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so` for Linux glibc, `$INSTALL_DIR/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so` for Linux musl, `$INSTALL_DIR/osx-x64/OpenTelemetry.AutoInstrumentation.Native.dylib` for macOS | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `COR_PROFILER_PATH_32` | `CORECLR_PROFILER_PATH_32` | Path to the 32-bit profiler. Bitness-specific paths take precedence over generic paths. | `$INSTALL_DIR/win-x86/OpenTelemetry.AutoInstrumentation.Native.dll` for Windows | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `COR_PROFILER_PATH_64` | `CORECLR_PROFILER_PATH_64` | Path to the 64-bit profiler. Bitness-specific paths take precedence over generic paths. | `$INSTALL_DIR/win-x64/OpenTelemetry.AutoInstrumentation.Native.dll` for Windows | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
Setting OpenTelemetry .NET Automatic Instrumentation as a .NET CLR Profiler
|
||||
is required for .NET Framework.
|
||||
|
@ -329,7 +468,6 @@ CORECLR_PROFILER
|
|||
CORECLR_PROFILER_PATH
|
||||
CORECLR_PROFILER_PATH_32
|
||||
CORECLR_PROFILER_PATH_64
|
||||
OTEL_DOTNET_AUTO_INTEGRATIONS_FILE
|
||||
```
|
||||
|
||||
## .NET Runtime
|
||||
|
@ -342,11 +480,11 @@ The [`DOTNET_ADDITIONAL_DEPS`](https://github.com/dotnet/runtime/blob/main/docs/
|
|||
and [`DOTNET_SHARED_STORE`](https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store)
|
||||
environment variable are used to mitigate assembly version conflicts in .NET.
|
||||
|
||||
| Environment variable | Required value |
|
||||
|--------------------------|----------------------------------------------------------------------|
|
||||
| `DOTNET_STARTUP_HOOKS` | `$INSTALL_DIR/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll` |
|
||||
| `DOTNET_ADDITIONAL_DEPS` | `$INSTALL_DIR/AdditionalDeps` |
|
||||
| `DOTNET_SHARED_STORE` | `$INSTALL_DIR/store` |
|
||||
| Environment variable | Required value | Status |
|
||||
|--------------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `DOTNET_STARTUP_HOOKS` | `$INSTALL_DIR/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `DOTNET_ADDITIONAL_DEPS` | `$INSTALL_DIR/AdditionalDeps` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `DOTNET_SHARED_STORE` | `$INSTALL_DIR/store` | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
||||
## Internal logs
|
||||
|
||||
|
@ -360,11 +498,7 @@ If the default log directories can't be created,
|
|||
the instrumentation uses the path of the current user's [temporary folder](https://docs.microsoft.com/en-us/dotnet/api/System.IO.Path.GetTempPath?view=net-6.0)
|
||||
instead.
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|-----------------------------------------------------|---------------------------------------------------------|------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_LOG_DIRECTORY` | Directory of the .NET Tracer logs. | _See the previous note on default paths_ |
|
||||
| `OTEL_DOTNET_AUTO_DEBUG` | Enables debugging mode for the tracer. | `false` |
|
||||
| `OTEL_DOTNET_AUTO_TRACES_CONSOLE_EXPORTER_ENABLED` | Whether the traces console exporter is enabled or not. | `false` |
|
||||
| `OTEL_DOTNET_AUTO_METRICS_CONSOLE_EXPORTER_ENABLED` | Whether the metrics console exporter is enabled or not. | `false` |
|
||||
| `OTEL_DOTNET_AUTO_LOGS_CONSOLE_EXPORTER_ENABLED` | Whether the logs console exporter is enabled or not. | `false` |
|
||||
| `OTEL_DOTNET_AUTO_LOGS_INCLUDE_FORMATTED_MESSAGE` | Whether the log state should be formatted. | `false` |
|
||||
| Environment variable | Description | Default value | Status |
|
||||
|----------------------------------|-------------------------------------------------------------------------|------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_LOG_DIRECTORY` | Directory of the .NET Tracer logs. | *See the previous note on default paths* | [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
| `OTEL_LOG_LEVEL` | SDK log level. (supported values: `none`,`error`,`warn`,`info`,`debug`) | `info` | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md) |
|
||||
|
|
|
@ -42,7 +42,7 @@ on the **.NET Framework** and optional for **.NET** applications, more info belo
|
|||
## Error handling
|
||||
|
||||
Initialization errors, usually caused by invalid configuration,
|
||||
are logged and crash the application.
|
||||
are logged. If possible, default configuration is used otherwise it crash the application.
|
||||
|
||||
Errors occurring at application runtime are logged and should never crash the application.
|
||||
|
||||
|
@ -82,9 +82,9 @@ or callbacks provided directly by the library or framework being instrumented.
|
|||
This type of instrumentation depends on the OpenTelemetry API and the specific
|
||||
library or framework that they instrument. Some examples include:
|
||||
|
||||
- [ASP.NET Core Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Instrumentation.AspNetCore)
|
||||
- [gRPC Client Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Instrumentation.GrpcNetClient)
|
||||
- [HttpClient and HttpWebRequest Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Instrumentation.Http)
|
||||
- [ASP.NET Core Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.AspNetCore)
|
||||
- [gRPC Client Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.GrpcNetClient)
|
||||
- [HttpClient and HttpWebRequest Instrumentation](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.Http)
|
||||
|
||||
- **Bytecode instrumentations**: instrumentations created for libraries
|
||||
or frameworks that lack proper hooks or callbacks to allow the collection
|
||||
|
@ -95,9 +95,8 @@ Bytecode instrumentations must be implemented following
|
|||
the proper attribute annotation so that the native CLR Profiler implementation
|
||||
can inject them at runtime. Some examples include:
|
||||
|
||||
- [GraphQL](../src/OpenTelemetry.AutoInstrumentation/Instrumentations/GraphQL)
|
||||
- [Logger](../src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/)
|
||||
- [MongoDb](../src/OpenTelemetry.AutoInstrumentation/Instrumentations/MongoDb/)
|
||||
- [MongoDB](../src/OpenTelemetry.AutoInstrumentation/Instrumentations/MongoDB/)
|
||||
|
||||
Both kinds of instrumentation are enabled only when the targeted modules are loaded
|
||||
into the targeted application.
|
||||
|
@ -255,6 +254,17 @@ If you can't change the application build to add or update the necessary package
|
|||
versions, you can still address conflicts using the methods described in
|
||||
[Handling of Assembly version Conflicts](./troubleshooting.md#handling-of-assembly-version-conflicts).
|
||||
|
||||
### `System.Diagnostics.DiagnosticSource` versions
|
||||
|
||||
The version of `System.Diagnostics.DiagnosticSource` used by the instrumentation
|
||||
differs depending on the .NET version:
|
||||
|
||||
- .NET Framework is referencing the latest supported version.
|
||||
Automatic redirection is forcing this version
|
||||
if instrumented application bring own copy.
|
||||
- .NET is referencing the lowest supported version.
|
||||
The version can be upgraded by the instrumented application.
|
||||
|
||||
## Further reading
|
||||
|
||||
OpenTelemetry:
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
|
||||
On all platforms, the minimum requirements are:
|
||||
|
||||
- [Docker](https://docs.docker.com/engine/install/)
|
||||
- [Docker Compose](https://docs.docker.com/compose/install/)
|
||||
- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
|
||||
- [.NET 7.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0)
|
||||
- [Docker](https://www.docker.com/products/docker-desktop)
|
||||
- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
|
||||
- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)
|
||||
|
||||
### Windows
|
||||
|
||||
|
@ -46,10 +45,10 @@ This repository uses [Nuke](https://nuke.build/) for build automation.
|
|||
|
||||
Support plugins are available for:
|
||||
|
||||
- JetBrains ReSharper <https://nuke.build/resharper>
|
||||
- JetBrains Rider <https://nuke.build/rider>
|
||||
- Microsoft VisualStudio <https://nuke.build/visualstudio>
|
||||
- Microsoft VSCode <https://nuke.build/vscode>
|
||||
- JetBrains ReSharper <https://nuke.build/docs/ide/resharper/>
|
||||
- JetBrains Rider <https://nuke.build/docs/ide/rider/>
|
||||
- Microsoft VisualStudio <https://nuke.build/docs/ide/visual-studio>
|
||||
- Microsoft VSCode <https://nuke.build/docs/ide/vscode/>
|
||||
|
||||
Restore dotnet tools to prepare build tools for solution.
|
||||
This installs the dotnet `nuke` tool locally.
|
||||
|
@ -78,6 +77,57 @@ Clean your repository by running:
|
|||
git clean -fXd
|
||||
```
|
||||
|
||||
### Building NuGet packages locally
|
||||
|
||||
To build the NuGet package with the native components (`OpenTelemetry.AutoInstrumentation.Runtime.Native`)
|
||||
locally it is necessary to download CI artifacts.
|
||||
|
||||
Download the `bin-*` artifacts from a successful CI job and expand each one into
|
||||
a folder with the same name as the artifact under `./bin/ci-artifacts/`. The
|
||||
PowerShell snippet below shows how to properly copy and expand the artifacts,
|
||||
it assumes that the code is run from the root of the repository and the CI
|
||||
artifacts we added to `~/Downloads/`:
|
||||
|
||||
```PowerShell
|
||||
$artifacts = @(
|
||||
"bin-alpine-x64",
|
||||
"bin-alpine-arm64",
|
||||
"bin-ubuntu-22.04",
|
||||
"bin-ubuntu-22.04-arm",
|
||||
"bin-macos-13",
|
||||
"bin-windows-2022"
|
||||
)
|
||||
$destFolder = "./bin/ci-artifacts/"
|
||||
$zipFilesFolder = "~/Downloads/"
|
||||
|
||||
rm -r -force $destFolder
|
||||
mkdir $destFolder
|
||||
|
||||
$artifacts | % { $dest = $(Join-Path $destFolder $_); $zip = $(Join-Path $zipFilesFolder $_) + ".zip"; Expand-Archive $zip $dest }
|
||||
```
|
||||
|
||||
Now you are ready to build the packages locally:
|
||||
|
||||
```cmd
|
||||
dotnet nuke BuildNuGetPackages
|
||||
```
|
||||
|
||||
to run the tests locally use:
|
||||
|
||||
```cmd
|
||||
dotnet nuke TestNuGetPackages
|
||||
```
|
||||
|
||||
To use the locally built NuGet packages in other projects on the local machine ensure
|
||||
that the target project is either using a `nuget.config`, adding `<repo>/bin/nuget-artifacts/`
|
||||
to the NuGet sources for example the
|
||||
[`nuget.config` used by the NuGet packages test applications](../test/test-applications/nuget-packages/nuget.config),
|
||||
or the packages are added to the project by specifying the `--source` parameter
|
||||
when running [`dotnet add package` command](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-add-package).
|
||||
|
||||
Notice that package references are also cached so if you rebuild be sure to clean-up
|
||||
the cached versions too.
|
||||
|
||||
### Documentation lint
|
||||
|
||||
If you made changes to the Markdown documents (`*.md` files), ensure that lint
|
||||
|
@ -140,7 +190,7 @@ configuration for running the OpenTelemetry Collector and Jaeger.
|
|||
You can run the services using:
|
||||
|
||||
```sh
|
||||
docker-compose -f dev/docker-compose.yaml up
|
||||
docker compose -f dev/docker-compose.yaml up
|
||||
```
|
||||
|
||||
The following Web UI endpoints are exposed:
|
||||
|
@ -153,16 +203,21 @@ You can also find the exported telemetry in `dev/log` directory.
|
|||
|
||||
### Instrument an application
|
||||
|
||||
> *Warning:* Make sure to build and prepare the test environment beforehand.
|
||||
> [!WARNING]
|
||||
> Make sure to build and prepare the test environment beforehand.
|
||||
|
||||
You can use [`dev/envvars.sh`](../dev/envvars.sh) to export profiler
|
||||
environmental variables to your current shell session.
|
||||
You must run it from the root of this repository.
|
||||
For example:
|
||||
You can reuse [`instrument.sh`](../instrument.sh) to export profiler
|
||||
environmental variables to your current Shell session:
|
||||
|
||||
```sh
|
||||
. ./dev/envvars.sh
|
||||
./test/test-applications/integrations/TestApplication.Smoke/bin/x64/Release/net7.0/TestApplication.Smoke
|
||||
export OTEL_DOTNET_AUTO_HOME="bin/tracer-home"
|
||||
. ./instrument.sh
|
||||
```
|
||||
|
||||
The script can also launch the application to be instrumented directly:
|
||||
|
||||
```sh
|
||||
OTEL_DOTNET_AUTO_HOME="bin/tracer-home" ./instrument.sh dotnet MyApp.dll
|
||||
```
|
||||
|
||||
### Using playground application
|
||||
|
@ -178,7 +233,7 @@ The release process is described in [releasing.md](releasing.md).
|
|||
|
||||
Apart from regular unit tests this repository contains integration tests
|
||||
under [test/IntegrationTests](../test/IntegrationTests)
|
||||
as they give the biggest confidence if the auto-instrumentation works properly.
|
||||
as they give the biggest confidence if the automatic instrumentation works properly.
|
||||
|
||||
Each test class has its related test application that can be found
|
||||
under [test/test-applications/integrations](../test/test-applications/integrations)
|
||||
|
@ -187,10 +242,22 @@ Other features are tested via `SmokeTests` class or have its own test class
|
|||
if a dedicated test application is needed.
|
||||
|
||||
Currently, the strategy is to test the library instrumentations
|
||||
against its lowest supported, but not vulnerable, version.
|
||||
The pull requests created by @dependabot with `do NOT merge` label
|
||||
are used to test against higher library versions when they are released.
|
||||
against following versions:
|
||||
|
||||
- its lowest supported, but not vulnerable, version,
|
||||
- one version from every major release,
|
||||
- the latest supported version (defined in [`test/Directory.Packages.props`](../test/Directory.Packages.props)),
|
||||
- other specific versions, eg. containing breaking changes for our instrumentations.
|
||||
|
||||
Tests against these versions are executed when you are using `nuke` commands.
|
||||
In case of execution from Visual Studio, only test against the latest supported
|
||||
are executed.
|
||||
|
||||
To update set of the version modify [`PackageVersionDefinitions.cs`](../tools/LibraryVersionsGenerator/PackageVersionDefinitions.cs),
|
||||
execute [`LibraryVersionsGenerator`](../tools/LibraryVersionsGenerator/LibraryVersionsGenerator.csproj),
|
||||
and commit generated files.
|
||||
|
||||
> [!NOTE]
|
||||
> `TestApplication.AspNet.NetFramework` is an exception to this strategy
|
||||
> as it would not work well, because of multiple dependent packages.
|
||||
> `TestApplication.AspNet.NetFramework` references the latest versions
|
||||
|
@ -223,7 +290,8 @@ the [verify-test.yml](../.github/workflows/verify-test.yml) GitHub workflow.
|
|||
The following example shows how you can debug if the profiler is attached:
|
||||
|
||||
```bash
|
||||
~/repos/opentelemetry-dotnet-instrumentation$ source dev/envvars.sh
|
||||
~/repos/opentelemetry-dotnet-instrumentation$ export OTEL_DOTNET_AUTO_HOME="bin/tracer-home"
|
||||
~/repos/opentelemetry-dotnet-instrumentation$ . ./instrument.sh
|
||||
~/repos/opentelemetry-dotnet-instrumentation$ cd ../runtime/
|
||||
~/repos/runtime$ lldb -- ./artifacts/bin/coreclr/Linux.x64.Debug/corerun ~/repos/opentelemetry-dotnet-instrumentation/examples/ConsoleApp/bin/Debug/net6.0/Examples.ConsoleApp.dll
|
||||
(lldb) target create "./artifacts/bin/coreclr/Linux.x64.Debug/corerun"
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
# Handle adding automatic instrumentation to application with existing OpenTelemetry SDK and instrumentation references
|
||||
|
||||
This document explains how OpenTelemetry automatic instrumentation interacts with
|
||||
applications that already include references to the OpenTelemetry SDK or instrumentation
|
||||
libraries. It covers the role and impact of the `OTEL_DOTNET_AUTO_SETUP_SDK`
|
||||
environment variable and provides troubleshooting guidance for conflicts between automatic
|
||||
instrumentation and existing references. The objective is to help users understand and
|
||||
effectively integrate OpenTelemetry automatic instrumentation into their applications.
|
||||
|
||||
## Interaction with existing OpenTelemetry SDK and instrumentation references
|
||||
|
||||
OpenTelemetry automatic instrumentation enhances .NET applications by
|
||||
automatically injecting and configuring the OpenTelemetry .NET SDK and adding
|
||||
OpenTelemetry instrumentation to key packages and APIs that the application uses.
|
||||
For applications without existing OpenTelemetry references, the process is seamless.
|
||||
However, for applications that already include OpenTelemetry SDK or
|
||||
instrumentation libraries, the interaction requires careful management to avoid
|
||||
conflicts.
|
||||
|
||||
### The `OTEL_DOTNET_AUTO_SETUP_SDK` environment variable
|
||||
|
||||
The `OTEL_DOTNET_AUTO_SETUP_SDK` environment variable plays a crucial role in
|
||||
managing the interaction between OpenTelemetry automatic instrumentation and existing
|
||||
OpenTelemetry references within an application. When set to `true`, this
|
||||
environment variable instructs the automatic instrumentation to automatically set up
|
||||
the OpenTelemetry SDK, ensuring that it is properly configured to work with the
|
||||
instrumentation injected by the automatic instrumentation.
|
||||
|
||||
This automatic setup is particularly useful in scenarios where the application
|
||||
has its own references to OpenTelemetry libraries, as it helps to harmonize the
|
||||
configuration and ensure that telemetry data is collected and exported as
|
||||
expected.
|
||||
|
||||
### Impact on applications
|
||||
|
||||
The presence of the `OTEL_DOTNET_AUTO_SETUP_SDK` environment variable and its
|
||||
configuration can significantly impact how telemetry data is collected and
|
||||
exported in applications with existing OpenTelemetry references. When enabled,
|
||||
it ensures that the OpenTelemetry SDK is configured in a way that complements
|
||||
the automatic instrumentation, thereby enhancing the telemetry data collected
|
||||
without causing conflicts or duplication.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
When there are conflicts within an application between the OpenTelemetry
|
||||
automatic instrumentation and existing OpenTelemetry references, try
|
||||
these troubleshooting steps:
|
||||
|
||||
1. Verify that the `OTEL_DOTNET_AUTO_SETUP_SDK` environment variable is set to
|
||||
`true` to allow the automatic instrumentation to manage the SDK setup.
|
||||
2. Review the application's dependencies to identify any conflicting versions of
|
||||
OpenTelemetry libraries and resolve them by aligning with the versions used
|
||||
by the automatic instrumentation.
|
||||
3. Consult the [troubleshooting guide](troubleshooting.md) for additional advice
|
||||
on resolving specific issues related to OpenTelemetry automatic instrumentation.
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Setup
|
||||
|
||||
Use the `OpenTelemetry.DotNet.Auto.psm1"` PowerShell module
|
||||
Use the `OpenTelemetry.DotNet.Auto.psm1` PowerShell module
|
||||
to set up automatic instrumentation for IIS:
|
||||
|
||||
```powershell
|
||||
|
@ -16,58 +16,29 @@ Install-OpenTelemetryCore
|
|||
Register-OpenTelemetryForIIS
|
||||
```
|
||||
|
||||
⚠️ `Register-OpenTelemetryForIIS` performs IIS restart.
|
||||
If you are instrumenting an ASP.NET Core application, you must also configure
|
||||
the application's application pool with `.NET CLR Version` set to `No Managed Code`.
|
||||
If this is not configured correctly, no telemetry data will be generated and
|
||||
the debug-level tracer logs will show that no ReJIT's (bytecode rewriting) have
|
||||
occurred. See this [issue](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2934#issuecomment-1746669737)
|
||||
for further details.
|
||||
|
||||
### Add TelemetryHttpModule ASP.NET HTTP module
|
||||
|
||||
> This is NOT required for ASP.NET Core deployments.
|
||||
|
||||
This step is necessary only for ASP.NET (.NET Framework).
|
||||
|
||||
Add `OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule, OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule`
|
||||
ASP.NET HTTP module to your application's `Web.config`.
|
||||
You can add it in the following places:
|
||||
|
||||
```xml
|
||||
<system.web>
|
||||
<httpModules>
|
||||
<add name="TelemetryHttpModule" type="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule, OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" />
|
||||
</httpModules>
|
||||
</system.web>
|
||||
```
|
||||
|
||||
```xml
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules>
|
||||
<remove name="TelemetryHttpModule" />
|
||||
<add name="TelemetryHttpModule" type="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule, OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" preCondition="managedHandler" />
|
||||
</modules>
|
||||
</system.webServer>
|
||||
```
|
||||
|
||||
The ASP.NET HTTP module can be also set in `applicationHost.config`.
|
||||
Here is an example where you can add the module
|
||||
to set it for all ASP.NET application running in Integrated Pipeline Mode:
|
||||
|
||||
```xml
|
||||
<location path="" overrideMode="Allow">
|
||||
<system.webServer>
|
||||
<modules>
|
||||
<add name="TelemetryHttpModule" type="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule, OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" preCondition="managedHandler" />
|
||||
</modules>
|
||||
</system.webServer>
|
||||
</location>
|
||||
```
|
||||
> [!WARNING]
|
||||
> `Register-OpenTelemetryForIIS` performs IIS restart.
|
||||
|
||||
## Configuration
|
||||
|
||||
> [!NOTE]
|
||||
> Remember to restart IIS after making configuration changes.
|
||||
> You can do it by executing `iisreset.exe`.
|
||||
|
||||
For ASP.NET application you can configure the most common `OTEL_` settings
|
||||
(like `OTEL_SERVICE_NAME`) via `appSettings` in `Web.config`.
|
||||
|
||||
If a service name is not explicitly configured, one will be generated for you.
|
||||
If the application is hosted on IIS in .NET Framework this will use
|
||||
`SiteName\VirtualDirectoryPath` ex: `MySite\MyApp`
|
||||
|
||||
For ASP.NET Core application you can use
|
||||
the [`<environmentVariable>`](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/web-config#set-environment-variables)
|
||||
elements inside the `<aspNetCore>` block of your `Web.config` file
|
||||
|
@ -87,3 +58,44 @@ Consider setting common environment variables,
|
|||
for all applications deployed to IIS
|
||||
by setting the environment variables for
|
||||
`W3SVC` and `WAS` Windows Services as described in [windows-service-instrumentation.md](windows-service-instrumentation.md).
|
||||
|
||||
#### Disable Instrumentation per Application Pool (.NET Framework only)
|
||||
|
||||
You can use PowerShell module to quickly enable and disable instrumentation on
|
||||
specific application pool.
|
||||
|
||||
```powershell
|
||||
# Import the module
|
||||
Import-Module "OpenTelemetry.DotNet.Auto.psm1"
|
||||
|
||||
# NOTE! Application pool name is case sensitive.
|
||||
# It is warning only if a wrong application pool name is used.
|
||||
|
||||
# Adds COR_ENABLE_PROFILING=0 environment variable to MyAppPool config
|
||||
Disable-OpenTelemetryForIISAppPool -AppPoolName MyAppPool
|
||||
|
||||
# Removes COR_ENABLE_PROFILING=0 environment variable from MyAppPool config
|
||||
Enable-OpenTelemetryForIISAppPool -AppPoolName MyAppPool
|
||||
|
||||
# Restart Application Pool
|
||||
Restart-WebAppPool -Name "MyAppPool"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> The application pool environment variable takes precedence over
|
||||
> global IIS registration.
|
||||
|
||||
You can also use IIS UI to configure and verify specific environment variables per
|
||||
application pool.
|
||||
|
||||
1. Open Internet Information Service (IIS) Manager.
|
||||
1. Select the server from the left.
|
||||
1. Open 'Configuration Editor' from the Management section.
|
||||
1. Open section 'system.applicationHost/applicationPools'
|
||||
1. Press '...' in the first entry of the table (Collection).
|
||||
1. Select row with your application pool name.
|
||||
1. At the 'Properties' section, select 'environmentVariables' and press '...'.
|
||||
1. Add or Remove environment variables.
|
||||
1. Close all external windows and press 'Apply' in the main
|
||||
'Configuration Editor' view.
|
||||
1. Restart your application.
|
||||
|
|
|
@ -35,6 +35,6 @@ modify CLR optimizations.
|
|||
|
||||
## Disable OpenTelemetry .NET SDK setup
|
||||
|
||||
| Environment variable | Description | Default value |
|
||||
|----------------------------------------|----------------------------------------------------------------------------------------|------------------------------------------------------|
|
||||
| `OTEL_DOTNET_AUTO_SETUP_SDK` | Controls whether auto-instrumentation should set up OpenTelemetry .NET SDK at startup. | `true` |
|
||||
| Environment variable | Description | Default value |
|
||||
|------------------------------|---------------------------------------------------------------------------------------------|---------------|
|
||||
| `OTEL_DOTNET_AUTO_SETUP_SDK` | Controls whether automatic instrumentation should set up OpenTelemetry .NET SDK at startup. | `true` |
|
||||
|
|
|
@ -0,0 +1,265 @@
|
|||
# Continuous profiler
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Continuous profiler is an experimental feature. It will be subject to change,
|
||||
> when <https://github.com/open-telemetry/oteps/pull/239> or <https://github.com/open-telemetry/oteps/pull/237>
|
||||
> are merged.
|
||||
|
||||
The continuous profiler collects stack traces from the processes for two type of
|
||||
events:
|
||||
|
||||
* Periodically, for all threads. See [Thread sampling](#thread-sampling).
|
||||
* Memory allocation events. See [Allocation sampling](#allocation-sampling).
|
||||
|
||||
You can export stack traces to any observability back end that supports profiling.
|
||||
|
||||
## Thread sampling
|
||||
|
||||
You can enable thread sampling using the custom plugin, which
|
||||
can parse dense thread sampling data and export it.
|
||||
|
||||
### How does the thread sampler work?
|
||||
|
||||
The profiler uses the
|
||||
[.NET profiler](https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/profiling/)
|
||||
to perform periodic call stack sampling. For every sampling period, the runtime
|
||||
suspends execution and the samples for all managed thread are saved in the buffer,
|
||||
then the runtime resumes.
|
||||
|
||||
The separate managed thread processes data from the buffer and exports it
|
||||
in the format defined by the plugin. To make the process more efficient, the
|
||||
sampler uses two independent buffers to store samples alternatively.
|
||||
|
||||
### Requirements
|
||||
|
||||
* .NET 6.0 or higher (`ICorProfilerInfo12` available in runtime).
|
||||
* .NET Framework is not supported, as `ICorProfiler10` and `ICorProfiler12`
|
||||
are not available in .NET Fx.
|
||||
|
||||
Note that `ICorProfiler10` can be used, but .NET Core 3.1 or .NET 5.0 aren't
|
||||
supported by the OpenTelemetry .NET Automatic Instrumentation.
|
||||
|
||||
### Enable the profiler
|
||||
|
||||
Implement custom plugin. See plugin section.
|
||||
|
||||
### Configuration defaults
|
||||
|
||||
* `threadSamplingEnabled = true;`: Enables thread sampling.
|
||||
* `var threadSamplingInterval = 10000u;`: Sampling interval, in milliseconds.
|
||||
Lowest recommended value is 1000.
|
||||
* `var exportInterval = TimeSpan.FromMilliseconds(500);`: Interval for reading
|
||||
the data from buffers and call the exporter. This setting is common for both
|
||||
thread and allocation sampling.
|
||||
* `object continuousProfilerExporter = new ConsoleExporter();`: Exporter to be
|
||||
used for both thread and allocation sampling.
|
||||
|
||||
### Escape hatch
|
||||
|
||||
The profiler limits its own behavior when both buffers used to store sampled
|
||||
data are full.
|
||||
|
||||
This scenario might happen when the data processing thread is not able
|
||||
to export data the given period of time.
|
||||
|
||||
Thread sampling resumes when any of the buffers are empty.
|
||||
|
||||
### Troubleshoot the .NET profiler
|
||||
|
||||
#### How do I know if it's working?
|
||||
|
||||
At startup, the OpenTelemetry Instrumentation for .NET logs the string
|
||||
`ContinuousProfiler::StartThreadSampling` at `info` log level.
|
||||
|
||||
You can grep for this in the native logs for the instrumentation
|
||||
to see something like this:
|
||||
|
||||
```text
|
||||
10/12/22 12:10:31.962 PM [12096|22036] [info] ContinuousProfiler::StartThreadSampling
|
||||
```
|
||||
|
||||
#### How can I see Continuous Profiling configuration?
|
||||
|
||||
The OpenTelemetry .NET Automatic Instrumentation logs the profiling configuration
|
||||
at `Debug` log level during the startup. You can grep for the string
|
||||
`Continuous profiling configuration:` to see the configuration.
|
||||
|
||||
#### What does the escape hatch do?
|
||||
|
||||
The escape hatch automatically discards profiling data
|
||||
if the ingest limit has been reached.
|
||||
|
||||
If the escape hatch activates, it logs the following message:
|
||||
|
||||
```text
|
||||
Skipping a thread sample period, buffers are full.
|
||||
```
|
||||
|
||||
You can also look for:
|
||||
|
||||
```text
|
||||
** THIS WILL RESULT IN LOSS OF PROFILING DATA **.
|
||||
```
|
||||
|
||||
If you see these log messages, check the exporter implementation.
|
||||
|
||||
#### What if I'm on an unsupported .NET version?
|
||||
|
||||
None of the .NET Framework versions is supported. You have to switch
|
||||
to a supported .NET version.
|
||||
|
||||
#### Can I tell the sampler to ignore some threads?
|
||||
|
||||
There is no such functionality. All managed threads are captured by the profiler.
|
||||
|
||||
## Allocation sampling
|
||||
|
||||
The profiler samples allocations, captures the call stack state for the .NET
|
||||
thread that triggered the allocation, and exports it in the appropriate format.
|
||||
|
||||
Use the memory allocation data, together with the stack traces and .NET runtime
|
||||
metrics, to investigate memory leaks and unusual consumption patterns
|
||||
in an observability back end that supports profiling.
|
||||
|
||||
### How does the memory profiler work?
|
||||
|
||||
The profiler leverages [.NET profiling](https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/profiling/)
|
||||
to perform allocation sampling.
|
||||
For every sampled allocation, allocation amount together with stack trace of
|
||||
the thread that triggered the allocation, and associated span context, are saved
|
||||
into buffer.
|
||||
|
||||
The managed thread shared with CPU Profiler processes the data from the buffer
|
||||
and exports in the way defined by the plugin..
|
||||
|
||||
### Requirements
|
||||
|
||||
* .NET 6.0 or higher (`ICorProfilerInfo12` available in runtime) - technically
|
||||
it could be .NET5 which is not supported by OTel/MS.
|
||||
|
||||
### Enable the profiler
|
||||
|
||||
Implement custom plugin.
|
||||
|
||||
### Configuration settings by the plugin
|
||||
|
||||
```csharp
|
||||
threadSamplingEnabled, threadSamplingInterval, allocationSamplingEnabled, maxMemorySamplesPerMinute, exportInterval, continuousProfilerExporter
|
||||
```
|
||||
|
||||
* `allocationSamplingEnabled = true`
|
||||
* `maxMemorySamplesPerMinute = 200` // minimum value: 1, Splunk is using 200 by default
|
||||
* `exportInterval = TimeSpan.FromMilliseconds(500);` // Interval to read data from
|
||||
buffers and call exporter, common for Thread and Allocation sampling
|
||||
* `object continuousProfilerExporter = new ConsoleExporter();` // Exporter, common
|
||||
for Thread and Allocation sampling
|
||||
|
||||
### Escape hatch
|
||||
|
||||
The profiler limits its own behavior when buffer
|
||||
used to store allocation samples is full.
|
||||
|
||||
Current maximum size of the buffer is 200 KiB.
|
||||
|
||||
This scenario might happen when the data processing thread is not able
|
||||
to export the data by the plugin in the given time frame.
|
||||
|
||||
### Troubleshooting the .NET profiler
|
||||
|
||||
#### How do I know if it's working?
|
||||
|
||||
At the startup, the OpenTelemetry .NET Automatic Instrumentation will log the string
|
||||
`ContinuousProfiler::MemoryProfiling started` at `info` log level.
|
||||
|
||||
You can grep for this in the native logs for the instrumentation
|
||||
to see something like this:
|
||||
|
||||
```text
|
||||
10/12/23 12:10:31.962 PM [12096|22036] [info] ContinuousProfiler::MemoryProfiling started.
|
||||
```
|
||||
|
||||
#### How can I see Continuous Profiling configuration?
|
||||
|
||||
The OpenTelemetry .NET AutomaticInstrumentation logs the profiling configuration
|
||||
at `Debug` log level during the startup. You can grep for the string
|
||||
`Continuous profiling configuration:` to see the configuration.
|
||||
|
||||
#### What does the escape hatch do?
|
||||
|
||||
The escape hatch automatically discards captured allocation data
|
||||
if the ingest limit has been reached.
|
||||
|
||||
If the escape hatch activates, it logs the following message:
|
||||
|
||||
`Discarding captured allocation sample. Allocation buffer is full.`
|
||||
|
||||
If you see these log messages, check the configuration and communication layer
|
||||
between your process and the Collector.
|
||||
|
||||
#### What if I'm on an unsupported .NET version?
|
||||
|
||||
None of the .NET Framework versions is supported. You have to switch to
|
||||
supported .NET version.
|
||||
|
||||
## Plugin
|
||||
|
||||
For now, the plugins is responsible for
|
||||
|
||||
* defining configuration for continuous profiling
|
||||
* providing exporter for the allocation and profiling data
|
||||
* *parsing data* prepared by the native code.
|
||||
|
||||
### Plugin contract
|
||||
|
||||
> [!IMPORTANT]
|
||||
> It will be subject to change, when <https://github.com/open-telemetry/oteps/pull/239>
|
||||
> or <https://github.com/open-telemetry/oteps/pull/237> will be ready and merged.
|
||||
|
||||
As other methods, `GetContinuousProfilerConfiguration` is called by reflection
|
||||
and convention.
|
||||
|
||||
```csharp
|
||||
/// <summary>
|
||||
/// Configure Continuous Profiler.
|
||||
/// </summary>
|
||||
/// <returns>(threadSamplingEnabled, threadSamplingInterval, allocationSamplingEnabled, maxMemorySamplesPerMinute, exportInterval, exportTimeout, continuousProfilerExporter)</returns>
|
||||
public Tuple<bool, uint, bool, uint, TimeSpan, TimeSpan, object> GetContinuousProfilerConfiguration()
|
||||
{
|
||||
var threadSamplingEnabled = true; // enables thread sampling
|
||||
var threadSamplingInterval = 10000u; // interval to stop CLR runtime and fetch stacks. 10 000ms is Splunk default. 1000ms is the lowest supported value by Splunk. The code does not contains any limitations this. Plugins is responsible for checks.
|
||||
var allocationSamplingEnabled = true; // enables allocation sampling
|
||||
var maxMemorySamplesPerMinute = 200u; // max number of samples in minutes. 200 is tested default value by Splunk.
|
||||
var exportInterval = TimeSpan.FromMilliseconds(500); // Pause time before next execution of exporting/reading buffer process
|
||||
var exportTimeout = TimeSpan.FromMilliseconds(500); // Export timeout
|
||||
object continuousProfilerExporter = new ConsoleExporter();
|
||||
return Tuple.Create(threadSamplingEnabled, threadSamplingInterval, allocationSamplingEnabled, maxMemorySamplesPerMinute, exportInterval, exportTimeout, continuousProfilerExporter);
|
||||
}
|
||||
```
|
||||
|
||||
if more than one plugin implement `GetContinuousProfilerConfiguration` only
|
||||
the first one will be used. Other will be ignored.
|
||||
|
||||
### Exporter contract
|
||||
|
||||
Two methods has to be implemented by Exporter
|
||||
|
||||
```csharp
|
||||
public void ExportThreadSamples(byte[] buffer, int read, CancellationToken cancellationToken);
|
||||
public void ExportAllocationSamples(byte[] buffer, int read, CancellationToken cancellationToken);
|
||||
```
|
||||
|
||||
Both accept buffer produced by the native code, the length of filled
|
||||
data, and cancellation token.
|
||||
The Exporter is responsible both for parsing this buffer and exporting it.
|
||||
|
||||
Example: [`OtlpOverHttpExporter`](../../test/test-applications/integrations/TestApplication.ContinuousProfiler/Exporter/OtlpOverHttpExporter.cs).
|
||||
|
||||
### Native parser
|
||||
|
||||
As there is no default OpenTelemetry Protocol format there is not easy way to
|
||||
create good contract between OpenTelemetry Automatic Instrumentation and
|
||||
the plugin. The plugin has to implement (copy) our version of the parser.
|
||||
It should be changed when the OTel Proposal will be merged, and we can start implementing
|
||||
real OTLP exporter.
|
||||
|
||||
Implementation can be found in [`SampleNativeFormatParser`](../../test/test-applications/integrations/TestApplication.ContinuousProfiler/Exporter/SampleNativeFormatParser.cs).
|
|
@ -21,50 +21,50 @@ submit an issue to request its inclusion.
|
|||
|
||||
### Application Frameworks
|
||||
|
||||
| Framework | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Notes |
|
||||
| --- | :---: | :---: | --- |
|
||||
| [ASP.NET](https://docs.microsoft.com/aspnet/overview) | Yes | Yes | |
|
||||
| [ASP.NET Core](https://docs.microsoft.com/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-6.0) | Yes | Yes | |
|
||||
| [Windows Workflow Foundation](https://docs.microsoft.com/dotnet/framework/windows-workflow-foundation/) | | | This is .NET Framework only. There is an [experimental port for .NET 6](https://github.com/UiPath/CoreWF). | |
|
||||
| [OWIN](https://docs.microsoft.com/aspnet/aspnet/overview/owin-and-katana/) | | | This is .NET Framework only. |
|
||||
| Framework | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Notes |
|
||||
|---------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------:|:-----------------------------------------------------------------------------:|----------------------------------------------------------------------------------------------------------|
|
||||
| [ASP.NET](https://docs.microsoft.com/aspnet/overview) | Yes | Yes | |
|
||||
| [ASP.NET Core](https://docs.microsoft.com/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-6.0) | Yes | Yes | |
|
||||
| [Windows Workflow Foundation](https://docs.microsoft.com/dotnet/framework/windows-workflow-foundation/) | | | This is .NET Framework only. There is an [experimental port for .NET](https://github.com/UiPath/CoreWF). |
|
||||
| [OWIN](https://docs.microsoft.com/aspnet/aspnet/overview/owin-and-katana/) | | | This is .NET Framework only. |
|
||||
|
||||
### Databases
|
||||
|
||||
| Library | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks)| Databases Tested | Notes |
|
||||
| --- | :---: | :---: | --- | --- |
|
||||
| [Entity Framework](https://docs.microsoft.com/ef/ef6/) | | | | Needs investigation. It might be implicitly supported based on the configured [database provider](https://docs.microsoft.com/ef/ef6/fundamentals/providers/). |
|
||||
| [Entity Framework Core](https://docs.microsoft.com/ef/core/) | | | | Needs investigation. It might be implicitly supported based on the configured [database provider](https://docs.microsoft.com/ef/core/providers/). |
|
||||
| [Dapper](https://github.com/DapperLib/Dapper) | | | | Needs investigation. It might be implicitly supported based on the configured [database provider](https://github.com/DapperLib/Dapper#will-dapper-work-with-my-db-provider). |
|
||||
| [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) | Yes | | [MS SQL Server](https://www.microsoft.com/sql-server/sql-server-2019) | |
|
||||
| [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | Yes | | | |
|
||||
| [MySql.Data](https://dev.mysql.com/doc/connector-net/en/connector-net-introduction.html) | Partial[^not_on_framework] | | | This is the official [MySQL](https://dev.mysql.com/) library. |
|
||||
| [MySqlConnector](https://mysqlconnector.net/) | | | | Seems to be the [recommended library for MariaDB](https://mariadb.com/kb/en/mysqlconnector-for-adonet/). |
|
||||
| [Npgsql](https://www.npgsql.org/) | Yes | | [PostgreSQL](https://www.postgresql.org/) | |
|
||||
| [Microsoft.Data.SqlLite](https://docs.microsoft.com/dotnet/standard/data/sqlite/?tabs=netcore-cli) | | | | |
|
||||
| [MongoDB.Driver](https://www.nuget.org/packages/mongodb.driver) | Partial[^not_on_framework] | | [MongoDB](https://www.mongodb.com/docs/) | |
|
||||
| [StackExchange.Redis](https://stackexchange.github.io/StackExchange.Redis/) | Partial[^not_on_framework] | | | |
|
||||
| [Elasticsearch-net](https://github.com/elastic/elasticsearch-net) | Yes | | | 8.0.0+ only. Older versions do not have native OpenTelemetry support. |
|
||||
| [Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core) | | | | |
|
||||
| [Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess) | | | | |
|
||||
| [AWSSDK.DynamoDBv2](https://www.nuget.org/packages/AWSSDK.DynamoDBv2) | | | | |
|
||||
| [Microsoft.Azure.Cosmos](https://www.nuget.org/packages/Microsoft.Azure.Cosmos) | | | | |
|
||||
| Library | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Databases Tested | Notes |
|
||||
|----------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------:|:-----------------------------------------------------------------------------:|-----------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Entity Framework](https://docs.microsoft.com/ef/ef6/) | | | | Needs investigation. It might be implicitly supported based on the configured [database provider](https://docs.microsoft.com/ef/ef6/fundamentals/providers/). |
|
||||
| [Entity Framework Core](https://docs.microsoft.com/ef/core/) | Partial[^not_on_framework] | | | Needs investigation. It might be implicitly supported based on the configured [database provider](https://docs.microsoft.com/ef/core/providers/). |
|
||||
| [Dapper](https://github.com/DapperLib/Dapper) | | | | Needs investigation. It might be implicitly supported based on the configured [database provider](https://github.com/DapperLib/Dapper#will-dapper-work-with-my-db-provider). |
|
||||
| [Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient) | Yes | | [MS SQL Server](https://www.microsoft.com/sql-server/sql-server-2019) | |
|
||||
| [System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient) | Yes | | | |
|
||||
| [MySql.Data](https://dev.mysql.com/doc/connector-net/en/connector-net-introduction.html) | Partial[^not_on_framework] | | | This is the official [MySQL](https://dev.mysql.com/) library. |
|
||||
| [MySqlConnector](https://mysqlconnector.net/) | Yes | | | Seems to be the [recommended library for MariaDB](https://mariadb.com/docs/connectors/mariadb-connector-net/mariadb-connector-net-guide). |
|
||||
| [Npgsql](https://www.npgsql.org/) | Yes | | [PostgreSQL](https://www.postgresql.org/) | |
|
||||
| [Microsoft.Data.SqlLite](https://docs.microsoft.com/dotnet/standard/data/sqlite/?tabs=netcore-cli) | | | | |
|
||||
| [MongoDB.Driver](https://www.nuget.org/packages/mongodb.driver) | Yes | | [MongoDB](https://www.mongodb.com/docs/) | |
|
||||
| [StackExchange.Redis](https://stackexchange.github.io/StackExchange.Redis/) | Partial[^not_on_framework] | | | |
|
||||
| [Elasticsearch-net](https://github.com/elastic/elasticsearch-net) | Yes | | | 8.0.0+ only. Older versions do not have native OpenTelemetry support. |
|
||||
| [Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core) | Yes | | | 23.4.0+ only. Older versions do not have native OpenTelemetry support. |
|
||||
| [Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess) | Yes | | | 23.4.0+ only. Older versions do not have native OpenTelemetry support. |
|
||||
| [AWSSDK.DynamoDBv2](https://www.nuget.org/packages/AWSSDK.DynamoDBv2) | | | | |
|
||||
| [Microsoft.Azure.Cosmos](https://www.nuget.org/packages/Microsoft.Azure.Cosmos) | | | | |
|
||||
|
||||
### Inter-process communication (IPC)
|
||||
|
||||
| Library | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Notes |
|
||||
| --- | :---: | :---: | --- |
|
||||
| [HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) | Yes | Yes | |
|
||||
| [HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | Yes | Yes | |
|
||||
| [WCF](https://docs.microsoft.com/dotnet/framework/wcf/whats-wcf) | See [issue 946](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/946) | | Server and client support should be added. |
|
||||
| [CoreWCF](https://github.com/CoreWCF/CoreWCF) | See [issue 946](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/946) | | Server and client support should be added. |
|
||||
| [RestSharp](https://restsharp.dev/) | | | This library may be implicitly supported by instrumenting the underlying HttpClient or HttpWebRequest. |
|
||||
| [gRPC-dotnet](https://github.com/grpc/grpc-dotnet) | Partial[^grpc_client_only] | | Client and service support should be added. |
|
||||
| [GraphQL](https://www.nuget.org/packages/GraphQL/) | Yes | | The current instrumentation needs updates to match the semantic conventions. |
|
||||
| [GraphQL Client](https://github.com/graphql-dotnet/graphql-client) | | | |
|
||||
| [RabbitMQ](https://www.nuget.org/packages/RabbitMQ.Client) | | | These is an [issue in the RabbitMQ repo](https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/776) to add instrumentation directly into RabbitMQ. |
|
||||
| [Kafka](https://www.nuget.org/packages/Confluent.Kafka) | | | |
|
||||
| [NServiceBus](https://docs.particular.net/nservicebus/) | | | |
|
||||
| [MassTransit](https://masstransit-project.com/) | Yes | | |
|
||||
| Library | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Notes |
|
||||
|-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------:|:-----------------------------------------------------------------------------:|--------------------------------------------------------------------------------------------------------|
|
||||
| [HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) | Yes | Yes | |
|
||||
| [HttpWebRequest](https://docs.microsoft.com/dotnet/api/system.net.httpwebrequest) | Yes | Yes | |
|
||||
| [WCF](https://docs.microsoft.com/dotnet/framework/wcf/whats-wcf) | Yes (Client adn Service side on .NET Framework) | | |
|
||||
| [CoreWCF](https://github.com/CoreWCF/CoreWCF) | | | |
|
||||
| [RestSharp](https://restsharp.dev/) | | | This library may be implicitly supported by instrumenting the underlying HttpClient or HttpWebRequest. |
|
||||
| [gRPC-dotnet](https://github.com/grpc/grpc-dotnet) | Partial[^grpc_client_only] | | Client and service support should be added. |
|
||||
| [GraphQL](https://www.nuget.org/packages/GraphQL/) | Partial[^not_on_framework] | | |
|
||||
| [GraphQL Client](https://github.com/graphql-dotnet/graphql-client) | | | |
|
||||
| [RabbitMQ](https://www.nuget.org/packages/RabbitMQ.Client) | Yes | | `RabbitMQ.Client` 7.0.0+ has native support for traces. |
|
||||
| [Kafka](https://www.nuget.org/packages/Confluent.Kafka) | | | |
|
||||
| [NServiceBus](https://docs.particular.net/nservicebus/) | Yes | Yes | |
|
||||
| [MassTransit](https://masstransit-project.com/) | Yes | | |
|
||||
|
||||
### Logging
|
||||
|
||||
|
@ -78,9 +78,9 @@ TODO: Determine how we want to support logging.
|
|||
|
||||
### Other
|
||||
|
||||
| Library | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Notes |
|
||||
| --- | :---: | :---: | --- |
|
||||
| [Microsoft.Extensions.Caching](https://docs.microsoft.com/dotnet/core/extensions/caching) | | | TODO: Evaluate if this is desired. |
|
||||
| Library | [Tracing Support](../config.md#instrumented-traces-libraries-and-frameworks) | [Metrics Support](../config.md#instrumented-metrics-libraries-and-frameworks) | Notes |
|
||||
|-------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------:|:-----------------------------------------------------------------------------:|------------------------------------|
|
||||
| [Microsoft.Extensions.Caching](https://docs.microsoft.com/dotnet/core/extensions/caching) | | | TODO: Evaluate if this is desired. |
|
||||
|
||||
## Cloud Environments and SDKs
|
||||
|
||||
|
@ -93,7 +93,7 @@ instrumentation libraries to support.
|
|||
|
||||
TODO: Determine appropriate resource detectors and Azure SDK related
|
||||
instrumentation libraries to support. This should also include support
|
||||
for frameworks like [Azure Service Fabric](https://azure.microsoft.com/services/service-fabric/).
|
||||
for frameworks like [Azure Service Fabric](https://azure.microsoft.com/products/service-fabric/).
|
||||
|
||||
### [GCP](https://cloud.google.com/)
|
||||
|
||||
|
@ -102,19 +102,19 @@ instrumentation libraries to support.
|
|||
|
||||
### Libraries we should not support
|
||||
|
||||
| Library | Notes |
|
||||
| --- | --- |
|
||||
| [System.IO.Pipelines](https://docs.microsoft.com/dotnet/standard/io/pipelines) | This library is used for high-throughput scenarios and instrumenting this library could potentially impact the performance of the application in a negative manner. |
|
||||
| [Pipelines.Sockets.Unofficial](https://github.com/mgravell/Pipelines.Sockets.Unofficial) | This is a lower-level networking library and instrumenting it can affect the performance of an application in negative ways causing an increase in network traffic (as compared to the application running without instrumentation). |
|
||||
| [System.Threading.Channels](https://docs.microsoft.com/dotnet/api/system.threading.channels) | This is a lower-level library and may not provide enough contextual information on its own. |
|
||||
| [Cassandra](https://www.nuget.org/packages/CassandraCSharpDriver) | Low usage |
|
||||
| [IBM DB2](https://www.ibm.com/docs/db2/11.5?topic=adonet-data-server-provider-net) | Low usage |
|
||||
| [Couchbase](https://www.nuget.org/packages/CouchbaseNetClient) | Low usage |
|
||||
| [LINQ to SQL](https://docs.microsoft.com/dotnet/framework/data/adonet/sql/linq/) | Legacy technology and pattern. Wait until there is enough interest. |
|
||||
| [Microsoft.Practices.EnterpriseLibrary.Data](https://docs.microsoft.com/previous-versions/msp-n-p/dn440726(v=pandp.60)) | Legacy technology and pattern. Wait until there is enough interest. |
|
||||
| [Polly](http://www.thepollyproject.org/) | Waiting for interest and further analysis. |
|
||||
| [gRPC for C#](https://github.com/grpc/grpc/tree/master/src/csharp) | Library is deprecated. |
|
||||
| [MSMQ](https://docs.microsoft.com/previous-versions/windows/desktop/msmq/ms711472(v=vs.85)) | This is a legacy system. Wait until there is enough interest. |
|
||||
| Library | Notes |
|
||||
|-------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [System.IO.Pipelines](https://docs.microsoft.com/dotnet/standard/io/pipelines) | This library is used for high-throughput scenarios and instrumenting this library could potentially impact the performance of the application in a negative manner. |
|
||||
| [Pipelines.Sockets.Unofficial](https://github.com/mgravell/Pipelines.Sockets.Unofficial) | This is a lower-level networking library and instrumenting it can affect the performance of an application in negative ways causing an increase in network traffic (as compared to the application running without instrumentation). |
|
||||
| [System.Threading.Channels](https://docs.microsoft.com/dotnet/api/system.threading.channels) | This is a lower-level library and may not provide enough contextual information on its own. |
|
||||
| [Cassandra](https://www.nuget.org/packages/CassandraCSharpDriver) | Low usage |
|
||||
| [IBM DB2](https://www.ibm.com/docs/db2/11.5?topic=adonet-data-server-provider-net) | Low usage |
|
||||
| [Couchbase](https://www.nuget.org/packages/CouchbaseNetClient) | Low usage |
|
||||
| [LINQ to SQL](https://docs.microsoft.com/dotnet/framework/data/adonet/sql/linq/) | Legacy technology and pattern. Wait until there is enough interest. |
|
||||
| [Microsoft.Practices.EnterpriseLibrary.Data](https://docs.microsoft.com/previous-versions/msp-n-p/dn440726(v=pandp.60)) | Legacy technology and pattern. Wait until there is enough interest. |
|
||||
| [Polly](https://github.com/App-vNext/Polly) | Waiting for interest and further analysis. |
|
||||
| [gRPC for C#](https://github.com/grpc/grpc/tree/master/src/csharp) | Library is deprecated. |
|
||||
| [MSMQ](https://docs.microsoft.com/previous-versions/windows/desktop/msmq/ms711472(v=vs.85)) | This is a legacy system. Wait until there is enough interest. |
|
||||
|
||||
[^not_on_framework]: Not supported on .NET framework.
|
||||
[^grpc_client_only]: Only [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client)
|
||||
|
|
|
@ -3,26 +3,20 @@
|
|||
## fmt
|
||||
|
||||
* Source: <https://github.com/fmtlib/fmt/>
|
||||
* Version: 9.1.0
|
||||
* Version: 10.1.1
|
||||
|
||||
### Setup
|
||||
|
||||
Package is acquired via [Microsoft vcpkg](https://github.com/microsoft/vcpkg)
|
||||
Package is acquired via Github release.
|
||||
|
||||
1. [Setup vcpkg](https://github.com/microsoft/vcpkg#quick-start-windows)
|
||||
1. Install static fmt packages
|
||||
|
||||
```powershell
|
||||
.\vcpkg install fmt:x86-windows-static
|
||||
.\vcpkg install fmt:x64-windows-static
|
||||
```
|
||||
|
||||
1. Find packages in `vcpkg\packages` and copy to `opentelemetry-dotnet-instrumentation\src\OpenTelemetry.AutoInstrumentation.Native\lib`
|
||||
1. Download source code (zip) from release
|
||||
1. Copy content of main folder, `src`, `include`, and `support` to `opentelemetry-dotnet-instrumentation\src\OpenTelemetry.AutoInstrumentation.Native\lib\fmt`
|
||||
1. Resync `src` files and references in `opentelemetry-dotnet-instrumentation\src\OpenTelemetry.AutoInstrumentation.Native\OpenTelemetry.AutoInstrumentation.Native.vcxproj`
|
||||
|
||||
## spdlog
|
||||
|
||||
* Source: <https://github.com/gabime/spdlog>
|
||||
* Version: 1.11.0
|
||||
* Version: 1.12.0
|
||||
|
||||
### Setup
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
# Dependency bumping
|
||||
|
||||
## Tracked by version
|
||||
|
||||
This section describes dependencies that require a periodical version bump.
|
||||
|
||||
| Dependency | Files | Bumping | Notes |
|
||||
|--------------|----------------------------|------------|----------------------------------------------------------|
|
||||
| NuGet | `*.csproj`, `*.props` | Dependabot | Test packages might need to stay on a certain version. |
|
||||
| GitHub CI | `./github/workflows/*.yml` | Dependabot | Bumps GitHub step templates |
|
||||
| Docker | `*.dockerfile` | Dependabot | Bumps Docker image versions |
|
||||
| Docker | `docker-compose.yml` | Manual | Search for `image:` |
|
||||
| .NET SDK | `(CI templates)` | Manual | Search for `actions/setup-dotnet` or `dotnetSdkVersion:` |
|
||||
| GitHub CI OS | `./github/workflows/*.yml` | Manual | Search for `runs-on:` |
|
||||
| APK | `alpine.dockerfile` | Manual | Search for `apk add` |
|
||||
|
||||
## Tracked by checksum
|
||||
|
||||
This section describes dependencies tracked and verified using hardcoded
|
||||
checksum values.
|
||||
|
||||
| Dependency | Files | Bumping | Checksum | Notes |
|
||||
|-------------------|----------------|---------|----------|-------|
|
||||
| dotnet-install.sh | `*.dockerfile` | Manual | SHA256 | |
|
|
@ -0,0 +1,63 @@
|
|||
# Log to trace correlation
|
||||
|
||||
## [Logs bridges](https://opentelemetry.io/docs/specs/otel/glossary/#log-appender--bridge)
|
||||
|
||||
### `ILogger`
|
||||
|
||||
> [!NOTE]
|
||||
> Automatic log to trace correlation provided by OpenTelemetry .NET Automatic Instrumentation
|
||||
> currently works only for .NET applications using `Microsoft.Extensions.Logging`.
|
||||
> See [#2310](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2310)
|
||||
> and [config](./config.md#logs-instrumentations) for more details.
|
||||
|
||||
OpenTelemetry .NET SDK automatically correlates logs to trace data.
|
||||
When logs are emitted in the context of an active trace, trace context
|
||||
[fields](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#trace-context-fields)
|
||||
`TraceId`, `SpanId`, `TraceState` are automatically populated.
|
||||
|
||||
The following are logs produced by the sample console
|
||||
[application](../examples/demo/Service/Program.cs):
|
||||
|
||||
```json
|
||||
"logRecords": [
|
||||
{
|
||||
"timeUnixNano": "1679392614538226700",
|
||||
"severityNumber": 9,
|
||||
"severityText": "Information",
|
||||
"body": {
|
||||
"stringValue": "Success! Today is: {Date:MMMM dd, yyyy}"
|
||||
},
|
||||
"flags": 1,
|
||||
"traceId": "21df288eada1ce4ace6c40f39a6d7ce1",
|
||||
"spanId": "a80119e5a05fed5a"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Further reading:
|
||||
|
||||
- [OpenTelemetry .NET SDK](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/logs/correlation)
|
||||
- [OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#trace-context-fields)
|
||||
|
||||
### `log4net`
|
||||
|
||||
See [`log4net-bridge`](./log4net-bridge.md).
|
||||
|
||||
## `log4net` trace context injection
|
||||
|
||||
> [!IMPORTANT]
|
||||
> log4net trace context injection is an experimental feature.
|
||||
|
||||
The `log4net` trace context injection is enabled by default.
|
||||
It can be disabled by setting `OTEL_DOTNET_AUTO_LOGS_LOG4NET_INSTRUMENTATION_ENABLED` to `false`.
|
||||
|
||||
Context injection is supported for `log4net` in versions >= 2.0.13 && < 4.0.0
|
||||
|
||||
Following properties are set by default on the collection of logging event's properties:
|
||||
|
||||
- `trace_id`
|
||||
- `span_id`
|
||||
- `trace_flags`
|
||||
|
||||
This allows for trace context to be logged into currently configured log destination,
|
||||
e.g. a file. In order to use them, pattern needs to be updated.
|
|
@ -0,0 +1,52 @@
|
|||
# `log4net` [logs bridge](https://opentelemetry.io/docs/specs/otel/glossary/#log-appender--bridge)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> log4net bridge is an experimental feature.
|
||||
|
||||
The `log4net` logs bridge is disabled by default. In order to enable it, set `OTEL_DOTNET_AUTO_LOGS_ENABLE_LOG4NET_BRIDGE` to `true`.
|
||||
|
||||
Bridge is supported for `log4net` in versions >= 2.0.13 && < 4.0.0
|
||||
|
||||
If `log4net` is used as a [logging provider](https://learn.microsoft.com/en-us/dotnet/core/extensions/logging-providers), `log4net` bridge should not be enabled, in order
|
||||
to reduce possibility of duplicated logs export.
|
||||
|
||||
When `log4net` logs bridge is enabled, and `log4net` is configured with at least 1 appender, application logs are exported in OTLP
|
||||
format by default to the local instance of OpenTelemetry Collector, in addition to being written into their currently configured destination (e.g. a file).
|
||||
|
||||
## `log4net` logging events conversion
|
||||
|
||||
`log4net`'s `LoggingEvent`s are converted to OpenTelemetry log records in a following way:
|
||||
|
||||
- `TimeStampUtc` is set as a `Timestamp`
|
||||
- `Level.Name` is set as a `SeverityText`
|
||||
- If formatted strings were used for logging (e.g. by using `InfoFormat` or similar), format string is set as a `Body`
|
||||
- Otherwise, `RenderedMessage` is set as a `Body`
|
||||
- If formatted strings were used for logging, format arguments are added as attributes, with indexes as their names
|
||||
- If formatted strings were used for logging, and `OTEL_DOTNET_AUTO_LOGS_INCLUDE_FORMATTED_MESSAGE` is set, rendered message
|
||||
is added as `log4net.rendered_message` attribute
|
||||
- `LoggerName` is set as an `InstrumentationScope.Name`
|
||||
- `Properties`, apart from builtin properties prefixed with `log4net:`, are added as attributes
|
||||
- `Exception` is used to populate the following properties: `exception.type`,`exception.message`,`exception.stacktrace`
|
||||
- `Level.Value` is mapped to `SeverityNumber` as outlined in the next section
|
||||
|
||||
### `log4net` level severity mapping
|
||||
|
||||
`log4net` levels are mapped to OpenTelemetry severity types according to the following rules based on their numerical values.
|
||||
|
||||
Levels with numerical values of:
|
||||
|
||||
- Equal to `Level.Fatal` or higher are mapped to `LogRecordSeverity.Fatal`
|
||||
- Higher than or equal to `Level.Error` but lower than `Level.Fatal` are mapped to `LogRecordSeverity.Error`
|
||||
- Higher than or equal to `Level.Warn` but lower than `Level.Error` are mapped to `LogRecordSeverity.Warn`
|
||||
- Higher than or equal to `Level.Info` but lower than `Level.Warn` are mapped to `LogRecordSeverity.Info`
|
||||
- Higher than or equal to `Level.Debug` but lower than `Level.Info` are mapped to `LogRecordSeverity.Debug`
|
||||
- Lower than `Level.Debug` are mapped to `LogRecordSeverity.Trace`
|
||||
|
||||
## Known limitations of `log4net` bridge
|
||||
|
||||
In order for the bridge to be added, at least 1 other appender has to be configured.
|
||||
Bridge should not be used when appenders are configured for both root and component loggers.
|
||||
Enabling a bridge in such scenario would result in bridge being appended to both appender collections,
|
||||
and logs duplication.
|
||||
|
||||
|
|
@ -5,12 +5,14 @@ manual instrumentation. By using both automatic and manual instrumentation, you
|
|||
better instrument the logic and functionality of your applications, clients,
|
||||
and frameworks.
|
||||
|
||||
## Traces
|
||||
|
||||
To create your custom traces manually, follow these steps:
|
||||
|
||||
1. Add the `System.Diagnostics.DiagnosticSource` dependency to your project:
|
||||
|
||||
```xml
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="7.0.0" />
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.0" />
|
||||
```
|
||||
|
||||
2. Create an `ActivitySource` instance:
|
||||
|
@ -39,6 +41,46 @@ You can see a sample console application with manual instrumentation [here](../e
|
|||
> Note that an `Activity` created for `NonRegistered.ManualInstrumentations`
|
||||
`ActivitySource` is not handled by the OpenTelemetry Automatic Instrumentation.
|
||||
|
||||
Further reading:
|
||||
## Metrics
|
||||
|
||||
To create your custom metrics manually, follow these steps:
|
||||
|
||||
1. Add the `System.Diagnostics.DiagnosticSource` dependency to your project:
|
||||
|
||||
```xml
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.0" />
|
||||
```
|
||||
|
||||
2. Create a `Meter` instance:
|
||||
|
||||
```csharp
|
||||
using var meter = new Meter("Examples.Service", "1.0");
|
||||
```
|
||||
|
||||
3. Create an `Instrument`:
|
||||
|
||||
```csharp
|
||||
var successCounter = meter.CreateCounter<long>("srv.successes.count", description: "Number of successful responses");
|
||||
```
|
||||
|
||||
4. Update the `Instrument` value. Optionally, set tags:
|
||||
|
||||
```csharp
|
||||
successCounter.Add(1, new KeyValuePair<string, object?>("tagName", "tagValue"));
|
||||
```
|
||||
|
||||
5. Register your `Meter` with OpenTelemetry.AutoInstrumentation by setting the
|
||||
`OTEL_DOTNET_AUTO_METRICS_ADDITIONAL_SOURCES` environment variable:
|
||||
|
||||
```bash
|
||||
OTEL_DOTNET_AUTO_METRICS_ADDITIONAL_SOURCES=Examples.Service
|
||||
```
|
||||
|
||||
You can set the value to either `Examples.Service`
|
||||
or to `Examples.*`, which registers the entire prefix.
|
||||
|
||||
You can see a sample console application with manual metric instrumentation [here](../examples/demo/Service/Program.cs).
|
||||
|
||||
## Further reading
|
||||
|
||||
- [OpenTelemetry.io documentation for .NET Manual Instrumentation](https://opentelemetry.io/docs/instrumentation/net/manual/#setting-up-an-activitysource)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# Plugins
|
||||
|
||||
**Status**: [Experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md).
|
||||
|
||||
You can use `OTEL_DOTNET_AUTO_PLUGINS` environment variable to extend the
|
||||
configuration and overwrite options of the OpenTelemetry .NET SDK Tracer, Meter or
|
||||
Logs. A plugin must be a non-static, non-abstract class which has a default constructor
|
||||
|
@ -16,8 +18,28 @@ public class MyPlugin
|
|||
// My custom logic here
|
||||
}
|
||||
|
||||
// To configure tracing SDK
|
||||
public OpenTelemetry.Trace.TracerProviderBuilder ConfigureTracerProvider(OpenTelemetry.Trace.TracerProviderBuilder builder)
|
||||
// To access TracerProvider right after TracerProviderBuilder.Build() is executed.
|
||||
public void TracerProviderInitialized(TracerProvider tracerProvider)
|
||||
{
|
||||
// My custom logic here
|
||||
}
|
||||
|
||||
// To access MeterProvider right after MeterProviderBuilder.Build() is executed.
|
||||
public void MeterProviderInitialized(MeterProvider meterProvider)
|
||||
{
|
||||
// My custom logic here
|
||||
}
|
||||
|
||||
// To configure tracing SDK before Auto Instrumentation configured SDK
|
||||
public OpenTelemetry.Trace.TracerProviderBuilder BeforeConfigureTracerProvider(OpenTelemetry.Trace.TracerProviderBuilder builder)
|
||||
{
|
||||
// My custom logic here
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
// To configure tracing SDK after Auto Instrumentation configured SDK
|
||||
public OpenTelemetry.Trace.TracerProviderBuilder AfterConfigureTracerProvider(OpenTelemetry.Trace.TracerProviderBuilder builder)
|
||||
{
|
||||
// My custom logic here
|
||||
|
||||
|
@ -31,8 +53,16 @@ public class MyPlugin
|
|||
// Find supported options below
|
||||
}
|
||||
|
||||
// To configure metrics SDK
|
||||
public OpenTelemetry.Metrics.MeterProviderBuilder ConfigureMeterProvider(OpenTelemetry.Metrics.MeterProviderBuilder builder)
|
||||
// To configure metrics SDK before Auto Instrumentation configured SDK
|
||||
public OpenTelemetry.Metrics.MeterProviderBuilder BeforeConfigureMeterProvider(OpenTelemetry.Metrics.MeterProviderBuilder builder)
|
||||
{
|
||||
// My custom logic here
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
// To configure metrics SDK after Auto Instrumentation configured SDK
|
||||
public OpenTelemetry.Metrics.MeterProviderBuilder AfterConfigureMeterProvider(OpenTelemetry.Metrics.MeterProviderBuilder builder)
|
||||
{
|
||||
// My custom logic here
|
||||
|
||||
|
@ -72,45 +102,49 @@ public class MyPlugin
|
|||
}
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Automatic Instrumentation can configure particular properties before calling
|
||||
> `Configure{Signal}Methods`. It is plugin responsibility to not override this behavior.
|
||||
> Example: `OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions.EnrichWithHttpWebRequest`
|
||||
> is conditionally set by this project.
|
||||
|
||||
## Supported Options
|
||||
|
||||
### Tracing
|
||||
|
||||
| Options type | NuGet package | NuGet version |
|
||||
|------------------------------------------------------------------------------------------------|---------------------------------------------------|---------------|
|
||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Exporter.ZipkinExporterOptions | OpenTelemetry.Exporter.Zipkin | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Instrumentation.AspNet.AspNetInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.0.0-rc9.7 |
|
||||
| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.0.0-rc9.12 |
|
||||
| OpenTelemetry.Instrumentation.EntityFrameworkCore.EntityFrameworkInstrumentationOptions | OpenTelemetry.Instrumentation.EntityFrameworkCore | 1.0.0-beta.4 |
|
||||
| OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientInstrumentationOptions | OpenTelemetry.Instrumentation.GrpcNetClient | 1.0.0-rc9.12 |
|
||||
| OpenTelemetry.Instrumentation.Http.HttpClientInstrumentationOptions | OpenTelemetry.Instrumentation.Http | 1.0.0-rc9.12 |
|
||||
| OpenTelemetry.Instrumentation.Quartz.QuartzInstrumentationOptions | OpenTelemetry.Instrumentation.Quartz | 1.0.0-alpha.1 |
|
||||
| OpenTelemetry.Instrumentation.SqlClient.SqlClientInstrumentationOptions | OpenTelemetry.Instrumentation.SqlClient | 1.0.0-rc9.12 |
|
||||
| OpenTelemetry.Instrumentation.StackExchangeRedis.StackExchangeRedisCallsInstrumentationOptions | OpenTelemetry.Instrumentation.StackExchangeRedis | 1.0.0-rc9.7 |
|
||||
| OpenTelemetry.Instrumentation.MySqlData.MySqlDataInstrumentationOptions | OpenTelemetry.Instrumentation.MySqlData | 1.0.0-beta.5 |
|
||||
| OpenTelemetry.Instrumentation.Wcf.WcfInstrumentationOptions | OpenTelemetry.Instrumentation.Wcf | 1.0.0-rc.8 |
|
||||
| Options type | NuGet package | NuGet version |
|
||||
|-------------------------------------------------------------------------------------------|---------------------------------------------------|---------------|
|
||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.12.0 |
|
||||
| OpenTelemetry.Exporter.ZipkinExporterOptions | OpenTelemetry.Exporter.Zipkin | 1.12.0 |
|
||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.12.0 |
|
||||
| OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.12.0-beta.1 |
|
||||
| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.12.0 |
|
||||
| OpenTelemetry.Instrumentation.EntityFrameworkCore.EntityFrameworkInstrumentationOptions | OpenTelemetry.Instrumentation.EntityFrameworkCore | 1.12.0-beta.2 |
|
||||
| OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.GrpcNetClient | 1.12.0-beta.1 |
|
||||
| OpenTelemetry.Instrumentation.Http.HttpClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.Http | 1.12.0 |
|
||||
| OpenTelemetry.Instrumentation.Quartz.QuartzInstrumentationOptions | OpenTelemetry.Instrumentation.Quartz | 1.12.0-beta.1 |
|
||||
| OpenTelemetry.Instrumentation.SqlClient.SqlClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.SqlClient | 1.12.0-beta.2 |
|
||||
| OpenTelemetry.Instrumentation.StackExchangeRedis.StackExchangeRedisInstrumentationOptions | OpenTelemetry.Instrumentation.StackExchangeRedis | 1.12.0-beta.2 |
|
||||
| OpenTelemetry.Instrumentation.Wcf.WcfInstrumentationOptions | OpenTelemetry.Instrumentation.Wcf | 1.12.0-beta.1 |
|
||||
|
||||
### Metrics
|
||||
|
||||
| Options type | NuGet package | NuGet version |
|
||||
|----------------------------------------------------------------------------------|------------------------------------------------|---------------|
|
||||
| OpenTelemetry.Metrics.MetricReaderOptions | OpenTelemetry | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Exporter.PrometheusExporterOptions | OpenTelemetry.Exporter.Prometheus.HttpListener | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreMetricsInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.0.0-rc9.12 |
|
||||
| OpenTelemetry.Instrumentation.Runtime.RuntimeInstrumentationOptions | OpenTelemetry.Instrumentation.Runtime | 1.1.0-beta.4 |
|
||||
| OpenTelemetry.Instrumentation.Process.ProcessInstrumentationOptions | OpenTelemetry.Instrumentation.Process | 1.0.0-alpha.5 |
|
||||
| Options type | NuGet package | NuGet version |
|
||||
|--------------------------------------------------------------------------|------------------------------------------------|---------------|
|
||||
| OpenTelemetry.Metrics.MetricReaderOptions | OpenTelemetry | 1.12.0 |
|
||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.12.0 |
|
||||
| OpenTelemetry.Exporter.PrometheusExporterOptions | OpenTelemetry.Exporter.Prometheus.HttpListener | 1.12.0-beta.1 |
|
||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.12.0 |
|
||||
| OpenTelemetry.Instrumentation.AspNet.AspNetMetricsInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.12.0-beta.1 |
|
||||
| OpenTelemetry.Instrumentation.Runtime.RuntimeInstrumentationOptions | OpenTelemetry.Instrumentation.Runtime | 1.12.0 |
|
||||
|
||||
### Logs
|
||||
|
||||
| Options type | NuGet package | NuGet version |
|
||||
|-----------------------------------------------|----------------------------------------------|---------------|
|
||||
| OpenTelemetry.Logs.OpenTelemetryLoggerOptions | OpenTelemetry | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.4.0-rc.3 |
|
||||
| OpenTelemetry.Logs.OpenTelemetryLoggerOptions | OpenTelemetry | 1.12.0 |
|
||||
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.12.0 |
|
||||
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.12.0 |
|
||||
|
||||
## Requirements
|
||||
|
||||
|
|
|
@ -1,26 +1,32 @@
|
|||
# Release Process
|
||||
|
||||
1. Update stability status in [`config.md`](config.md) if needed.
|
||||
|
||||
1. Update documentation links to refer to a tag instead of `main` branch.
|
||||
|
||||
1. Update the version in the following files:
|
||||
|
||||
- [`OpenTelemetry.DotNet.Auto.psm1`](../OpenTelemetry.DotNet.Auto.psm1)
|
||||
- [`otel-dotnet-auto-install.sh`](../otel-dotnet-auto-install.sh)
|
||||
- [`docs/README.md`](./README.md)
|
||||
- [`nuget/OpenTelemetry.AutoInstrumentation.nuspec`](../nuget/OpenTelemetry.AutoInstrumentation.nuspec)
|
||||
- [`src/OpenTelemetry.AutoInstrumentation/Constants.cs`](../src/OpenTelemetry.AutoInstrumentation/Constants.cs)
|
||||
- [`src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj`](../src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj)
|
||||
- [`src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj`](../src/OpenTelemetry.AutoInstrumentation.Loader/OpenTelemetry.AutoInstrumentation.Loader.csproj)
|
||||
- [`src/OpenTelemetry.AutoInstrumentation.Native/CMakeLists.txt`](../src/OpenTelemetry.AutoInstrumentation.Native/CMakeLists.txt)
|
||||
- [`src/OpenTelemetry.AutoInstrumentation.Native/Resource.rc`](../src/OpenTelemetry.AutoInstrumentation.Native/Resource.rc)
|
||||
- [`src/OpenTelemetry.AutoInstrumentation.Native/otel_profiler_constants.h`](../src/OpenTelemetry.AutoInstrumentation.Native/otel_profiler_constants.h)
|
||||
- [`src/OpenTelemetry.AutoInstrumentation.Native/version.h`](../src/OpenTelemetry.AutoInstrumentation.Native/version.h)
|
||||
|
||||
1. Update the [CHANGELOG.md](../CHANGELOG.md) with the new release.
|
||||
Remove empty sections for the version being released.
|
||||
|
||||
1. Stable release only! Update `PublicAPI.Shipped.txt` based on corresponding `PublicAPI.Unshipped.txt`.
|
||||
|
||||
1. Create a pull request with `release PR` label on GitHub
|
||||
with the changes described in the changelog.
|
||||
|
||||
|
||||
1. Add tests section in pull request description displaying current status of testing:
|
||||
|
||||
```markdown
|
||||
## Tests
|
||||
|
||||
- [ ] CI
|
||||
- [ ] MacOS with Linux Containers
|
||||
- [ ] Windows with Linux Containers
|
||||
```
|
||||
|
||||
1. Run the integration tests with Linux containers on Windows and macOS
|
||||
(not covered by CI):
|
||||
|
||||
|
@ -50,7 +56,16 @@
|
|||
|
||||
1. Check the status of [the `release-publish` GitHub workflow](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/actions/workflows/release-publish.yml).
|
||||
|
||||
1. For a non-RC and non-beta release, update the version in:
|
||||
1. If the `release-publish` GitHub workflow succeeds, publish the NuGet packages:
|
||||
1. Unzip `opentelemetry-dotnet-instrumentation-nuget-packages.zip` to a local
|
||||
folder.
|
||||
1. Upload and publish the packages (`.nupkg`)
|
||||
and corresponding symbol packages (`.snupkg`) to nuget.org.
|
||||
|
||||
1. For a stable release, update the version in:
|
||||
|
||||
- [`examples/demo/Dockerfile`](../examples/demo/Dockerfile)
|
||||
- [OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator/blob/main/autoinstrumentation/dotnet/version.txt)
|
||||
- [OpenTelemetry Demo](https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/accounting/Accounting.csproj#L20)
|
||||
|
||||
1. For a stable release, update documentation under [opentelemetry.io](https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/zero-code/dotnet).
|
||||
|
|
|
@ -1,42 +1,177 @@
|
|||
# Troubleshooting
|
||||
|
||||
## dotnet is crashing
|
||||
## General steps
|
||||
|
||||
Currently, instrumenting self-contained applications and the `dotnet`
|
||||
CLI tool in particular is not supported.
|
||||
See [(#1744)](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/1744).
|
||||
If you encounter any issue with OpenTelemetry .NET Automatic Instrumentation,
|
||||
there are steps that can help you understand the issue.
|
||||
|
||||
Therefore, we advise executing `dotnet build` before instrumenting the terminal session
|
||||
### Enable detailed logging
|
||||
|
||||
Detailed debug logs can help you troubleshoot instrumentation issues, and can be
|
||||
attached to issues in this project to facilitate investigation.
|
||||
|
||||
To get the detailed logs from the OpenTelemetry .NET Automatic Instrumentation, set
|
||||
the [`OTEL_LOG_LEVEL`](./config.md#internal-logs) environment variable to `debug`
|
||||
before the instrumented process starts.
|
||||
|
||||
By default, the library writes the log files under predefined [locations](./config.md#internal-logs).
|
||||
If needed, change the default location by updating the `OTEL_DOTNET_AUTO_LOG_DIRECTORY`
|
||||
environment variable.
|
||||
|
||||
After obtaining the logs, remove the `OTEL_LOG_LEVEL`
|
||||
environment variable, or set it to less verbose level
|
||||
to avoid unnecessary overhead.
|
||||
|
||||
### Enable host tracing
|
||||
|
||||
[Host tracing](https://github.com/dotnet/runtime/blob/edd23fcb1b350cb1a53fa409200da55e9c33e99e/docs/design/features/host-tracing.md#host-tracing)
|
||||
can be used to gather the information needed to investigate the problems
|
||||
related to various issues, like assemblies not being found. Set the following environment
|
||||
variables:
|
||||
|
||||
```terminal
|
||||
COREHOST_TRACE=1
|
||||
COREHOST_TRACEFILE=corehost_verbose_tracing.log
|
||||
```
|
||||
|
||||
Then restart the application to collect the logs.
|
||||
|
||||
## Common issues
|
||||
|
||||
### No telemetry is produced
|
||||
|
||||
#### Symptoms
|
||||
|
||||
There is no telemetry generated.
|
||||
There are no logs in OpenTelemetry .NET Automatic Instrumentation internal logs [location](./config.md#internal-logs).
|
||||
|
||||
It might occur that the .NET Profiler is unable to attach
|
||||
and therefore no logs would be emitted.
|
||||
|
||||
#### Solution
|
||||
|
||||
The most common reason is that the instrumented application
|
||||
has no permissions to load the OpenTelemetry .NET Automatic Instrumentation
|
||||
assemblies.
|
||||
|
||||
### Could not install package 'OpenTelemetry.AutoInstrumentation.Runtime.Native'
|
||||
|
||||
#### Symptoms
|
||||
|
||||
When adding the NuGet packages to your project you get an error message similar
|
||||
to:
|
||||
|
||||
```txt
|
||||
Could not install package 'OpenTelemetry.AutoInstrumentation.Runtime.Native 1.9.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
|
||||
```
|
||||
|
||||
#### Solution
|
||||
|
||||
The NuGet packages don't support old-style `csproj` projects. Either deploy the
|
||||
automatic instrumentation to the [machine instead of using NuGet packages](./README.md###powershell-module),
|
||||
or migrate your project to the SDK style `csproj`.
|
||||
|
||||
### Performance issues
|
||||
|
||||
#### Symptoms
|
||||
|
||||
High CPU usage.
|
||||
|
||||
#### Solution
|
||||
|
||||
Make sure that you have not enabled the automatic instrumentation globally
|
||||
by setting the environment variables at system or user scope.
|
||||
|
||||
If the usage of system or user scope is intentional, use the [`OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES`](./config.md#global-settings)
|
||||
environment variables to exclude applications from the automatic instrumentation.
|
||||
|
||||
### `dotnet` CLI tool is crashing
|
||||
|
||||
#### Symptoms
|
||||
|
||||
You get error messages similar to the one below when running an app,
|
||||
for example with `dotnet run`:
|
||||
|
||||
```txt
|
||||
PS C:\Users\Administrator\Desktop\OTelConsole-NET6.0> dotnet run My.Simple.Console
|
||||
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
|
||||
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
|
||||
---> System.TypeInitializationException: The type initializer for 'OpenTelemetry.AutoInstrumentation.Loader.Startup' threw an exception.
|
||||
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
|
||||
---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
|
||||
```
|
||||
|
||||
#### Related issues
|
||||
|
||||
- [#1744](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/1744)
|
||||
|
||||
#### Solution
|
||||
|
||||
With version `v0.6.0-beta.1` and lower, there were issues when instrumenting
|
||||
the `dotnet` CLI tool.
|
||||
|
||||
Therefore, if you are using one of these versions, we advise executing
|
||||
`dotnet build` before instrumenting the terminal session
|
||||
or calling it in a separate terminal session.
|
||||
|
||||
See the [Get started](./README.md#get-started)
|
||||
section for more information.
|
||||
|
||||
## Assembly version conflicts
|
||||
### Assembly version conflicts
|
||||
|
||||
OpenTelemetry .NET NuGet packages and its dependencies
|
||||
are deployed with the OpenTelemetry .NET Automatic Instrumentation.
|
||||
#### Symptoms
|
||||
|
||||
In case of assembly version conflicts you may get a `TargetInvocationException`.
|
||||
For example:
|
||||
Error message similar to the one below:
|
||||
|
||||
```txt
|
||||
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
|
||||
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
|
||||
---> System.TypeInitializationException: The type initializer for 'OpenTelemetry.AutoInstrumentation.Loader.Startup' threw an exception.
|
||||
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
|
||||
---> System.TypeLoadException: Could not load type 'OpenTelemetry.Exporter.OtlpExportProtocol' from assembly 'OpenTelemetry.Exporter.OpenTelemetryProtocol, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7bd6737fe5b67e3c'.
|
||||
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
|
||||
|
||||
File name: 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
|
||||
at Microsoft.AspNetCore.Builder.WebApplicationBuilder..ctor(WebApplicationOptions options, Action`1 configureDefaults)
|
||||
at Microsoft.AspNetCore.Builder.WebApplication.CreateBuilder(String[] args)
|
||||
at Program.<Main>$(String[] args) in /Blog.Core/Blog.Core.Api/Program.cs:line 26
|
||||
```
|
||||
|
||||
To handle dependency versions conflicts,
|
||||
update the instrumented application's project references
|
||||
to use the same versions.
|
||||
#### Related issues
|
||||
|
||||
For .NET Framework applications the assembly references are, by default, updated
|
||||
- [#2269](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2269)
|
||||
- [#2296](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2296)
|
||||
|
||||
#### Solution
|
||||
|
||||
OpenTelemetry .NET NuGet packages and their dependencies
|
||||
are deployed with the OpenTelemetry .NET Automatic Instrumentation. To avoid
|
||||
dependency version conflicts, the recommended way to install the automatic
|
||||
instrumentation is using the NuGet packages. For instructions on how to add the
|
||||
packages to your application, and the limitations of this installation method,
|
||||
see [Using the OpenTelemetry.AutoInstrumentation NuGet packages](./using-the-nuget-packages.md#using-the-opentelemetryautoinstrumentation-nuget-packages).
|
||||
|
||||
Alternatively, you can handle the dependency versions conflicts by
|
||||
updating the instrumented application's project references
|
||||
to use the same versions as OpenTelemetry .NET Automatic Instrumentation.
|
||||
|
||||
The following dependencies are used by OpenTelemetry .NET Automatic Instrumentation:
|
||||
|
||||
- [OpenTelemetry.AutoInstrumentation](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj)
|
||||
- [OpenTelemetry.AutoInstrumentation.AdditionalDeps](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/Directory.Build.props)
|
||||
|
||||
Find their versions in the following locations:
|
||||
|
||||
- [Directory.Packages.props](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/Directory.Packages.props)
|
||||
- [src/Directory.Packages.props](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/src/Directory.Packages.props)
|
||||
- [src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/Directory.Packages.props](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/Directory.Packages.props)
|
||||
|
||||
By default, assembly references for .NET Framework applications are redirected
|
||||
during runtime to the versions used by the automatic instrumentation.
|
||||
This behavior can be controlled via the [`OTEL_DOTNET_AUTO_NETFX_REDIRECT_ENABLED`](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docs/config.md#additional-settings)
|
||||
This behavior can be controlled through the [`OTEL_DOTNET_AUTO_NETFX_REDIRECT_ENABLED`](./config.md#additional-settings)
|
||||
setting.
|
||||
|
||||
If the application already ships binding redirection for assemblies
|
||||
used by automatic instrumentation this automatic redirection may fail,
|
||||
see [#2833](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2833).
|
||||
Check if any existing binding redirect prevent redirection to the versions
|
||||
listed at [netfx_assembly_redirection.h](../src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h).
|
||||
|
||||
For the automatic redirection above to work there are two specific scenarios that
|
||||
require the assemblies used to instrument .NET Framework
|
||||
applications, the ones under the `netfx` folder of the installation directory,
|
||||
|
@ -48,42 +183,52 @@ of assemblies loaded as domain-neutral.
|
|||
different versions of some assemblies also shipped in the `netfx` folder.
|
||||
|
||||
If you are having problems in one of the scenarios above run again the
|
||||
`Install-OpenTelemetryCore` command from the
|
||||
[PowerShell installation module](../OpenTelemetry.DotNet.Auto.psm1)
|
||||
to ensure that the required GAC installations are updated.
|
||||
`Install-OpenTelemetryCore` command from the PowerShell installation module
|
||||
`OpenTelemetry.DotNet.Auto.psm1` to ensure that the required GAC installations
|
||||
are updated.
|
||||
|
||||
For more information about the GAC usage by the automatic instrumentation,
|
||||
see [here](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/1906#issuecomment-1376292814).
|
||||
|
||||
## High CPU usage
|
||||
### Assembly in AdditionalDeps was not found
|
||||
|
||||
Make sure that you have not enabled the automatic instrumentation globally
|
||||
by setting the environment variables at system or user scope.
|
||||
#### Symptoms
|
||||
|
||||
If the system or user scope is intended, use the `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES`
|
||||
environment variables to exclude applications from the automatic instrumentation.
|
||||
You get an error message similar to the following:
|
||||
|
||||
## Collect debug logs
|
||||
```txt
|
||||
An assembly specified in the application dependencies manifest (OpenTelemetry.AutoInstrumentation.AdditionalDeps.deps.json) was not found
|
||||
```
|
||||
|
||||
Detailed debug logs can help you troubleshoot instrumentation issues, and can be
|
||||
attached to issues in this project to facilitate investigation.
|
||||
#### Related issues
|
||||
|
||||
To get the detailed logs from the OpenTelemetry .NET Automatic Instrumentation, set
|
||||
the `OTEL_DOTNET_AUTO_DEBUG` environment variable to `true` before the
|
||||
instrumented process starts.
|
||||
- [#1744](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/1744)
|
||||
- [#2181](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2181)
|
||||
|
||||
By default, the library writes the log files under predefined locations. If needed,
|
||||
change the default location by updating the `OTEL_DOTNET_AUTO_LOG_DIRECTORY`
|
||||
environment variable.
|
||||
#### Solution
|
||||
|
||||
After obtaining the logs, remove the `OTEL_DOTNET_AUTO_DEBUG`
|
||||
environment variable to avoid unnecessary overhead.
|
||||
If you encounter an issue not listed on this page, see [General steps](#general-steps)
|
||||
to collect additional diagnostic information. This might help facilitate troubleshooting.
|
||||
|
||||
## Nothing happens
|
||||
### Runtime Store Assembly Version Conflicts
|
||||
|
||||
It may occur that the .NET Profiler is unable to attach
|
||||
and therefore no logs would be emitted.
|
||||
#### Symptoms
|
||||
|
||||
The most common reason is that the instrumented application
|
||||
has no permissions to load the OpenTelemetry .NET Automatic Instrumentation
|
||||
assemblies.
|
||||
Applications may crash or behave unexpectedly due to version mismatches between
|
||||
the application's assemblies and those in the .NET runtime store. The
|
||||
RuntimeStoreDiagnosticRule in RuleEngine helps identify these mismatches by
|
||||
logging a warning if the application references a lower version than the runtime
|
||||
store.
|
||||
|
||||
Sample Diagnostic Output:
|
||||
|
||||
```plaintext
|
||||
[Warning] Rule Engine: Application references lower version of runtime store assembly C:\path\to\assembly.dll - 6.0.0.0.
|
||||
[Debug] Rule Engine: Runtime store assembly C:\path\to\assembly.dll validated successfully.
|
||||
```
|
||||
|
||||
#### Solution
|
||||
|
||||
For resolving runtime store assembly version conflicts, follow the same solution
|
||||
as outlined for [Assembly version conflicts](#assembly-version-conflicts) in
|
||||
this document.
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
# Using the OpenTelemetry.AutoInstrumentation NuGet packages
|
||||
|
||||
## When to use the NuGet packages
|
||||
|
||||
The NuGet packages are the recommended way to deploy automatic instrumentation,
|
||||
but they can't be used in all cases. Use the NuGet packages in the following
|
||||
scenarios:
|
||||
|
||||
1. Simplify deployment. For example, a container running a single application.
|
||||
1. Support instrumentation of [`self-contained`](https://learn.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained)
|
||||
applications.
|
||||
1. Facilitate developer experimentation with automatic instrumentation through
|
||||
NuGet packages.
|
||||
1. Solve version conflicts between the dependencies used by the application and the
|
||||
automatic instrumentation.
|
||||
|
||||
## Limitations
|
||||
|
||||
While NuGet packages are the recommended way to deploy automatic
|
||||
instrumentation, they can't be used in all cases. The most common
|
||||
reasons for not using NuGet packages include the following:
|
||||
|
||||
1. You can't add the package to the application project. For example,
|
||||
the application is from a third party that can't add the package.
|
||||
1. Reduce disk usage, or the size of a virtual machine, when multiple applications
|
||||
to be instrumented are installed in a single machine. In this case you can use
|
||||
a single deployment for all .NET applications running on the machine.
|
||||
1. A legacy application that can't be migrated to the [SDK-style project](https://learn.microsoft.com/en-us/nuget/resources/check-project-format#check-the-project-format).
|
||||
|
||||
## Using the NuGet packages
|
||||
|
||||
To automatically instrument your application with OpenTelemetry .NET add
|
||||
the `OpenTelemetry.AutoInstrumentation` package to your project:
|
||||
|
||||
```terminal
|
||||
dotnet add [<PROJECT>] package OpenTelemetry.AutoInstrumentation
|
||||
```
|
||||
|
||||
If the application references packages that can be instrumented, but, require
|
||||
other packages for the instrumentation to work the build will fail and prompt
|
||||
you to either add the missing instrumentation package or to skip the
|
||||
instrumentation of the corresponding package:
|
||||
|
||||
```terminal
|
||||
~packages/opentelemetry.autoinstrumentation.buildtasks/1.9.0/build/OpenTelemetry.AutoInstrumentation.BuildTasks.targets(29,5): error : OpenTelemetry.AutoInstrumentation: add a reference to the instrumentation package 'OpenTelemetry.Instrumentation.StackExchangeRedis' version 1.9.0-beta.1 or add 'StackExchange.Redis' to the property 'SkippedInstrumentations' to suppress this error.
|
||||
```
|
||||
|
||||
To resolve the error either add the recommended instrumentation package or skip
|
||||
the instrumentation of the listed package by adding it to the `SkippedInstrumentation`
|
||||
property, example:
|
||||
|
||||
```csproj
|
||||
<PropertyGroup>
|
||||
<SkippedInstrumentations>StackExchange.Redis</SkippedInstrumentations>
|
||||
</PropertyGroup>
|
||||
```
|
||||
|
||||
The same property can be also specified directly via the CLI, notice that the
|
||||
separator, `;`, needs to be properly escaped as '%3B':
|
||||
|
||||
```powershell
|
||||
dotnet build -p:SkippedInstrumentations=StackExchange.Redis
|
||||
```
|
||||
|
||||
To distribute the appropriate native runtime components with your .NET application,
|
||||
specify a [Runtime Identifier (RID)](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog)
|
||||
to build the application using `dotnet build` or `dotnet publish`. This might
|
||||
require choosing between distributing a
|
||||
[_self-contained_ or a _framework-dependent_](https://learn.microsoft.com/en-us/dotnet/core/deploying/)
|
||||
application. Both types are compatible with automatic instrumentation.
|
||||
|
||||
Use the script in the output folder of the build to launch the
|
||||
application with automatic instrumentation activated.
|
||||
|
||||
- On Windows, use `instrument.cmd <application_executable>`
|
||||
- On Linux or Unix, use `instrument.sh <application_executable>`
|
||||
|
||||
If you launch the application using the `dotnet` CLI, add `dotnet` after the script.
|
||||
|
||||
- On Windows, use `instrument.cmd dotnet <application>`
|
||||
- On Linux and Unix, use `instrument.sh dotnet <application>`
|
||||
|
||||
The script passes to the application all the command-line parameters you provide.
|
|
@ -4,167 +4,23 @@
|
|||
|
||||
## WCF Client Configuration (.NET Framework)
|
||||
|
||||
Add the `IClientMessageInspector` instrumentation via a behavior extension on
|
||||
the clients you want to instrument:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<system.serviceModel>
|
||||
<extensions>
|
||||
<behaviorExtensions>
|
||||
<add name="telemetryExtension" type="OpenTelemetry.Instrumentation.Wcf.TelemetryEndpointBehaviorExtensionElement, OpenTelemetry.Instrumentation.Wcf" />
|
||||
</behaviorExtensions>
|
||||
</extensions>
|
||||
<behaviors>
|
||||
<endpointBehaviors>
|
||||
<behavior name="telemetry">
|
||||
<telemetryExtension />
|
||||
</behavior>
|
||||
</endpointBehaviors>
|
||||
</behaviors>
|
||||
<bindings>
|
||||
<basicHttpBinding>
|
||||
<binding name="basicHttpConfig">
|
||||
<security mode="None" />
|
||||
</binding>
|
||||
</basicHttpBinding>
|
||||
<netTcpBinding>
|
||||
<binding name="netTCPConfig">
|
||||
<security mode="None" />
|
||||
</binding>
|
||||
</netTcpBinding>
|
||||
</bindings>
|
||||
<client>
|
||||
<endpoint address="http://localhost:9009/Telemetry" binding="basicHttpBinding" bindingConfiguration="basicHttpConfig" behaviorConfiguration="telemetry" contract="TestApplication.Wcf.Client.NetFramework.IStatusServiceContract" name="StatusService_Http" />
|
||||
</client>
|
||||
</system.serviceModel>
|
||||
</configuration>
|
||||
```
|
||||
|
||||
Example project available in
|
||||
[test/test-applications/integrations/TestApplication.Wcf.Client.NetFramework](../test/test-applications/integrations/TestApplication.Wcf.Client.NetFramework/)
|
||||
folder.
|
||||
|
||||
## WCF Client Configuration (.NET)
|
||||
|
||||
Add `OpenTelemetry.Instrumentation.Wcf` and `System.Diagnostics.DiagnosticSource`
|
||||
package to the project. The version of `OpenTelemetry.Instrumentation.Wcf`
|
||||
should match the one used by AutoInstrumentation library to avoid compatibility
|
||||
issues.
|
||||
|
||||
```xml
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="7.0.0" />
|
||||
<PackageReference Include="OpenTelemetry.Instrumentation.Wcf" Version="1.0.0-rc.8" ExcludeAssets="runtime" />
|
||||
</ItemGroup>
|
||||
```
|
||||
|
||||
Add the `IClientMessageInspector` instrumentation as an endpoint behavior on the
|
||||
clients you want to instrument:
|
||||
|
||||
```csharp
|
||||
StatusServiceClient client = new StatusServiceClient(binding, remoteAddress);
|
||||
client.Endpoint.EndpointBehaviors.Add(new TelemetryEndpointBehavior());
|
||||
```
|
||||
|
||||
Example project available in
|
||||
[test/test-applications/integrations/TestApplication.Wcf.Client.DotNet](../test/test-applications/integrations/TestApplication.Wcf.Client.DotNet/)
|
||||
folder.
|
||||
|
||||
## WCF Server Configuration (.NET Framework)
|
||||
|
||||
### Option 1: Instrument by endpoint
|
||||
|
||||
To add the `IDispatchMessageInspector` instrumentation to select endpoints of a
|
||||
service, use the endpoint behavior extension on the service endpoints you want
|
||||
to instrument:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<system.serviceModel>
|
||||
<extensions>
|
||||
<behaviorExtensions>
|
||||
<add name="telemetryExtension" type="OpenTelemetry.Instrumentation.Wcf.TelemetryEndpointBehaviorExtensionElement, OpenTelemetry.Instrumentation.Wcf" />
|
||||
</behaviorExtensions>
|
||||
</extensions>
|
||||
<behaviors>
|
||||
<endpointBehaviors>
|
||||
<behavior name="telemetry">
|
||||
<telemetryExtension />
|
||||
</behavior>
|
||||
</endpointBehaviors>
|
||||
</behaviors>
|
||||
<bindings>
|
||||
<netTcpBinding>
|
||||
<binding name="netTCPConfig">
|
||||
<security mode="None" />
|
||||
</binding>
|
||||
</netTcpBinding>
|
||||
</bindings>
|
||||
<services>
|
||||
<service>
|
||||
<endpoint binding="netTcpBinding" bindingConfiguration="netTCPConfig" behaviorConfiguration="telemetry" contract="TestApplication.Wcf.Server.NetFramework.IStatusServiceContract" />
|
||||
<host>
|
||||
<baseAddresses>
|
||||
<add baseAddress="net.tcp://localhost:9090/Telemetry" />
|
||||
</baseAddresses>
|
||||
</host>
|
||||
</service>
|
||||
</services>
|
||||
</system.serviceModel>
|
||||
</configuration>
|
||||
```
|
||||
|
||||
Example project available in
|
||||
[test/test-applications/integrations/TestApplication.Wcf.Server.NetFramework](../test/test-applications/integrations/TestApplication.Wcf.Server.NetFramework/)
|
||||
folder.
|
||||
|
||||
### Option 2: Instrument by service
|
||||
|
||||
To add the `IDispatchMessageInspector` instrumentation for all endpoints of a
|
||||
service, use the service behavior extension on the services you want to
|
||||
instrument:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<system.serviceModel>
|
||||
<extensions>
|
||||
<behaviorExtensions>
|
||||
<add name="telemetryExtension" type="OpenTelemetry.Instrumentation.Wcf.TelemetryServiceBehaviorExtensionElement, OpenTelemetry.Instrumentation.Wcf" />
|
||||
</behaviorExtensions>
|
||||
</extensions>
|
||||
<behaviors>
|
||||
<serviceBehaviors>
|
||||
<behavior name="telemetry">
|
||||
<telemetryExtension />
|
||||
</behavior>
|
||||
</serviceBehaviors>
|
||||
</behaviors>
|
||||
<bindings>
|
||||
<netTcpBinding>
|
||||
<binding name="netTCPConfig">
|
||||
<security mode="None" />
|
||||
</binding>
|
||||
</netTcpBinding>
|
||||
</bindings>
|
||||
<services>
|
||||
<service name="TestApplication.Wcf.Server.NetFramework.StatusService" behaviorConfiguration="telemetry">
|
||||
<endpoint binding="netTcpBinding" bindingConfiguration="netTCPConfig" contract="TestApplication.Wcf.Server.NetFramework.IStatusServiceContract" />
|
||||
<host>
|
||||
<baseAddresses>
|
||||
<add baseAddress="net.tcp://localhost:9090/Telemetry" />
|
||||
</baseAddresses>
|
||||
</host>
|
||||
</service>
|
||||
</services>
|
||||
</system.serviceModel>
|
||||
</configuration>
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
* [OpenTelemetry Project](https://opentelemetry.io/)
|
||||
* [OpenTelemetry Contrib WCF docs](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Wcf-1.0.0-rc.8/src/OpenTelemetry.Instrumentation.Wcf/README.md)
|
||||
* [OpenTelemetry Contrib WCF docs](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Wcf-1.0.0-rc.12/src/OpenTelemetry.Instrumentation.Wcf/README.md)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Setup
|
||||
|
||||
Use the `OpenTelemetry.DotNet.Auto.psm1"` PowerShell module
|
||||
Use the `OpenTelemetry.DotNet.Auto.psm1` PowerShell module
|
||||
to set up automatic instrumentation for a Windows Service:
|
||||
|
||||
```powershell
|
||||
|
@ -16,10 +16,12 @@ Install-OpenTelemetryCore
|
|||
Register-OpenTelemetryForWindowsService -WindowsServiceName "WindowsServiceName" -OTelServiceName "MyServiceDisplayName"
|
||||
```
|
||||
|
||||
⚠️ `Register-OpenTelemetryForWindowsService` performs a service restart.
|
||||
> [!WARNING]
|
||||
> `Register-OpenTelemetryForWindowsService` performs a service restart.
|
||||
|
||||
## Configuration
|
||||
|
||||
> [!NOTE]
|
||||
> Remember to restart the Windows Service after making configuration changes.
|
||||
> You can do it by executing
|
||||
> `Restart-Service -Name $WindowsServiceName -Force` in PowerShell.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,23 +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>
|
||||
|
||||
// This file is used by Code Analysis to maintain SuppressMessage
|
||||
// attributes that are applied to this project.
|
||||
// Project-level suppressions either have no target or are given
|
||||
// a specific target and scoped to a namespace, type, member, etc.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Example usage:
|
||||
// dotnet run http://localhost:5200
|
||||
|
@ -31,7 +13,15 @@ var url = args[0];
|
|||
using var httpClient = new HttpClient();
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
var content = await httpClient.GetStringAsync(url);
|
||||
Console.WriteLine(content);
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
Thread.Sleep(5000);
|
||||
var content = await httpClient.GetStringAsync(url);
|
||||
Console.WriteLine(content);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0.413-jammy@sha256:05594d347192d12cc8c7137493b45f9e5390aa12654cf2c45b028960b2808571
|
||||
|
||||
# install OpenTelemetry .NET Automatic Instrumentation
|
||||
ARG OTEL_VERSION=0.5.0
|
||||
ARG OTEL_VERSION=1.12.0
|
||||
ENV OTEL_DOTNET_AUTO_HOME=/otel-dotnet-auto
|
||||
ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v${OTEL_VERSION}/otel-dotnet-auto-install.sh otel-dotnet-auto-install.sh
|
||||
RUN apt-get update && apt-get install -y unzip && \
|
||||
OTEL_DOTNET_AUTO_HOME="/otel-dotnet-auto" sh otel-dotnet-auto-install.sh
|
||||
sh otel-dotnet-auto-install.sh
|
||||
RUN chmod +x /otel-dotnet-auto/instrument.sh
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{2CB42F12-E813-91B3-7D11-3220E40BEF4A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples.Client", "Client\Examples.Client.csproj", "{AC2A0A68-2F7F-453B-95FD-A7C1BAC6FF0C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Service", "Service", "{226567F5-DD15-7888-5BF1-C4407778305A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples.Service", "Service\Examples.Service.csproj", "{8D520079-DB45-4E09-A00B-907C55DA1D6D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AC2A0A68-2F7F-453B-95FD-A7C1BAC6FF0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AC2A0A68-2F7F-453B-95FD-A7C1BAC6FF0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AC2A0A68-2F7F-453B-95FD-A7C1BAC6FF0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC2A0A68-2F7F-453B-95FD-A7C1BAC6FF0C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D520079-DB45-4E09-A00B-907C55DA1D6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8D520079-DB45-4E09-A00B-907C55DA1D6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8D520079-DB45-4E09-A00B-907C55DA1D6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8D520079-DB45-4E09-A00B-907C55DA1D6D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{AC2A0A68-2F7F-453B-95FD-A7C1BAC6FF0C} = {2CB42F12-E813-91B3-7D11-3220E40BEF4A}
|
||||
{8D520079-DB45-4E09-A00B-907C55DA1D6D} = {226567F5-DD15-7888-5BF1-C4407778305A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -2,11 +2,11 @@
|
|||
run:
|
||||
mkdir -p log
|
||||
chmod 777 log
|
||||
docker-compose up -d --build
|
||||
docker compose up -d --build
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
docker-compose down --remove-orphans
|
||||
docker compose down --remove-orphans
|
||||
rm -rf log
|
||||
|
||||
.PHONY: wait
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue