Compare commits
2163 Commits
Author | SHA1 | Date |
---|---|---|
|
4237a26517 | |
|
590f11213c | |
|
ff4d32646a | |
|
17b4065d6c | |
|
b79242d858 | |
|
dfd35c7a8d | |
|
c0855e867a | |
|
5764814b8e | |
|
42c4091802 | |
|
dc2874e2fa | |
|
352acfb24b | |
|
3e5368eba8 | |
|
80da2ab3d9 | |
|
29a7fe8f13 | |
|
887778fa0b | |
|
8e232157d1 | |
|
b185cfb94f | |
|
57580f56e5 | |
|
7781706de2 | |
|
ce1e26f579 | |
|
80094155e9 | |
|
38207b740e | |
|
c54a301e5e | |
|
804d5f3a07 | |
|
40f71ed52a | |
|
95dc35b2dd | |
|
6cac14d649 | |
|
78a917da2e | |
|
4821c37ec0 | |
|
cecfb835be | |
|
915c64a365 | |
|
de491791a4 | |
|
05f67023da | |
|
e949555a70 | |
|
d9c9583409 | |
|
15ae8c0f35 | |
|
518623882b | |
|
7768b2d106 | |
|
e0fdeb3dae | |
|
ab078e0f35 | |
|
9406936154 | |
|
85f662abfe | |
|
317c00261b | |
|
9db6f62129 | |
|
0309b30c44 | |
|
43f3f7d059 | |
|
360897b98e | |
|
6dd69e96e8 | |
|
50e3d4d949 | |
|
2c0ee00508 | |
|
a7315c63b6 | |
|
edd51d45a1 | |
|
e2e2dbbc26 | |
|
b203d2f23e | |
|
6e8a466ca4 | |
|
0ca502bddd | |
|
9329f8675e | |
|
9262a81432 | |
|
11e424de8d | |
|
aeb08f40a0 | |
|
b0a9deb7d8 | |
|
76913bb224 | |
|
55a1b57644 | |
|
bf65026b71 | |
|
fa31e52722 | |
|
ada5af60d1 | |
|
2eb84bf417 | |
|
d90cf44c87 | |
|
cc2844d867 | |
|
07f01c363f | |
|
3f73f12f83 | |
|
fe315a3a23 | |
|
f9dc916a80 | |
|
4a33b66996 | |
|
d5a2fa2bda | |
|
6a164a9a36 | |
|
67e3f7baf0 | |
|
e35ba16e55 | |
|
289bebaf15 | |
|
7a4a452603 | |
|
5a25bb6fe1 | |
|
07e8d434f3 | |
|
d37f6bd93a | |
|
e25b776840 | |
|
c34a25efd5 | |
|
d034464ffd | |
|
f2f29f5976 | |
|
8ed10f2ad7 | |
|
5e50aa7ee6 | |
|
cb92d970d4 | |
|
5fada737bf | |
|
c874197d64 | |
|
d41c099e62 | |
|
9e76c90a04 | |
|
93d9e7278f | |
|
b11316b0bd | |
|
a756317511 | |
|
3b596aae1b | |
|
d239b7017d | |
|
f7207352a1 | |
|
2c762e0be8 | |
|
dfbea872b1 | |
|
fd93c2b8c4 | |
|
ba37bf1a69 | |
|
6982730ffb | |
|
f94b056f83 | |
|
5898a425c5 | |
|
afe3440e91 | |
|
53b1f7c624 | |
|
90e030f213 | |
|
03e7f98965 | |
|
145ceaa94c | |
|
6153023d98 | |
|
04fc212451 | |
|
cc7d0855e7 | |
|
452464820a | |
|
deeceebe8d | |
|
6bd13ffcbc | |
|
3c1f556831 | |
|
4c6ba0aed1 | |
|
d698c1d326 | |
|
3219437316 | |
|
bed02d5f61 | |
|
394cd354a3 | |
|
e419b5d588 | |
|
acc64ee012 | |
|
e8305ee3f5 | |
|
983133fd0d | |
|
58acb531c5 | |
|
18548f47ad | |
|
f0f263031a | |
|
288907d349 | |
|
eec21201b1 | |
|
54e5ea7bf2 | |
|
d70fe5b029 | |
|
5bda810da8 | |
|
39ba216f00 | |
|
804714d28e | |
|
7cbcdd65b6 | |
|
4aeb2f79be | |
|
29523e62ea | |
|
3ef4be2d84 | |
|
56ae62e2d6 | |
|
2e59170339 | |
|
e2a5d20955 | |
|
33a1a9e5fe | |
|
eb14ef665e | |
|
d114161694 | |
|
8c1e348fb8 | |
|
beb5917939 | |
|
b8d9c027fd | |
|
b468a2e9bf | |
|
2460c92400 | |
|
86b7e76082 | |
|
5c4a0ad78f | |
|
8fda429ae6 | |
|
9e3f702d5b | |
|
04677f93b3 | |
|
349052c34d | |
|
9e1e9c6e9f | |
|
65472798f6 | |
|
f17b8b0414 | |
|
e392b11bbf | |
|
4e457f75a8 | |
|
d13f04d084 | |
|
14e2fefe7a | |
|
ccfcecf8fe | |
|
8a998225d0 | |
|
a01bf6cfd0 | |
|
0191a01b3b | |
|
e695b66950 | |
|
563087f0f0 | |
|
00fbeb2695 | |
|
6855cd3143 | |
|
5d3ae0199f | |
|
dc0b4acd86 | |
|
2d1c14ee56 | |
|
9cb636502e | |
|
4e243f2b63 | |
|
d7fb208d06 | |
|
1f5a560fbb | |
|
58bf4e4018 | |
|
a8493271bc | |
|
00b61a2d87 | |
|
10eda198c0 | |
|
aa17528ec1 | |
|
688e1031c6 | |
|
7f86458580 | |
|
3eb7ef00ad | |
|
f801a159f3 | |
|
b3126023db | |
|
233e111a09 | |
|
4ecc0becfd | |
|
184090914e | |
|
8fe071afee | |
|
a7e92dfe81 | |
|
dc44948c4f | |
|
a48b48fa29 | |
|
e34049b74e | |
|
1500b0f3ba | |
|
0c6a04710b | |
|
22acb3e8ec | |
|
f2f990c81d | |
|
e46742d944 | |
|
2cf5f0128b | |
|
e6f90f58ce | |
|
9698d24fdf | |
|
526137fd64 | |
|
7b732c8498 | |
|
a1fed61742 | |
|
3c12e3af1a | |
|
9e0efd4267 | |
|
cc7b268cec | |
|
3ac1f9f695 | |
|
747368a94b | |
|
000fd0f209 | |
|
9172089ab9 | |
|
9b596d03d1 | |
|
9c1b9f609f | |
|
09bac7d077 | |
|
490173b0da | |
|
0673fcfda5 | |
|
a3dd67739a | |
|
d0848e3351 | |
|
d511a28df9 | |
|
708244ec48 | |
|
9d4f61ad0b | |
|
974653fe66 | |
|
2e4f9ede58 | |
|
8efade69a1 | |
|
4d34b53e0c | |
|
0de9fc084d | |
|
1b1d537375 | |
|
42056f57c8 | |
|
b3e3fff83c | |
|
cd86405148 | |
|
33b37abe9a | |
|
0618791928 | |
|
5015698d2b | |
|
3c71b798a5 | |
|
0a993b392c | |
|
16f3637b0b | |
|
dc46ccd2c9 | |
|
d1ce438e00 | |
|
173e80b9c2 | |
|
3dd7134f81 | |
|
cd1f61725c | |
|
313d391e55 | |
|
865c89f47d | |
|
5a10b685d4 | |
|
3d3bff5bda | |
|
31f484f39f | |
|
2de5a2c484 | |
|
9f5b67b3c3 | |
|
80af8a33a0 | |
|
c91f56ece8 | |
|
f33cba3b1d | |
|
b5daeb0871 | |
|
3c77016788 | |
|
ee731aabd3 | |
|
56941a5ba6 | |
|
37969926d1 | |
|
0465c79151 | |
|
5879f48dc8 | |
|
f937eff1ee | |
|
5b93c08eed | |
|
a9d7f1ebda | |
|
d08c5030d3 | |
|
3f3b42483a | |
|
8ed2e0c79f | |
|
d69ea6c37d | |
|
ca6fa4e801 | |
|
41e54f7481 | |
|
fe73fb737a | |
|
3d3355305b | |
|
e47963612e | |
|
3e1d9536f8 | |
|
43fba2e984 | |
|
b56b10ff57 | |
|
27d863375b | |
|
c285def1d9 | |
|
8e71517fdb | |
|
768e789160 | |
|
517893e817 | |
|
c77e66475a | |
|
00f00433f3 | |
|
06449488ce | |
|
92b089ab2c | |
|
89a830cfb4 | |
|
867bb1f24e | |
|
5b1e444980 | |
|
d22baecc95 | |
|
41c51a052c | |
|
bd6b974e99 | |
|
355d17ffaa | |
|
19650df469 | |
|
a17dcd531d | |
|
e075cc157c | |
|
22b6fea9ea | |
|
ab24130dcb | |
|
a5739eba19 | |
|
d16cad3f73 | |
|
2fcd5f5bf8 | |
|
9f0a29124e | |
|
cb64451c72 | |
|
045c3e65d6 | |
|
19e964a636 | |
|
bf71be17d4 | |
|
8e31bf4f28 | |
|
05bf32c5df | |
|
df425b684a | |
|
f8836deff7 | |
|
d7962af43e | |
|
c4412f2070 | |
|
1c1d56113d | |
|
5e1a3979b6 | |
|
070aedcf58 | |
|
d2b8497de0 | |
|
cd3b0e7f9d | |
|
85b99e94f9 | |
|
013d1669fa | |
|
b4fec0573b | |
|
14d714a311 | |
|
d704117f9d | |
|
13e2b8c4df | |
|
2770fa1bb1 | |
|
81d165d75c | |
|
31869a3fc6 | |
|
4eeef33524 | |
|
a1c0d0bd64 | |
|
97410cb24a | |
|
2fb3ebad3d | |
|
c8da0201ab | |
|
bfd87cad4e | |
|
4b3cedda0d | |
|
d71db3a2f0 | |
|
d56bdf5723 | |
|
492b94f2b0 | |
|
d13fd38df1 | |
|
0920d11aec | |
|
2e0b315ce6 | |
|
d74e277ecb | |
|
ccb6346e32 | |
|
43b38e276c | |
|
330881a1d1 | |
|
6f8d4915b9 | |
|
5f90b0352e | |
|
d3e38077e7 | |
|
cf95056770 | |
|
1a84cbd00f | |
|
ccccd1b0a5 | |
|
e36e185c6a | |
|
2367ae5312 | |
|
8369d7f57e | |
|
aa5c74c9e0 | |
|
ddc9c9162b | |
|
986dbaa26e | |
|
98c3fc1b85 | |
|
fe810e73d3 | |
|
abdbf07dfd | |
|
717d8b0032 | |
|
ee05c5cb08 | |
|
a3d807b70f | |
|
d294a42afb | |
|
a084b3ae0a | |
|
b934a0a3d4 | |
|
c1b9ec789c | |
|
40b74b05e1 | |
|
21529fa339 | |
|
0e6af66d10 | |
|
d95c4ea484 | |
|
a7a2c06145 | |
|
e454311bd5 | |
|
77b1f64252 | |
|
c80845dfe4 | |
|
1fcbed8d81 | |
|
e80506a92f | |
|
09b8db6563 | |
|
b32f64420c | |
|
f68ba65d6b | |
|
62f060ed9a | |
|
e3cfedee7d | |
|
efdacc1c18 | |
|
aca4ee35cb | |
|
3928febd2d | |
|
1f8ee517bf | |
|
e61e19ae23 | |
|
af1e1d57ee | |
|
23780762b0 | |
|
bd8c008c3d | |
|
541ef89e6a | |
|
b07dab31cd | |
|
ee8d735de1 | |
|
236e119f66 | |
|
3a5222f808 | |
|
6d62e8b742 | |
|
59b49cf741 | |
|
d2a0299587 | |
|
0ef86fae7d | |
|
d61a5c3b37 | |
|
3df2068d9f | |
|
9b2f6bace9 | |
|
bc482c996e | |
|
e78de66e5f | |
|
1cdb04d725 | |
|
7829f53c24 | |
|
8a3329be4d | |
|
6487ac2976 | |
|
c71bd9dfd5 | |
|
d2e56b59c6 | |
|
bab9fb9cdb | |
|
7d74adafdc | |
|
8d6578fbe8 | |
|
e0a6e64fc7 | |
|
cde3d45f04 | |
|
2a97eaedc5 | |
|
ec3c55ffeb | |
|
26f359b3e9 | |
|
4c30ec48d3 | |
|
46b2fcda7d | |
|
dbda01ec07 | |
|
9084a59127 | |
|
b482e76711 | |
|
fb2a47cf76 | |
|
acde5b62f8 | |
|
78565d813b | |
|
bd31b457f0 | |
|
9a0bfb2311 | |
|
ca98fc53be | |
|
1566984262 | |
|
6c0d140dff | |
|
e62d7c69cb | |
|
597eb09de4 | |
|
e38ebf5dc3 | |
|
b5fab78314 | |
|
7dcf73f2d8 | |
|
0a4aa3cbd2 | |
|
2a1c2749ff | |
|
6c3725d916 | |
|
bc2487f274 | |
|
a6b33029be | |
|
98fa296098 | |
|
7e4da160ba | |
|
fd58d10628 | |
|
ef032394dc | |
|
e4f39789bd | |
|
d9fce84689 | |
|
ff4fe978e5 | |
|
2e8bf7f9a1 | |
|
2de12fee5a | |
|
1e3cf0b7e3 | |
|
fcae15e927 | |
|
3f05bf6ae2 | |
|
73894cfe96 | |
|
e65edd942b | |
|
c7e797c5b4 | |
|
c8967098c7 | |
|
fc86a76c87 | |
|
2b0df092dc | |
|
e6e2f3c36a | |
|
8af18033cf | |
|
ee21d4dcf3 | |
|
740dd14f52 | |
|
74579aa2a1 | |
|
fd4e5fe569 | |
|
192f7fa4fe | |
|
bc4bacf5ee | |
|
10bca8b2b2 | |
|
5ec1e8688e | |
|
45b8c13b12 | |
|
f52554bc52 | |
|
8793935d8f | |
|
628db61339 | |
|
680c9406fd | |
|
62df132007 | |
|
1ac476b3b7 | |
|
07b6903b85 | |
|
537f5c4e79 | |
|
8194c10b78 | |
|
83b30b5d0e | |
|
3e650f00a1 | |
|
e4d5109c49 | |
|
1554ccbf18 | |
|
b1cd30ef7f | |
|
b6badb2ca3 | |
|
e6eceb5115 | |
|
b927d9daf4 | |
|
eb53fe3a61 | |
|
0f859b4385 | |
|
a7f950d7fd | |
|
65af6511e5 | |
|
503cc533f2 | |
|
814e06401d | |
|
a6a9acb1dd | |
|
361f035efe | |
|
4aa7f57842 | |
|
6c7efe280b | |
|
0260d82716 | |
|
27f9868117 | |
|
7f8fbc9bbd | |
|
184685536e | |
|
de6efccb99 | |
|
fa7db47889 | |
|
d904b133e4 | |
|
94b7d25905 | |
|
46b28eb45e | |
|
2dbb8de349 | |
|
697b4e0c70 | |
|
fa826fdef0 | |
|
a5de6d5cbb | |
|
c5f6218ded | |
|
325822ce85 | |
|
39b24118a1 | |
|
af59cc4a0b | |
|
799039247b | |
|
de13ff183a | |
|
485c123a42 | |
|
9c466f4a13 | |
|
bd88acae57 | |
|
31e562f9a5 | |
|
c9c857c908 | |
|
d773f3bfe2 | |
|
a63f9195a1 | |
|
5b421b6d57 | |
|
9249653f69 | |
|
d899702eab | |
|
82b9e9b64d | |
|
0132d5d98b | |
|
983800cc56 | |
|
18d192d1fa | |
|
57f94cf92a | |
|
8fb169e934 | |
|
0feca55ee2 | |
|
a55e9b6440 | |
|
9ddccada89 | |
|
b0643fef38 | |
|
0a47581b2e | |
|
fbdb90621b | |
|
f85a57b5b6 | |
|
1f6de3590d | |
|
00b0e9f87c | |
|
61a4b46676 | |
|
aef4ca5b1e | |
|
e063b34a2a | |
|
5ca6177fcf | |
|
43be1e7f9d | |
|
09de4bd105 | |
|
bc2fad4cf3 | |
|
ee7fd27449 | |
|
37e35b239b | |
|
365fe8a443 | |
|
649f963a1a | |
|
d37c1c74e7 | |
|
938b03dff6 | |
|
8495996d54 | |
|
05fe136cb3 | |
|
902c46e2a7 | |
|
71124d2c5b | |
|
7522bfe141 | |
|
c90175f1ae | |
|
97185c6fa0 | |
|
97b3fa42f1 | |
|
dc4cc27009 | |
|
d4b10a89a0 | |
|
3e8092d086 | |
|
d7626e32d4 | |
|
df7bda64e6 | |
|
e94c0d133b | |
|
4751c07a19 | |
|
023c8cc291 | |
|
581690ecac | |
|
32c8d66580 | |
|
ad120a5bff | |
|
dcdc6727f7 | |
|
5af07a6b9d | |
|
94238acd71 | |
|
354e957b3e | |
|
5ec05db03b | |
|
f161a1e039 | |
|
910c7cc218 | |
|
e2936d4609 | |
|
fc283ba763 | |
|
d16ba00e15 | |
|
b53c48a769 | |
|
e8b50c6887 | |
|
4f9d1c9fc6 | |
|
56e7ebe669 | |
|
04a2b0a841 | |
|
5be177df55 | |
|
477658a6ec | |
|
0ffe15cf83 | |
|
ea6e3ddb7e | |
|
6fc1d216ca | |
|
3a597446b3 | |
|
ea14b9282b | |
|
1b5ce82b0a | |
|
c43835970c | |
|
be91b6fac1 | |
|
26b3d41d72 | |
|
468b528956 | |
|
685a3784d6 | |
|
35d1d383f5 | |
|
8fd45a771c | |
|
fa215ff242 | |
|
0b513ad227 | |
|
8f3460ae43 | |
|
958b59be4d | |
|
034c0c2ded | |
|
6dd000be25 | |
|
dc1ec9cbed | |
|
3fa57f9280 | |
|
82ad786856 | |
|
fbb5ebb01e | |
|
20bcd7546b | |
|
38aeffff14 | |
|
3aeb410ecc | |
|
8ad5cacc16 | |
|
0bc74744cb | |
|
09c7c4a992 | |
|
13a11fb801 | |
|
f1fc3cd17c | |
|
7b85775807 | |
|
6b1092a89f | |
|
5ebb37ac6f | |
|
50d307c46e | |
|
99c5b94004 | |
|
d7e7542c76 | |
|
c48fe94271 | |
|
1f7d6a507e | |
|
9fd6bcae9e | |
|
b56af03b99 | |
|
22aaae8d44 | |
|
c1ff34c2be | |
|
ed46fa36d0 | |
|
021e7fe470 | |
|
4086210ba9 | |
|
fe8a7f4bab | |
|
9bfb81b66b | |
|
0aacc55d1e | |
|
a09eff6100 | |
|
cbac202044 | |
|
12eb62659d | |
|
b748a1dbaf | |
|
0750660f6f | |
|
0bc911dc0a | |
|
cff8b81fd6 | |
|
a686280aaf | |
|
4680146024 | |
|
7ee367a57f | |
|
5ad5b067f0 | |
|
be25f4ef0c | |
|
edbb475957 | |
|
934da846f0 | |
|
d0b463dd6f | |
|
73646871e3 | |
|
5a843989e2 | |
|
a68349e290 | |
|
e15eedc1ed | |
|
88be482c8e | |
|
915cb4d0a1 | |
|
80c8d35614 | |
|
aee034ae08 | |
|
a7a26f9a17 | |
|
6d077c9344 | |
|
56c1879079 | |
|
d9cef81e29 | |
|
809457d2b0 | |
|
788347e262 | |
|
f57906131e | |
|
7da7037717 | |
|
0f99d70d98 | |
|
cdcc58cb87 | |
|
a1c72d17e0 | |
|
dab1a6cc8f | |
|
d3e3bdf6ec | |
|
b6c30bccac | |
|
a764419270 | |
|
bb56b537ab | |
|
c71c4d983c | |
|
7953048fe0 | |
|
37740b6c72 | |
|
b1958e3fab | |
|
d91b6e99d4 | |
|
2e3e04c7e8 | |
|
9543a34518 | |
|
1049897b2f | |
|
672d154d04 | |
|
8d85b580b2 | |
|
2b5ac31a5b | |
|
9810e09a95 | |
|
0cf28e9dc9 | |
|
f4121777fe | |
|
67fcea3846 | |
|
a855e1296e | |
|
c7d472ad36 | |
|
ca798212a2 | |
|
0d2d67efe4 | |
|
715211e98b | |
|
5297306064 | |
|
417f82c3ca | |
|
af46b5e4a9 | |
|
a745d60e8d | |
|
2e746690a9 | |
|
2454765174 | |
|
996c9c321a | |
|
36bc703540 | |
|
2db5bb88d3 | |
|
f8e6358b02 | |
|
83224d7079 | |
|
414cc7be5d | |
|
68efd95b58 | |
|
b5699ade3b | |
|
9b67fe09dc | |
|
bd92087068 | |
|
2e59f5477f | |
|
e1f707e8dc | |
|
35bc345f7e | |
|
9845ac94bd | |
|
5781da1121 | |
|
7e34b79593 | |
|
51ff6bcf33 | |
|
0e0f417760 | |
|
da4cd931f8 | |
|
8f791f2c61 | |
|
a5fc312d26 | |
|
1960606bce | |
|
e22c562fa7 | |
|
b499bdc4ec | |
|
c33febbea6 | |
|
1623a80d4c | |
|
feef40813f | |
|
7128a8a5ab | |
|
9d955e6c0a | |
|
ba9356192a | |
|
3b1092b3d5 | |
|
ecc8ffe09f | |
|
7b4bb8fb0a | |
|
8937a1009a | |
|
6c6b678c76 | |
|
876408e7a7 | |
|
a85e888d82 | |
|
9e12dd60c4 | |
|
8242a4eb3e | |
|
63b91c6bd9 | |
|
bff0717a77 | |
|
6c7770bb25 | |
|
1c64445cf6 | |
|
7acc4e28f5 | |
|
66cf1b6b28 | |
|
92d659a17f | |
|
001f34f170 | |
|
ab18dd6e55 | |
|
bbcb2511d4 | |
|
572606ad50 | |
|
1f80fe857d | |
|
95b83564bc | |
|
5ab678f7af | |
|
4d8f4f3111 | |
|
ff0480c354 | |
|
d1fef93e1c | |
|
7471fb8032 | |
|
f5490fbdb8 | |
|
7f3e3e3e64 | |
|
68cd649517 | |
|
c8ca99c54e | |
|
d7370f3367 | |
|
b416aceeed | |
|
fc5469dc49 | |
|
6c11235f6f | |
|
1dde2550b0 | |
|
bc5eb9ea24 | |
|
40d18f614a | |
|
ec464079ee | |
|
98eded9f86 | |
|
622d977f87 | |
|
570d582730 | |
|
80971c1ff7 | |
|
101c0a80f2 | |
|
e688c256ac | |
|
52bbd917f5 | |
|
f95b9f50c1 | |
|
53fd6f063d | |
|
4f99e7cb4e | |
|
13ea3346a9 | |
|
b897510bb9 | |
|
434609a7bc | |
|
d8f26b221e | |
|
44c69ea6b5 | |
|
7926c45a5f | |
|
8a73f45a2c | |
|
6e3d0873bc | |
|
b2298ab4c0 | |
|
970f95f2ec | |
|
b0ccf5ec7d | |
|
2fc71ea8e3 | |
|
1f22d1c46e | |
|
dde0d6936c | |
|
f83c020d4d | |
|
4a4d9a6a6c | |
|
34b64b1f77 | |
|
7831f2ab2d | |
|
7655192df5 | |
|
97609a9bdd | |
|
a7423f6676 | |
|
fdaf680454 | |
|
05bd972f90 | |
|
f032fc6703 | |
|
c3ed1d5ee5 | |
|
e41470be43 | |
|
f24acbdd7f | |
|
cd52950fae | |
|
96bed03986 | |
|
56c11e529e | |
|
5eeb733dbd | |
|
5ef2cb9573 | |
|
601d2885ff | |
|
12d3e0f1f0 | |
|
ff179ddc6b | |
|
9f8ed8468a | |
|
25afc3e910 | |
|
62a4810145 | |
|
6afb816f9e | |
|
1d4a2f4a50 | |
|
96fe54fc16 | |
|
4eb05c7c00 | |
|
dec4e9b583 | |
|
8e298b9b13 | |
|
31fc7d0f77 | |
|
01ff943683 | |
|
77bb439422 | |
|
5eaf4b290e | |
|
2dfbc242f7 | |
|
47a390076f | |
|
b0ec50575e | |
|
046baf9ca9 | |
|
11391d8b1a | |
|
f2b92832eb | |
|
620a264859 | |
|
82e4354be9 | |
|
a903fa849f | |
|
48d41d3a5a | |
|
0e84508905 | |
|
695ed5350b | |
|
e9e1feeae0 | |
|
a5d2065401 | |
|
988dccaa5e | |
|
c0b73f5218 | |
|
c12779d960 | |
|
c12bb736ca | |
|
b8b804b68b | |
|
fe7a1c58f8 | |
|
82bf8c3623 | |
|
3265f3289d | |
|
63b39e37e9 | |
|
001fa1cd38 | |
|
715fbd678a | |
|
9e6d4a8dc3 | |
|
bae5718191 | |
|
3e7302e742 | |
|
2d74bf263a | |
|
eba8b847e9 | |
|
e9266c8575 | |
|
8e2a99a67d | |
|
4f9b7314f2 | |
|
c91f3f427e | |
|
697ae617be | |
|
6b613ddd36 | |
|
ecbd1f9d3d | |
|
8684882c06 | |
|
0aa223dcaf | |
|
196905916c | |
|
f123d78909 | |
|
90e2fb4e38 | |
|
4a66431280 | |
|
4657255d7b | |
|
91a5dd9e8a | |
|
c8a968a99b | |
|
8d1cad2ae1 | |
|
737dfef4e6 | |
|
0e4986a073 | |
|
ee6c9867d7 | |
|
e4b31cea3d | |
|
ede6a81a17 | |
|
16d6e0e00a | |
|
4407ee72d6 | |
|
e337bd732e | |
|
2f69bec428 | |
|
496965e1b4 | |
|
f0d6c82337 | |
|
c5ca491dd6 | |
|
9faf11b605 | |
|
870a6bf256 | |
|
6a79e6f32c | |
|
491de708e1 | |
|
dbaba2fd91 | |
|
208118af18 | |
|
0641844059 | |
|
30c75b4715 | |
|
9c3af76ab9 | |
|
c1490728c9 | |
|
38b24890af | |
|
ff823f4346 | |
|
d9f9812d43 | |
|
c9ea238121 | |
|
1f2a8fef17 | |
|
07351a2e9f | |
|
f4b5bbe829 | |
|
3449c58ef5 | |
|
5a0dd7ef25 | |
|
da7796b3b5 | |
|
b4ed53211b | |
|
63fe7084d2 | |
|
bc0df3b4d5 | |
|
517ef88ca1 | |
|
17b8f4355d | |
|
d45fb3f5dc | |
|
de65a4ba1e | |
|
42679988e2 | |
|
60ae0af7f6 | |
|
e1b1963088 | |
|
0c436e0a29 | |
|
b48893bb9d | |
|
d81dabff4b | |
|
a265b288fd | |
|
fcd7812d77 | |
|
1b4f5aeab5 | |
|
e588eb8042 | |
|
4f6cc700b5 | |
|
227580ba09 | |
|
eea1fe0e99 | |
|
0b32fe2fda | |
|
d1e2d09fa4 | |
|
867d25be41 | |
|
2634bcad7a | |
|
b3e6045a72 | |
|
ecd11ea5db | |
|
6c6800a821 | |
|
97386403ce | |
|
5412905f21 | |
|
ffd53c7d56 | |
|
6e536238df | |
|
3086418d62 | |
|
3a6613f9a3 | |
|
e90a6f636b | |
|
05db74f4f4 | |
|
4c6039769a | |
|
9f3456fd5d | |
|
3bb221fb5d | |
|
f1fc1c75b8 | |
|
902d68cf2a | |
|
2b33f9fb07 | |
|
c8e1e3619e | |
|
f36cc92b85 | |
|
377809536a | |
|
d491facd83 | |
|
4e1771605b | |
|
cf3b3901d9 | |
|
07413b15a5 | |
|
dc8b44f00b | |
|
9a3391d5e0 | |
|
247ef4d26e | |
|
3f1b9ed263 | |
|
e447e347e1 | |
|
f1deb8ec78 | |
|
40325e56dd | |
|
14eaa4cdf8 | |
|
537a4dfc1b | |
|
0e9ca2b863 | |
|
6867bd04bd | |
|
52958c8e91 | |
|
433ad9462d | |
|
a7b2cc04fc | |
|
da2cc9f047 | |
|
f9e0acba15 | |
|
c57ca65f7f | |
|
1dcea73ea8 | |
|
3382073239 | |
|
675101a4ea | |
|
28ff59de41 | |
|
ad7fc9e753 | |
|
1e82b72f36 | |
|
e6c7a0f264 | |
|
e2dd3e4404 | |
|
34cd3f9342 | |
|
a33de86cb6 | |
|
9a01f2e592 | |
|
8e0f6124cf | |
|
c7b2c8b00b | |
|
0f60bd4215 | |
|
f58a209e9a | |
|
c87852c3d1 | |
|
531898cd6b | |
|
514d0820b2 | |
|
9ac678e81b | |
|
8901416207 | |
|
320a4d32d8 | |
|
cc5b70c737 | |
|
ab4379da25 | |
|
72a5bb151b | |
|
aca4157d8f | |
|
f44d99108d | |
|
04f6d9cc46 | |
|
83993e03d3 | |
|
b03ec3aa62 | |
|
efcce14ba9 | |
|
a9dfcd0cf0 | |
|
59f3eb8eef | |
|
f2f3ab33b7 | |
|
f99e4961cb | |
|
f9be6821a5 | |
|
1ecc9197be | |
|
19196a0251 | |
|
7fd46f0583 | |
|
e2c76320ed | |
|
c0cf5dd95f | |
|
0263e62b42 | |
|
35ecf7a461 | |
|
9d55f25386 | |
|
efa46a5dcc | |
|
ccb2e04237 | |
|
33d3a9213c | |
|
976edfde50 | |
|
6c931951b3 | |
|
e06d35add5 | |
|
82a0e03add | |
|
cb44b2b18c | |
|
c3a2e94579 | |
|
70cb2c9235 | |
|
e592d5dbfd | |
|
5740c3ceaf | |
|
a77e1f9af3 | |
|
1bff69a663 | |
|
57d8334417 | |
|
a9da20f831 | |
|
1453f3f181 | |
|
6bc24f4263 | |
|
ae770ec442 | |
|
8b7780b7c4 | |
|
3827ee1e5b | |
|
3c52cdf7f7 | |
|
cc8774fa0f | |
|
311fc0a7be | |
|
b60eff3698 | |
|
1523dedb55 | |
|
ef3fef9f42 | |
|
3c0bf72a5e | |
|
905184fb95 | |
|
bf37a4ca58 | |
|
92abcb823b | |
|
533c30ae02 | |
|
c39ebfee25 | |
|
4addd7f4a1 | |
|
80201515e9 | |
|
847d117db1 | |
|
1ad621b3f0 | |
|
7310b90530 | |
|
5ccc7fccb3 | |
|
1ef437785a | |
|
7e67a84ed3 | |
|
bb4c2193aa | |
|
bac9941a58 | |
|
c66a51c468 | |
|
bdeb1e95cd | |
|
15fbac58f4 | |
|
8d27e24b21 | |
|
1bd41e2b79 | |
|
aff4e12425 | |
|
f421ef1e73 | |
|
6c8f5435db | |
|
3f4793407d | |
|
0f6b894f34 | |
|
4b4e894f0e | |
|
f09487a6fb | |
|
7083f440b9 | |
|
b0c337b075 | |
|
9a931556fb | |
|
9b081e1933 | |
|
e3cc1f0edb | |
|
766e055879 | |
|
736b0ceb6f | |
|
5d5093636b | |
|
96c895893c | |
|
80335e35bd | |
|
e242c1bbf7 | |
|
b9b1e817ef | |
|
4a44474ff0 | |
|
d204124134 | |
|
a59b516f1b | |
|
3dd2f41037 | |
|
07c8bfb4e2 | |
|
d2fc9390ec | |
|
a438127c37 | |
|
0660781ed2 | |
|
aa303d278a | |
|
c96285a7b0 | |
|
a5889a685d | |
|
43ee51ca4a | |
|
3f152ebe29 | |
|
1cb4f1d356 | |
|
1b9855748b | |
|
9cf3a59542 | |
|
ffb4d23939 | |
|
1a719d42f9 | |
|
2e2c308293 | |
|
14f16b002e | |
|
409976a422 | |
|
d2ce24a07b | |
|
da7927883c | |
|
68d7ab5763 | |
|
73faa33b99 | |
|
5aa83c87fe | |
|
37b2984b96 | |
|
ce7323ee3d | |
|
01503efe97 | |
|
7229c45513 | |
|
5d5c73416b | |
|
2deb6d12ef | |
|
2f7b3c2bb2 | |
|
7b51d4bbf8 | |
|
3a709a7059 | |
|
604bdbd92a | |
|
e0a0b7768e | |
|
4fdd2ed81e | |
|
b78145fa3c | |
|
d64793ab55 | |
|
4aacac4707 | |
|
d855771dc3 | |
|
3b1c6d9108 | |
|
8e04a6887f | |
|
1b2307ba70 | |
|
01ddfc5bbe | |
|
4b06f09504 | |
|
32d591ae53 | |
|
3c9eb62bd2 | |
|
733a2eec60 | |
|
917d75d637 | |
|
3669e7a2ae | |
|
6999ebd1f1 | |
|
fa7f704c73 | |
|
6a572bbc47 | |
|
91713f440c | |
|
392116ddd5 | |
|
0da729ff57 | |
|
c0f0ff8bca | |
|
a85feae1ef | |
|
35cdb5e979 | |
|
3ff34ceb43 | |
|
97dd4192ce | |
|
666bef3019 | |
|
0e6344798d | |
|
d8407320df | |
|
d61c74b4e7 | |
|
223e615e7e | |
|
35b41ab484 | |
|
ff79bb7094 | |
|
bebf684436 | |
|
b3376a25d0 | |
|
bb55bcc736 | |
|
f7dc1dc686 | |
|
7ee92eb365 | |
|
ebf96dc5de | |
|
288c5df620 | |
|
e42bd2fb10 | |
|
ea7b761757 | |
|
a3bf8af42e | |
|
c5cdc8041a | |
|
076115ee6b | |
|
877070329e | |
|
f27280af7d | |
|
37f901afbc | |
|
e980e8b97d | |
|
f52050bc2d | |
|
88c80b1378 | |
|
d4a3b3b680 | |
|
7eaffc8f83 | |
|
50a81fae9c | |
|
80de3281fb | |
|
e68a3e70c6 | |
|
6ea0e80a0b | |
|
2f89fa7a30 | |
|
075e3cb862 | |
|
f0136a12f6 | |
|
f15937974b | |
|
4841b50f17 | |
|
d38970886b | |
|
a9b285de3b | |
|
d03b485415 | |
|
90ab3665dc | |
|
c5c9fdd882 | |
|
7ae32c90e0 | |
|
877b5e4782 | |
|
fb26704401 | |
|
dc1b47413e | |
|
ad6cbfc4b4 | |
|
9ea8324ad8 | |
|
f79f1566fd | |
|
4e745f36f2 | |
|
70185661f2 | |
|
fab7d13376 | |
|
4c6a493eeb | |
|
7731460a9a | |
|
2d6b26b10d | |
|
abada81018 | |
|
0924684d22 | |
|
81876ab38a | |
|
0830039dcf | |
|
017afb893e | |
|
e11d7a9252 | |
|
b0c5c04181 | |
|
16e7113dcc | |
|
a781ba8fa9 | |
|
61a1898a3f | |
|
9ecc6f08d8 | |
|
9b9efa64a7 | |
|
8e9f04eba0 | |
|
fdf3a93466 | |
|
9dca081eb5 | |
|
faa946539d | |
|
087a4f1ac6 | |
|
11a23d4d34 | |
|
0f0f988410 | |
|
aab7159327 | |
|
cb4d13de47 | |
|
7bd06ef189 | |
|
b5b02eb044 | |
|
d5579fa7fa | |
|
f20ee6ccbf | |
|
1e46732774 | |
|
eec86a495c | |
|
03b3f05892 | |
|
47efe8512a | |
|
eee809a514 | |
|
749d3164cc | |
|
187272484e | |
|
fb503b4c53 | |
|
06d26562f7 | |
|
f0f78cc9bd | |
|
45fc05d8ca | |
|
879f2fb8cf | |
|
83de956128 | |
|
3f9f983a70 | |
|
2a73a6f992 | |
|
6ab37f1a3b | |
|
655b77f679 | |
|
73597b1332 | |
|
ddb47e14c8 | |
|
8c8bf06098 | |
|
9fb6403717 | |
|
b70e7dc030 | |
|
68d373018a | |
|
bcec7e9380 | |
|
0e318fb84c | |
|
cb6d7133ac | |
|
4fdfc15633 | |
|
93eac2538c | |
|
c119554526 | |
|
fec52b431c | |
|
07a1bb4419 | |
|
e5e3f915f0 | |
|
5fc9c0e852 | |
|
8f1a7b1c95 | |
|
c42f3df806 | |
|
b558a01262 | |
|
26dd5d8fdf | |
|
0530e63579 | |
|
cf3b0efdaf | |
|
89a2ece43d | |
|
255d1385a4 | |
|
1a8a02c991 | |
|
a7a70aa7c1 | |
|
04f5255245 | |
|
b8758d42fc | |
|
0a2dd9e569 | |
|
f89fc05f84 | |
|
ac0b4e4f3f | |
|
82f37672d6 | |
|
b23ef1855e | |
|
2819f72745 | |
|
401b30418c | |
|
a1df5269c8 | |
|
5518060d17 | |
|
f65083628f | |
|
8d96280ce5 | |
|
331c6af8d6 | |
|
4d034b08e8 | |
|
951221efcc | |
|
1b2c7db3b0 | |
|
f6e3e43467 | |
|
7b8608591e | |
|
3120a8d0bf | |
|
bbd3246896 | |
|
9bc34d7621 | |
|
e637e5121a | |
|
97415aaf7c | |
|
60bb0a7025 | |
|
4a370a20d3 | |
|
0ab6915b3c | |
|
b14bed8d89 | |
|
4850f471cf | |
|
c790530eaa | |
|
bbf7822e67 | |
|
83f91444c3 | |
|
ca32c02509 | |
|
958970744f | |
|
a6eb30f97d | |
|
a91a4a66be | |
|
43cc261df4 | |
|
e05e4fed87 | |
|
c201396f57 | |
|
93bcdf2870 | |
|
78dfa21084 | |
|
9384baf1cf | |
|
5676f466d0 | |
|
0bad3c982a | |
|
0230d9d133 | |
|
85f3fd8545 | |
|
bf8be57253 | |
|
a5e04aae6d | |
|
06cc7c1d67 | |
|
7df86527ce | |
|
d45dce3b2a | |
|
d67faf2aef | |
|
d5e715aaa8 | |
|
1e2dd6a846 | |
|
355e29a02f | |
|
3ca54944cb | |
|
6cac13fc6c | |
|
03b672c017 | |
|
47ee573f07 | |
|
eca8de991f | |
|
8a917e036c | |
|
48785a358d | |
|
862f301188 | |
|
7812ad82e2 | |
|
287fae63d7 | |
|
37b6fc909e | |
|
030d966c0a | |
|
db8ade397f | |
|
a91995e5af | |
|
951c46e92f | |
|
4af30515a4 | |
|
23c5516252 | |
|
29e675b566 | |
|
09ee0d2715 | |
|
010692cb2f | |
|
a96fd683ac | |
|
5f9dc3f669 | |
|
f4184dfde8 | |
|
6ba5919229 | |
|
034d65bfc1 | |
|
85fb3906e0 | |
|
5165ec7ffe | |
|
c31314c70b | |
|
6b88f7c42e | |
|
c661673337 | |
|
3d760ffe17 | |
|
1bd35af649 | |
|
193a5c466e | |
|
9f600741ed | |
|
5a18135435 | |
|
f92e02e4ca | |
|
3e284ed7cd | |
|
ed43936219 | |
|
106941f1f1 | |
|
4fd5a8aa09 | |
|
fb3dce4593 | |
|
da38225135 | |
|
8136639d2a | |
|
d0f78b0805 | |
|
75b83db960 | |
|
bce7d96b0c | |
|
76eaea2959 | |
|
cbbba71b78 | |
|
8f6f9e712d | |
|
e5a088be4c | |
|
2d532c4547 | |
|
4feacc18ad | |
|
c43b4ff27f | |
|
e9bc26ad0b | |
|
2870209fdb | |
|
0a34867a57 | |
|
ecc41c7f5a | |
|
23643473e5 | |
|
9139becc50 | |
|
e1fcd15ed3 | |
|
0a41e54894 | |
|
d8d533a7c6 | |
|
7dee67d32e | |
|
38e38cb29f | |
|
79e0a7219c | |
|
f4d464a1c0 | |
|
97decbd4e4 | |
|
06f4cc2445 | |
|
9bd1a5198c | |
|
8e3c29538f | |
|
8e15a4b68f | |
|
23107f8ecd | |
|
25d767f899 | |
|
188210bdba | |
|
0b6a6b9920 | |
|
c2008311f1 | |
|
696eea7903 | |
|
1996a35bd1 | |
|
250a020985 | |
|
81cc0ae358 | |
|
4695eb6d5b | |
|
116e305bb3 | |
|
fcfbb32fcc | |
|
aad95f8f64 | |
|
ba06aa777c | |
|
a74531402a | |
|
fa36775d55 | |
|
cbd17147b4 | |
|
c769d539aa | |
|
29d9ebf108 | |
|
99593bcfd7 | |
|
d95bc83542 | |
|
38bf4d8ec0 | |
|
ff79d892a3 | |
|
3581d6e642 | |
|
7f9c0ddcd9 | |
|
218b421af7 | |
|
ca0716335a | |
|
267f9a6365 | |
|
e2817eba4d | |
|
302f889ed9 | |
|
145fb8c098 | |
|
b16637e3b4 | |
|
3d5424a54a | |
|
730dee9a24 | |
|
2b2378e288 | |
|
351108ee31 | |
|
9ed3c5b366 | |
|
102a03a167 | |
|
2babc69924 | |
|
4532648bbc | |
|
02989891ca | |
|
dd40fbeab7 | |
|
018a76670c | |
|
f797537cc6 | |
|
b5e8bc680e | |
|
018b1f5726 | |
|
895075f9e5 | |
|
e871805ee2 | |
|
328dcf075a | |
|
e185416cb3 | |
|
06158ffc2d | |
|
ed8b448454 | |
|
f2fe65cf9f | |
|
9c6f01cf26 | |
|
a3a638ecdf | |
|
060e422969 | |
|
a483171f75 | |
|
0d3a04669e | |
|
24468fd1e3 | |
|
655bf470ed | |
|
dfcef52b42 | |
|
fdc25cdc22 | |
|
dfaa681b22 | |
|
696d3f0833 | |
|
411d5dee28 | |
|
d72a16dd91 | |
|
a3171ec852 | |
|
ce18841b5d | |
|
fcb963dae0 | |
|
d7327abeaf | |
|
2a30803ae2 | |
|
7e0299bd16 | |
|
98bfb48d63 | |
|
793cb9db8c | |
|
995538c600 | |
|
219729a45d | |
|
84feb47d90 | |
|
ad98420b38 | |
|
5d2855b663 | |
|
f1831146d5 | |
|
e6a83f2345 | |
|
d0def77481 | |
|
d22567480c | |
|
d50210d12f | |
|
1e3fbee1bf | |
|
60c1fc7753 | |
|
c07642ee17 | |
|
7bb2f0d832 | |
|
8f5ddf26e5 | |
|
8064df9e4d | |
|
9b10152cf8 | |
|
7bbd5af0c9 | |
|
d1cc20f1ac | |
|
3d73283a71 | |
|
08d8860e66 | |
|
80a1f70214 | |
|
358ad6cba1 | |
|
2b7fe75826 | |
|
43c88b911d | |
|
feb0297c7b | |
|
07e5654285 | |
|
47ab46ea2a | |
|
a8f2e6cd61 | |
|
92403b01b7 | |
|
33e6bf30c5 | |
|
cdf13a7c10 | |
|
249d09747f | |
|
0ac01c6cec | |
|
4bd1869799 | |
|
9cfdf67a49 | |
|
f43905a535 | |
|
3d1c04ae59 | |
|
4ae7e380ad | |
|
e5bfc1dd52 | |
|
0ce6a015f2 | |
|
7068cb3c09 | |
|
6a822adcee | |
|
0a9794ad41 | |
|
1775e4a48e | |
|
87c1ef242e | |
|
f70ae76f8c | |
|
eca5ce03f0 | |
|
3c2d58de58 | |
|
eb0b316359 | |
|
ff0df1e893 | |
|
8b01e78f42 | |
|
59043802e6 | |
|
ae7b0a917b | |
|
6edba790d8 | |
|
c427bf2132 | |
|
f28e0ada45 | |
|
299cfad6e6 | |
|
a3ac819a0b | |
|
68b5e4685a | |
|
e25120ad08 | |
|
2360de9add | |
|
8897dd4d5c | |
|
1e4a7be6be | |
|
04db62f04b | |
|
c475798cf1 | |
|
33faf8bdf6 | |
|
7f3c9cac05 | |
|
2b34574bd9 | |
|
2eae08bef5 | |
|
f1b74539c8 | |
|
161273e709 | |
|
e82ab27582 | |
|
40d9c64164 | |
|
bb058674e8 | |
|
e9c38b6309 | |
|
f981ad2552 | |
|
38c6e56e1e | |
|
727850e94f | |
|
f3b1f4a520 | |
|
1915f1fb60 | |
|
b300e72dab | |
|
b8f7a87e8b | |
|
67127c791f | |
|
4df4a0ae09 | |
|
50e7a17309 | |
|
005359197c | |
|
164311a640 | |
|
d341f3bcce | |
|
7fef6006ae | |
|
5e74487e1f | |
|
b08edb6504 | |
|
49f4cf093d | |
|
3681304fb4 | |
|
b1edb98f6c | |
|
b091536c47 | |
|
25129e510c | |
|
cc40dbd590 | |
|
a0f4647597 | |
|
1f975b303d | |
|
b6107f08b4 | |
|
76f7a96029 | |
|
705a32292f | |
|
7b92428281 | |
|
ad2013ffbd | |
|
02a834c0eb | |
|
037d7cc293 | |
|
74cf7ac297 | |
|
19e2ce0db1 | |
|
17e81063ba | |
|
2834b03b88 | |
|
50b6b3fb6b | |
|
e8984793d1 | |
|
16a02b2bbe | |
|
4cf3f654ad | |
|
9dfb00249e | |
|
7f0889a6a3 | |
|
2fbdd94a33 | |
|
e524f1aebf | |
|
5b497b115d | |
|
ece93b77a1 | |
|
10e32fe80c | |
|
551e764df8 | |
|
fdc56b354d | |
|
34f2601347 | |
|
57595b033c | |
|
5bfa862d74 | |
|
7c6f1bd73e | |
|
ea51e645dd | |
|
86853f52dd | |
|
4eb968e0d4 | |
|
84170709c4 | |
|
2c6a97044e | |
|
ba42ce858a | |
|
ca18354115 | |
|
6a793baa0e | |
|
79a601d7d7 | |
|
ea500962d6 | |
|
4633cfeee1 | |
|
7470435b84 | |
|
738d9988ae | |
|
c6d1ec1e9e | |
|
ab318285f0 | |
|
b802402068 | |
|
88a77816a6 | |
|
f490ba8ee6 | |
|
9bb9f274ae | |
|
ac2aae27da | |
|
712f30d0f3 | |
|
7946cc5c7a | |
|
e73232898f | |
|
14b64fc8bc | |
|
2a231d76f8 | |
|
568bdb41be | |
|
ac2ba4a2df | |
|
e79aad8dcd | |
|
0973a7c426 | |
|
5fb50c1d5e | |
|
5442ea0b30 | |
|
df74d4cca5 | |
|
0fc41d4c30 | |
|
7dd5c1ccd7 | |
|
cbd629c579 | |
|
ee2d981bdc | |
|
c2947bf046 | |
|
44975c2853 | |
|
1209826ef1 | |
|
c8a382618e | |
|
41c5fbc19a | |
|
f6deb4c1b7 | |
|
25c92fb6ac | |
|
c95723e526 | |
|
292c11e91f | |
|
8e3e14ad29 | |
|
c4d0d862ba | |
|
e61d7c84a3 | |
|
f004af9a14 | |
|
c9053b6735 | |
|
16054964e0 | |
|
4c95521faa | |
|
0e41b1469d | |
|
dd012d94c3 | |
|
08e19e38c6 | |
|
6c7637b96e | |
|
59702a79a5 | |
|
6c7047e71a | |
|
cc1d6ae78a | |
|
bd8b5650ac | |
|
2cca0fb96c | |
|
ef4150ce37 | |
|
ab1064e80b | |
|
fa3d292879 | |
|
ea7883be20 | |
|
61b117079d | |
|
aadcca8cf3 | |
|
1cb71c1445 | |
|
02f35ad004 | |
|
c252fdfc7b | |
|
362bc0ae91 | |
|
8f2c0d231f | |
|
e8146020cc | |
|
4b6df42f5c | |
|
36adb27cf8 | |
|
f83def7a4f | |
|
ef076c2880 | |
|
4b601ade98 | |
|
b60f4e20b8 | |
|
2e9deb480a | |
|
f8a4d81e24 | |
|
112b891602 | |
|
68ab2f6840 | |
|
18bc8b8438 | |
|
148638981c | |
|
4c384627cf | |
|
51ff803eb3 | |
|
329d342830 | |
|
fedcbbe889 | |
|
435411b7da | |
|
85bae88e1c | |
|
34beb4d71c | |
|
fa46f19d39 | |
|
b6c58c5d90 | |
|
f56b90923f | |
|
6184e19812 | |
|
52c37d56da | |
|
140c6360e0 | |
|
87962d0c0b | |
|
9a018fec38 | |
|
21d55971b7 | |
|
5ac1cef1e8 | |
|
45717e414f | |
|
a46dd004a8 | |
|
c05f964736 | |
|
540ebfa03d | |
|
fdfacb0bde | |
|
19da306e9a | |
|
3da8960cab | |
|
8bdc495476 | |
|
1e67b056b4 | |
|
9a1996c6c1 | |
|
db1d0652b2 | |
|
a3551e7c45 | |
|
88779d3115 | |
|
fd4b666573 | |
|
94907534c9 | |
|
9308bc29fd | |
|
cb998bb85a | |
|
8bb3460ba7 | |
|
5be58c5913 | |
|
250a2f0849 | |
|
c7755005f0 | |
|
42bfb00245 | |
|
99dbcaf3c6 | |
|
7e1119731a | |
|
51f481ad20 | |
|
6fa504df97 | |
|
d6c55f37a4 | |
|
f8c1646804 | |
|
cc22880bb8 | |
|
ebb97dad81 | |
|
24cd5bbbd2 | |
|
8bb8f31381 | |
|
e175397bd1 | |
|
3f4698a536 | |
|
d83d2d8c32 | |
|
8757392e62 | |
|
d1a17d7e66 | |
|
22620a1f59 | |
|
3a61673450 | |
|
03009ce006 | |
|
b242ec28fc | |
|
caa441dfb3 | |
|
b5ac8c5590 | |
|
bd0cf78c39 | |
|
b0802ad102 | |
|
c37dada000 | |
|
093b21085b | |
|
5fee9b7e95 | |
|
9e04442581 | |
|
c464021798 | |
|
6a99caac99 | |
|
7b56506a73 | |
|
3ee7bbd165 | |
|
e1519bdd3d | |
|
3456e6beed | |
|
089571fdf0 | |
|
b7614b2611 | |
|
a4eca8f50d | |
|
e4ee76bf1b | |
|
872ada44e4 | |
|
01a07b51a1 | |
|
29fe7caffe | |
|
057ffef52e | |
|
8fc01df6a6 | |
|
77471ef84e | |
|
69dceb5ce5 | |
|
3dcb465e82 | |
|
ccf8a38cbd | |
|
e9aabaa245 | |
|
73d774f5d4 | |
|
56b7598b82 | |
|
1737c0baae | |
|
ea3f1a3d72 | |
|
5b46d9533a | |
|
88c894b0a5 | |
|
206ca2731b | |
|
a1cf20d1c5 | |
|
647ed91c15 | |
|
9b17be3114 | |
|
f7317c6e8d | |
|
ce533c8ff9 | |
|
8deed1bad5 | |
|
2ae8b5204b | |
|
064f246c99 | |
|
6209109e0a | |
|
a50ceb3959 | |
|
591aff6c15 | |
|
614f0faf98 | |
|
d1087144ed | |
|
6baf514ca4 | |
|
cdab465a7f | |
|
6c6a5fd995 | |
|
05b045e586 | |
|
1697130f0a | |
|
d069e1b473 | |
|
eec0225e37 | |
|
fe3da3d13e | |
|
6c11793bd2 | |
|
1046253f3f | |
|
c3a9f68ec8 | |
|
aea98ba885 | |
|
928d112c7d | |
|
b5ef538e5e | |
|
66285e2cbe | |
|
57b05cb71d | |
|
45a1593575 | |
|
bb3cc2e3de | |
|
169554bb50 | |
|
160af1c480 | |
|
def1c85b60 | |
|
2bc88f45c6 | |
|
8445642052 | |
|
198b2c2994 | |
|
c8e4fd4d9b | |
|
926b57143a | |
|
3a802305dc | |
|
d0c6cd4480 | |
|
c5bc5a0555 | |
|
7b70a9e55e | |
|
b5d0d08ad8 | |
|
734b13e9c5 | |
|
6eea0389af | |
|
80ee9f4bcb | |
|
bb57442cbf | |
|
df65356cda | |
|
90f84f6017 | |
|
955c40f4a9 | |
|
d5bb47664b | |
|
323174abae | |
|
abbafb3627 | |
|
e11829778a | |
|
b979ea1427 | |
|
dcb9bbbe1b | |
|
77be2e0136 | |
|
91bd17e09b | |
|
1d63b2accd | |
|
5def2f7fb2 | |
|
35680960cb | |
|
1c6fd1cceb | |
|
2ef0a58bf8 | |
|
144eb5731f | |
|
cfbe5f9d20 | |
|
6be22eeaa5 | |
|
4bfe17fb76 | |
|
f5dd63a738 | |
|
ca9837fa47 | |
|
1dc764684a | |
|
21abfa2b57 | |
|
7d01751e01 | |
|
facbf4fb9e | |
|
467a275825 | |
|
659a7930bd | |
|
a8086498b1 | |
|
aa355829cb | |
|
c72a01ef1b | |
|
2ef73c83af | |
|
01807f6b4f | |
|
65ab38b2d6 | |
|
7a2a5b379d | |
|
31746e0821 | |
|
7a1114197d | |
|
d84a111273 | |
|
514ae2c975 | |
|
4c8cd7dfa5 | |
|
6de5c50b7e | |
|
6f4a24cd61 | |
|
2ff5dfea8a | |
|
9c3a98c90e | |
|
1566a1b45e | |
|
6054f9a427 | |
|
90313381bd | |
|
aa873a05be | |
|
198aecdfa4 | |
|
eb373a37f1 | |
|
51fb582a36 | |
|
d2a8304b9b | |
|
a68ce4e017 | |
|
d2e6b55d07 | |
|
49ddbb1b00 | |
|
6034c12650 | |
|
4c0cbba5d3 | |
|
160b30a16a | |
|
cb864fd209 | |
|
0860b3884b | |
|
31be1dcc3f | |
|
e141779d02 | |
|
2e3b1e878c | |
|
8e2f44f7c9 | |
|
b6c246a00a | |
|
bc8f721458 | |
|
852e755eeb | |
|
ccfc9ea918 | |
|
f280f278be | |
|
54ca62b42b | |
|
5a1b2c5caa | |
|
5f32636405 | |
|
df100557e7 | |
|
37772d711a | |
|
86cc4bc27d | |
|
b7347f6577 | |
|
9dc1be5db8 | |
|
29f274e1a8 | |
|
7d80a99846 | |
|
d9c8e709e0 | |
|
77f5a174d4 | |
|
83bfb84d14 | |
|
f10959cd85 | |
|
92bd65970e | |
|
60cc5f452a | |
|
4a8850cc64 | |
|
88c7233c7e | |
|
33d2c22260 | |
|
de824dc93a | |
|
e4617bbe90 | |
|
2e5598e492 | |
|
540c2f54b4 | |
|
3ed74b6bbc | |
|
81821296fc | |
|
dbe9a8e0a5 | |
|
f592bf54e4 | |
|
d355bf56df | |
|
7ad506d79f | |
|
b98ce55cd0 | |
|
8659a82583 | |
|
078d55abe5 | |
|
0d234f56c9 | |
|
b7b6a75637 | |
|
bf0f6bfb16 | |
|
bc6be63871 | |
|
20bd019718 | |
|
a9968bcf32 | |
|
6606020c3a | |
|
a79f52d641 | |
|
9d28d973d8 | |
|
e067223409 | |
|
89c6323fff | |
|
d490f5b5e7 | |
|
360da3cf9b | |
|
606feb4ef5 | |
|
23793f7865 | |
|
848c073231 | |
|
605f40b940 | |
|
2bc8178dce | |
|
bfb39f42d4 | |
|
04617c3550 | |
|
57c858f72c | |
|
3f2317fdac | |
|
4a2814b1af | |
|
16be81aed8 | |
|
ee4d771142 | |
|
626daa1e1e | |
|
b46fc4dcea | |
|
0940f6405a | |
|
6480024f11 | |
|
e479f15746 | |
|
59e1b7b38c | |
|
872d267277 | |
|
173a0c27fd | |
|
f36785f676 | |
|
e999fa0d5a | |
|
783237805f | |
|
dbf086589e | |
|
8f7124495f | |
|
f464817013 | |
|
98369a5aad | |
|
0c0c8c0b51 | |
|
2ec053e0fd | |
|
c2d8f6abd9 | |
|
a547e2a1ab | |
|
e6280139b8 | |
|
2fcdacec3e | |
|
d6017ecf7c | |
|
45e278a934 | |
|
1de99ecf3a | |
|
e13d5ad054 | |
|
0807f10f7d | |
|
d909ba43a3 | |
|
f99fdd8269 | |
|
0956a75940 | |
|
8eec1b3a14 | |
|
771eab76e5 | |
|
b5a319cf5c | |
|
0fdee7fe49 | |
|
dc702f2246 | |
|
2014f1a1f3 | |
|
5f2d74ed55 | |
|
44afb133bd | |
|
e33411c61f | |
|
d0357cbad3 | |
|
e7d5a97f88 | |
|
d78cadabaa | |
|
0ac1d8e6d7 | |
|
0f3bc931ae | |
|
0b94400914 | |
|
6692683917 | |
|
7a8cd86c47 | |
|
a895d7e33c | |
|
8ab4d0aa9c | |
|
ddca7f34ba | |
|
7b6a7c9a3f | |
|
d3a8b32f8f | |
|
84b9e663f3 | |
|
82db72abcc | |
|
ccbb28087a | |
|
cf2dc58062 | |
|
cb50ec9ce7 | |
|
bc9dafca03 | |
|
282ae40a3f | |
|
423e1a2c54 | |
|
725ce32db3 | |
|
6bc06f86ca | |
|
45659dc955 | |
|
8d13fa6a38 | |
|
208d7757a1 | |
|
7fe1783e10 | |
|
e375bfdde1 | |
|
c27aa5847a | |
|
c1f54eed61 | |
|
80c05a71a3 | |
|
0a7470e42d | |
|
0ab2eea43e | |
|
fab0131184 | |
|
647ff0db3c | |
|
1b7ec8a235 | |
|
12fc4b2dda | |
|
a36766588b | |
|
f317cc43f0 | |
|
21a61e5894 | |
|
14ffacd1cd | |
|
c4ea1c155e | |
|
1a4fe14379 | |
|
322097ad4b | |
|
2c695a34f8 | |
|
b717b0625a | |
|
cd2583df6a | |
|
559d05adf5 | |
|
e54e7ac4dc | |
|
22d385c763 | |
|
ea288d9722 | |
|
59697eedc0 | |
|
211db4478e | |
|
dba57a538a | |
|
a355c347b8 | |
|
345060e8a3 | |
|
338966e478 | |
|
85b33d43b0 | |
|
ccfa2dcbe4 | |
|
ef99593d4f | |
|
9f870b8988 | |
|
ac884b12e1 | |
|
59a6061dc5 | |
|
26c04299d3 | |
|
7ae6904039 | |
|
b0cdfdb78b | |
|
ef427f69ce | |
|
f5f99cf72d | |
|
9ac622170e | |
|
048a0c8d14 | |
|
3a78a9030a | |
|
3cae1f2a85 | |
|
e676eb41f6 | |
|
5fb1189b98 | |
|
853934335e | |
|
d2fbcbadb2 | |
|
78285cb070 | |
|
7b28342886 | |
|
cb80383df8 | |
|
17265d0b0d | |
|
5cbfe9d93e | |
|
dc8086dfca | |
|
22c7a8e10b | |
|
2527359cd5 | |
|
bc9d8c78ff | |
|
a6107d5590 | |
|
26dd896c09 | |
|
963bc384c8 | |
|
9f10e0048e | |
|
c053393c32 | |
|
69b00c3f35 | |
|
66520d1f3e | |
|
13fb460a54 | |
|
389e64f2cf | |
|
083dca1b94 | |
|
d9c8313832 | |
|
c1afda5efa | |
|
d868eff3e1 | |
|
f4be86124a | |
|
730b2a5be3 | |
|
55d0ccac46 | |
|
e8d1c2d838 | |
|
4fcbee4bb8 | |
|
242f509dd1 | |
|
4398869026 | |
|
72c24127ba | |
|
10414f0ce2 | |
|
4a67130738 | |
|
71351a26b5 | |
|
1f2379f0fc | |
|
91501afbac | |
|
9456aeea26 | |
|
6266b16b0f | |
|
f7c52e181e | |
|
34d75aa260 | |
|
19b0fec813 | |
|
34273f43ca | |
|
cffbd3249c | |
|
3f5778e647 | |
|
b9074f1d8b | |
|
6d9cbc3f3d | |
|
562153dc7f | |
|
5c1bd6cbfe | |
|
0ed4967224 | |
|
eb92539f94 | |
|
5d2c59f839 | |
|
9aee333cf3 | |
|
4392f52e1c | |
|
bd29e1f2ef | |
|
9c6cc22fb6 | |
|
a047632ad7 | |
|
47f7c38ef5 | |
|
92d17f895b | |
|
4a015cc794 | |
|
03c41ec940 | |
|
94f49a209e | |
|
586ac11803 | |
|
6aaebdd4b3 | |
|
97d2115dc4 | |
|
87f788a3b4 | |
|
3773d0b18a | |
|
3cabcc7e45 | |
|
3a9b44832d | |
|
0ef60f8233 | |
|
7b65a9c48f | |
|
044cadb47e | |
|
0a2f400b59 | |
|
f4f61ea2f3 | |
|
53df4aa8a1 | |
|
1313265692 | |
|
f37b0c59e7 | |
|
bd0b474d83 | |
|
b2873186e3 | |
|
8bbb0e25da | |
|
292a84ec2c | |
|
5d521f5c21 | |
|
28405b4f9c | |
|
cb89401381 | |
|
6ab88fbc00 | |
|
3518c98c45 | |
|
c887f2c51a | |
|
df18b2e7ef | |
|
56e58e2df0 | |
|
7c9234e1ae | |
|
5ff5f3f494 | |
|
6a91adcaf3 | |
|
286383b218 | |
|
d5b66595d2 | |
|
7b570f53ce | |
|
89a6ff24cb | |
|
52fd24f4b1 | |
|
07a2d2eb28 | |
|
03e0ad0660 | |
|
750611a673 | |
|
b318c94cdb |
|
@ -0,0 +1,8 @@
|
|||
# see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions
|
||||
exemptions:
|
||||
- check: artifacthub_badge
|
||||
reason: "Artifact Hub doesn't support Java packages"
|
||||
- check: signed_releases
|
||||
reason: "Maven central releases are signed and there are no GitHub release artifacts"
|
||||
- check: openssf_badge
|
||||
reason: "ETOOMANYBADGES, but the work has been done: https://www.bestpractices.dev/projects/9991"
|
|
@ -11,17 +11,15 @@ coverage:
|
|||
status:
|
||||
project:
|
||||
default:
|
||||
target: 90%
|
||||
target: 89%
|
||||
paths:
|
||||
- "!opencensus-shim/"
|
||||
- "!opentracing-shim/"
|
||||
- "!sdk-extensions/zpages/"
|
||||
unmaintained:
|
||||
target: 80%
|
||||
paths:
|
||||
- "opencensus-shim/"
|
||||
- "opentracing-shim/"
|
||||
- "sdk-extensions/zpages/"
|
||||
patch:
|
||||
default:
|
||||
target: 80%
|
||||
|
|
|
@ -3,7 +3,7 @@ charset = utf-8
|
|||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
insert_final_newline = true
|
||||
max_line_length = 100
|
||||
tab_width = 2
|
||||
ij_continuation_indent_size = 4
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
version: 3
|
||||
|
||||
targets:
|
||||
only:
|
||||
- type: gradle
|
||||
exclude:
|
||||
# these modules are not published and so consumers will not be exposed to them
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':api:testing-internal'
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':exporters:otlp:testing-internal'
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':integration-tests'
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':integration-tests:graal'
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':integration-tests:graal-incubating'
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':integration-tests:otlp'
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':integration-tests:tracecontext'
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':perf-harness'
|
||||
- type: gradle
|
||||
path: ./
|
||||
target: ':testing-internal'
|
||||
|
||||
experimental:
|
||||
gradle:
|
||||
configurations-only:
|
||||
# consumer will only be exposed to these dependencies
|
||||
- runtimeClasspath
|
|
@ -2,4 +2,4 @@
|
|||
# This file controls who is tagged for review for any given pull request.
|
||||
|
||||
# For anything not explicitly taken by someone else:
|
||||
* @anuraaga @bogdandrutu @carlosalberto @jack-berg @jkwatson @jsuereth @kubawach @Oberon00
|
||||
* @open-telemetry/java-approvers
|
||||
|
|
|
@ -25,7 +25,7 @@ Version: (e.g., `v0.4.0`, `1eb551b`, etc)
|
|||
How did you reference these artifacts? (excerpt from your `build.gradle`, `pom.xml`, etc)
|
||||
|
||||
**Environment**
|
||||
Compiler: (e.g., "AdoptOpenJDK 11.0.6")
|
||||
Compiler: (e.g., "Temurin 17.0.7")
|
||||
OS: (e.g., "Ubuntu 20.04")
|
||||
Runtime (if different from JDK above): (e.g., "Oracle JRE 8u251")
|
||||
OS (if different from OS compiled on): (e.g., "Windows Server 2019")
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
|
||||
extends: [
|
||||
'config:best-practices',
|
||||
'helpers:pinGitHubActionDigestsToSemver',
|
||||
],
|
||||
packageRules: [
|
||||
{
|
||||
// this is to reduce the number of renovate PRs
|
||||
matchManagers: [
|
||||
'github-actions',
|
||||
'dockerfile',
|
||||
],
|
||||
extends: [
|
||||
'schedule:weekly',
|
||||
],
|
||||
groupName: 'weekly update',
|
||||
},
|
||||
{
|
||||
matchPackageNames: [
|
||||
'io.opentelemetry.contrib:opentelemetry-aws-xray-propagator',
|
||||
'io.opentelemetry.proto:opentelemetry-proto',
|
||||
'io.opentelemetry.semconv:opentelemetry-semconv-incubating',
|
||||
],
|
||||
// Renovate's default behavior is only to update from unstable -> unstable if it's for the
|
||||
// major.minor.patch, under the assumption that you would want to update to the stable version
|
||||
// of that release instead of the unstable version for a future release
|
||||
// (TODO remove once the artifacts above release stable versions)
|
||||
ignoreUnstable: false,
|
||||
allowedVersions: '!/\\-SNAPSHOT$/',
|
||||
},
|
||||
{
|
||||
// junit-pioneer 2+ requires Java 11+
|
||||
matchPackageNames: [
|
||||
'org.junit-pioneer:junit-pioneer',
|
||||
],
|
||||
matchUpdateTypes: [
|
||||
'major',
|
||||
],
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
// mockito 5+ requires Java 11+
|
||||
matchUpdateTypes: [
|
||||
'major',
|
||||
],
|
||||
enabled: false,
|
||||
matchPackageNames: [
|
||||
'org.mockito:{/,}**',
|
||||
],
|
||||
},
|
||||
{
|
||||
// jqf-fuzz version 1.8+ requires Java 11+
|
||||
matchPackageNames: [
|
||||
'edu.berkeley.cs.jqf:jqf-fuzz',
|
||||
],
|
||||
matchUpdateTypes: [
|
||||
'major',
|
||||
'minor',
|
||||
],
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
// pinned version for compatibility
|
||||
matchPackageNames: [
|
||||
'org.jetbrains.kotlinx:kotlinx-coroutines-core',
|
||||
],
|
||||
matchCurrentVersion: '1.5.2',
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
groupName: 'spotless packages',
|
||||
matchPackageNames: [
|
||||
'com.diffplug.spotless{/,}**',
|
||||
],
|
||||
},
|
||||
{
|
||||
// equals verifier v4+ requires java 17+
|
||||
groupName: 'nl.jqno.equalsverifier',
|
||||
matchPackageNames: [ 'equalsverifier'],
|
||||
matchUpdateTypes: [ 'major' ],
|
||||
enabled: false
|
||||
}
|
||||
],
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
# Repository settings
|
||||
|
||||
This document describes any changes that have been made to the
|
||||
settings in this repository outside the settings tracked in the
|
||||
private admin repo.
|
||||
|
||||
## Secrets and variables > Actions
|
||||
|
||||
- `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
|
||||
- `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
|
||||
- `NVD_API_KEY` - stored in OpenTelemetry-Java 1Password
|
||||
- Generated at https://nvd.nist.gov/developers/request-an-api-key
|
||||
- Key is associated with [@trask](https://github.com/trask)'s gmail address
|
||||
- `SONATYPE_KEY` - owned by [@jack-berg](https://github.com/jack-berg)
|
||||
- `SONATYPE_USER` - owned by [@jack-berg](https://github.com/jack-berg)
|
||||
|
||||
### Organization secrets
|
||||
|
||||
- `FOSSA_API_KEY`
|
||||
- `OTELBOT_PRIVATE_KEY`
|
||||
|
||||
### Organization variables
|
||||
|
||||
- `OTELBOT_APP_ID`
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
version=$("$(dirname "$0")/get-version.sh")
|
||||
|
||||
if [[ $version =~ ([0-9]+)\.([0-9]+)\.0 ]]; then
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
else
|
||||
echo "unexpected version: $version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $minor == 0 ]]; then
|
||||
prior_major=$((major - 1))
|
||||
prior_minor=$(sed -n "s/^## Version $prior_major\.\([0-9]\+\)\..*/\1/p" CHANGELOG.md | head -1)
|
||||
if [[ -z $prior_minor ]]; then
|
||||
# assuming this is the first release
|
||||
range=
|
||||
else
|
||||
range="v$prior_major.$prior_minor.0..HEAD"
|
||||
fi
|
||||
else
|
||||
range="v$major.$((minor - 1)).0..HEAD"
|
||||
fi
|
||||
|
||||
echo "## Unreleased"
|
||||
echo
|
||||
|
||||
git log --reverse \
|
||||
--perl-regexp \
|
||||
--author='^(?!renovate\[bot\] )' \
|
||||
--pretty=format:"* %s" \
|
||||
"$range" \
|
||||
| sed -E 's,\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java/pull/\1)),'
|
|
@ -0,0 +1,90 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
# shellcheck disable=SC2086
|
||||
|
||||
# this should be run on the release branch
|
||||
|
||||
# NOTE if you need to run this script locally, you will need to first:
|
||||
# git fetch upstream main
|
||||
# git push origin upstream/main:main
|
||||
# export GITHUB_REPOSITORY=open-telemetry/opentelemetry-java
|
||||
|
||||
from_version=$1
|
||||
|
||||
# get the date of the first commit that was not in the from_version
|
||||
from=$(git log --reverse --pretty=format:"%cI" $from_version..HEAD | head -1)
|
||||
|
||||
# get the last commit on main that was included in the release
|
||||
to=$(git merge-base origin/main HEAD | xargs git log -1 --pretty=format:"%cI")
|
||||
|
||||
contributors1=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query='
|
||||
query($q: String!, $endCursor: String) {
|
||||
search(query: $q, type: ISSUE, first: 100, after: $endCursor) {
|
||||
edges {
|
||||
node {
|
||||
... on PullRequest {
|
||||
author { login }
|
||||
reviews(first: 100) {
|
||||
nodes {
|
||||
author { login }
|
||||
}
|
||||
}
|
||||
comments(first: 100) {
|
||||
nodes {
|
||||
author { login }
|
||||
}
|
||||
}
|
||||
closingIssuesReferences(first: 100) {
|
||||
nodes {
|
||||
author { login }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}' --jq '.data.search.edges.[].node.author.login,
|
||||
.data.search.edges.[].node.reviews.nodes.[].author.login,
|
||||
.data.search.edges.[].node.comments.nodes.[].author.login,
|
||||
.data.search.edges.[].node.closingIssuesReferences.nodes.[].author.login')
|
||||
|
||||
# this query captures authors of issues which have had PRs in the current range reference the issue
|
||||
# but not necessarily through closingIssuesReferences (e.g. addressing just a part of an issue)
|
||||
contributors2=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query='
|
||||
query($q: String!, $endCursor: String) {
|
||||
search(query: $q, type: ISSUE, first: 100, after: $endCursor) {
|
||||
edges {
|
||||
node {
|
||||
... on PullRequest {
|
||||
body
|
||||
}
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
' --jq '.data.search.edges.[].node.body' \
|
||||
| grep -oE "#[0-9]{4,}$|#[0-9]{4,}[^0-9<]|$GITHUB_REPOSITORY/issues/[0-9]{4,}" \
|
||||
| grep -oE "[0-9]{4,}" \
|
||||
| xargs -I{} gh issue view {} --json 'author,url' --jq '[.author.login,.url]' \
|
||||
| grep -v '/pull/' \
|
||||
| sed 's/^\["//' \
|
||||
| sed 's/".*//')
|
||||
|
||||
echo $contributors1 $contributors2 \
|
||||
| sed 's/ /\n/g' \
|
||||
| sort -uf \
|
||||
| grep -v linux-foundation-easycla \
|
||||
| grep -v github-actions \
|
||||
| grep -v renovate \
|
||||
| grep -v codecov \
|
||||
| grep -v otelbot \
|
||||
| sed 's/^/@/'
|
|
@ -0,0 +1,22 @@
|
|||
version=$(.github/scripts/get-version.sh)
|
||||
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
patch="${BASH_REMATCH[3]}"
|
||||
else
|
||||
echo "unexpected version: $version"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $patch == 0 ]]; then
|
||||
if [[ $minor == 0 ]]; then
|
||||
prior_major=$((major - 1))
|
||||
prior_minor=$(grep -Po "^## Version $prior_major.\K[0-9]+" CHANGELOG.md | head -1)
|
||||
prior_version="$prior_major.$prior_minor"
|
||||
else
|
||||
prior_version="$major.$((minor - 1)).0"
|
||||
fi
|
||||
else
|
||||
prior_version="$major.$minor.$((patch - 1))"
|
||||
fi
|
||||
|
||||
echo $prior_version
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
grep -Eo "[0-9]+.[0-9]+.[0-9]+" version.gradle.kts
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# this script merges release notes for $VERSION into CHANGELOG.md
|
||||
# the release date for $VERSION should be available in $RELEASE_DATE
|
||||
# and the release notes for $VERSION should be available in /tmp/changelog-section.md
|
||||
|
||||
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.0 ]]; then
|
||||
# this was not a patch release, so the version exists already in the CHANGELOG.md
|
||||
|
||||
# update the release date
|
||||
sed -Ei "s/## Version $VERSION .*/## Version $VERSION ($RELEASE_DATE)/" CHANGELOG.md
|
||||
|
||||
# the entries are copied over from the release branch to support workflows
|
||||
# where change log entries may be updated after preparing the release branch
|
||||
|
||||
{
|
||||
# copy the portion above the release, up to and including the heading
|
||||
sed -n "0,/^## Version $VERSION /p" CHANGELOG.md
|
||||
# copy the release notes for $VERSION
|
||||
cat /tmp/changelog-section.md
|
||||
# copy the portion below the release
|
||||
sed -n "0,/^## Version $VERSION /d;0,/^## Version /{/^## Version/!d};p" CHANGELOG.md
|
||||
} > /tmp/CHANGELOG.md
|
||||
|
||||
# update the real CHANGELOG.md
|
||||
cp /tmp/CHANGELOG.md CHANGELOG.md
|
||||
|
||||
else
|
||||
# this was a patch release, so the version does not exist already in the CHANGELOG.md
|
||||
|
||||
{
|
||||
# copy the portion above the top-most release, not including the heading
|
||||
sed -n "0,/^## Version /{ /^## Version /!p }" CHANGELOG.md
|
||||
# add the heading
|
||||
echo "## Version $VERSION ($RELEASE_DATE)"
|
||||
# copy the release notes for $VERSION
|
||||
cat /tmp/changelog-section.md
|
||||
# copy the portion starting from the top-most release
|
||||
sed -n "/^## Version /,\$p" CHANGELOG.md
|
||||
} > /tmp/CHANGELOG.md
|
||||
|
||||
# update the real CHANGELOG.md
|
||||
cp /tmp/CHANGELOG.md CHANGELOG.md
|
||||
fi
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
version=$1
|
||||
versionWithSnapshot="$version-SNAPSHOT"
|
||||
|
||||
sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$version/" version.gradle.kts
|
||||
|
||||
sed -Ei "1 s/(Comparing source compatibility of [a-z-]+)-[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?.jar/\1-$versionWithSnapshot.jar/" docs/apidiffs/current_vs_latest/*.txt
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
git config user.name otelbot
|
||||
git config user.email 197425009+otelbot@users.noreply.github.com
|
|
@ -0,0 +1,54 @@
|
|||
name: Backport
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
number:
|
||||
description: "The pull request # to backport"
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
permissions:
|
||||
contents: write # for git push to PR branch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x$ ]]; then
|
||||
echo this workflow should only be run against release branches
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
# history is needed to run git cherry-pick below
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
|
||||
id: otelbot-token
|
||||
with:
|
||||
app-id: ${{ vars.OTELBOT_APP_ID }}
|
||||
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
|
||||
|
||||
- name: Create pull request
|
||||
env:
|
||||
NUMBER: ${{ github.event.inputs.number }}
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
|
||||
run: |
|
||||
commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid)
|
||||
title=$(gh pr view $NUMBER --json title --jq .title)
|
||||
|
||||
branch="otelbot/backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}"
|
||||
|
||||
git checkout -b $branch
|
||||
git cherry-pick $commit
|
||||
git push --set-upstream origin $branch
|
||||
gh pr create --title "[$GITHUB_REF_NAME] $title" \
|
||||
--body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
|
||||
--base $GITHUB_REF_NAME
|
|
@ -0,0 +1,77 @@
|
|||
name: Benchmark Tags
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sdk-benchmark:
|
||||
permissions:
|
||||
contents: write # for git push to benchmarks branch
|
||||
name: Benchmark SDK
|
||||
runs-on: equinix-bare-metal
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
tag-version:
|
||||
- v1.6.0
|
||||
- v1.7.0
|
||||
- v1.7.1
|
||||
- v1.10.0
|
||||
- v1.10.1
|
||||
- v1.11.0
|
||||
- v1.12.0
|
||||
- v1.13.0
|
||||
- v1.14.0
|
||||
- v1.15.0
|
||||
- v1.16.0
|
||||
- v1.17.0
|
||||
- v1.18.0
|
||||
- v1.19.0
|
||||
- v1.21.0
|
||||
- v1.22.0
|
||||
- v1.23.0
|
||||
- v1.23.1
|
||||
- v1.24.0
|
||||
- v1.25.0
|
||||
- v1.26.0
|
||||
- v1.27.0
|
||||
- v1.28.0
|
||||
- v1.29.0
|
||||
- v1.30.0
|
||||
- v1.30.1
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: ${{ matrix.tag-version }}
|
||||
|
||||
- id: setup-java
|
||||
name: Set up Java for build
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
- name: Run jmh
|
||||
run: ./gradlew jmhJar
|
||||
|
||||
- name: Run Benchmark
|
||||
run: |
|
||||
cd sdk/trace/build
|
||||
java -jar libs/opentelemetry-sdk-trace-*-jmh.jar -rf json SpanBenchmark SpanPipelineBenchmark ExporterBenchmark
|
||||
|
||||
- name: Store benchmark results
|
||||
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1.20.4
|
||||
with:
|
||||
tool: 'jmh'
|
||||
output-file-path: sdk/trace/build/jmh-result.json
|
||||
gh-pages-branch: benchmarks
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
benchmark-data-dir-path: "benchmarks"
|
||||
auto-push: true
|
||||
ref: ${{ matrix.tag-version }}
|
|
@ -0,0 +1,46 @@
|
|||
name: Benchmark Main
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sdk-benchmark:
|
||||
permissions:
|
||||
contents: write # for git push to benchmarks branch
|
||||
name: Benchmark SDK
|
||||
runs-on: equinix-bare-metal
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- id: setup-java
|
||||
name: Set up Java for build
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
- name: Run jmh
|
||||
run: ./gradlew jmhJar
|
||||
|
||||
- name: Run Benchmark
|
||||
run: |
|
||||
cd sdk/trace/build
|
||||
java -jar libs/opentelemetry-sdk-trace-*-jmh.jar -rf json SpanBenchmark SpanPipelineBenchmark ExporterBenchmark
|
||||
|
||||
- name: Store benchmark results
|
||||
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1.20.4
|
||||
with:
|
||||
tool: 'jmh'
|
||||
output-file-path: sdk/trace/build/jmh-result.json
|
||||
gh-pages-branch: benchmarks
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
benchmark-data-dir-path: "benchmarks"
|
||||
auto-push: true
|
|
@ -9,21 +9,27 @@ on:
|
|||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Login to GitHub Package Registry
|
||||
uses: docker/login-action@v1
|
||||
- name: Login to GitHub package registry
|
||||
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
||||
with:
|
||||
context: integration-tests/tracecontext/docker
|
||||
push: true
|
||||
|
|
|
@ -0,0 +1,201 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- macos-13
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
test-java-version:
|
||||
- 8
|
||||
- 11
|
||||
- 17
|
||||
- 21
|
||||
- 23
|
||||
# Collect coverage on latest LTS
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
test-java-version: 21
|
||||
coverage: true
|
||||
jmh-based-tests: true
|
||||
# macos-latest drops support for java 8 temurin. Run java 8 on macos-13. Run java 11, 17, 21 on macos-latest.
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
test-java-version: 8
|
||||
- os: macos-13
|
||||
test-java-version: 11
|
||||
- os: macos-13
|
||||
test-java-version: 17
|
||||
- os: macos-13
|
||||
test-java-version: 21
|
||||
- os: macos-13
|
||||
test-java-version: 23
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- id: setup-java-test
|
||||
name: Set up Java ${{ matrix.test-java-version }} for tests
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: ${{ matrix.test-java-version }}
|
||||
|
||||
- id: setup-java
|
||||
name: Set up Java for build
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
- name: Build
|
||||
run: >
|
||||
./gradlew build
|
||||
${{ matrix.coverage && 'jacocoTestReport' || '' }}
|
||||
-PtestJavaVersion=${{ matrix.test-java-version }}
|
||||
"-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }}"
|
||||
"-Porg.gradle.java.installations.auto-download=false"
|
||||
env:
|
||||
# JMH-based tests run only if this environment variable is set to true
|
||||
RUN_JMH_BASED_TESTS: ${{ matrix.jmh-based-tests }}
|
||||
|
||||
- name: Check for diff
|
||||
# The jApiCmp diff compares current to latest, which isn't appropriate for release branches
|
||||
# this fails on windows because of the bash-specific if/then/else syntax, but that's ok
|
||||
# because we only need to run this validation once (on any platform)
|
||||
if: ${{ matrix.os != 'windows-latest' && !startsWith(github.ref_name, 'release/') && !startsWith(github.base_ref, 'release/') }}
|
||||
run: |
|
||||
# need to "git add" in case any generated files did not already exist
|
||||
git add docs/apidiffs
|
||||
if git diff --cached --quiet
|
||||
then
|
||||
echo "No diff detected."
|
||||
else
|
||||
echo "Diff detected - did you run './gradlew jApiCmp'?"
|
||||
echo $(git diff --cached --name-only)
|
||||
echo $(git diff --cached)
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
|
||||
if: ${{ matrix.coverage }}
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
if: ${{ matrix.coverage }}
|
||||
with:
|
||||
name: coverage-report
|
||||
path: all/build/reports/jacoco/test/html
|
||||
|
||||
markdown-link-check:
|
||||
# release branches are excluded to avoid unnecessary maintenance
|
||||
if: ${{ !startsWith(github.ref_name, 'release/') }}
|
||||
uses: ./.github/workflows/reusable-markdown-link-check.yml
|
||||
|
||||
misspell-check:
|
||||
# release branches are excluded to avoid unnecessary maintenance
|
||||
if: ${{ !startsWith(github.ref_name, 'release/') }}
|
||||
uses: ./.github/workflows/reusable-misspell-check.yml
|
||||
|
||||
publish-snapshots:
|
||||
# the condition is on the steps below instead of here on the job, because skipping the job
|
||||
# causes the job to show up as canceled in the GitHub UI which prevents the build section from
|
||||
# collapsing when everything (else) is green
|
||||
#
|
||||
# and the name is updated when the steps below are skipped which makes what's happening clearer
|
||||
# in the GitHub UI
|
||||
#
|
||||
# note: the condition below has to be written so that '' is last since it resolves to false
|
||||
# and so would not short-circuit if used in the second-last position
|
||||
name: publish-snapshots${{ (github.ref_name != 'main' || github.repository != 'open-telemetry/opentelemetry-java') && ' (skipped)' || '' }}
|
||||
# intentionally not blocking snapshot publishing on markdown-link-check or misspell-check
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- id: setup-java
|
||||
name: Set up Java
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
# skipping release branches because the versions in those branches are not snapshots
|
||||
# (also this skips pull requests)
|
||||
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java' }}
|
||||
- name: Publish to Sonatype
|
||||
run: ./gradlew assemble publishToSonatype
|
||||
# skipping release branches because the versions in those branches are not snapshots
|
||||
# (also this skips pull requests)
|
||||
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java' }}
|
||||
env:
|
||||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
||||
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
|
||||
|
||||
build-graal:
|
||||
name: Build GraalVM
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test-graal-version:
|
||||
- 21
|
||||
- 23
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: graalvm/setup-graalvm@7f488cf82a3629ee755e4e97342c01d6bed318fa # v1.3.5
|
||||
with:
|
||||
java-version: ${{ matrix.test-graal-version }}
|
||||
distribution: 'graalvm'
|
||||
components: 'native-image'
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Running test
|
||||
run: |
|
||||
echo "GRAALVM_HOME: $GRAALVM_HOME"
|
||||
echo "JAVA_HOME: $JAVA_HOME"
|
||||
java --version
|
||||
native-image --version
|
||||
./gradlew nativeTest
|
||||
|
||||
required-status-check:
|
||||
# markdown-link-check is not required so pull requests are not blocked if external links break
|
||||
# misspell-check is not required so pull requests are not blocked if the misspell dictionary is
|
||||
# updated
|
||||
needs:
|
||||
- build
|
||||
- build-graal
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
steps:
|
||||
- if: |
|
||||
needs.build.result != 'success' ||
|
||||
needs.build-graal.result != 'success'
|
||||
run: exit 1
|
|
@ -1,31 +0,0 @@
|
|||
name: "Code Scanning - Action"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2.4.0
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: java
|
||||
|
||||
- name: Setup Java 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
|
@ -0,0 +1,65 @@
|
|||
name: CodeQL
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
- benchmarks
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
- benchmarks
|
||||
schedule:
|
||||
- cron: "23 16 * * 2" # weekly at 16:23 UTC on Tuesday
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read # for github/codeql-action/init to get workflow details
|
||||
security-events: write # for github/codeql-action/analyze to upload SARIF results
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
- language: java
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Set up Java 17
|
||||
if: matrix.language == 'java'
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Set up gradle
|
||||
if: matrix.language == 'java'
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# using "latest" helps to keep up with the latest Kotlin support
|
||||
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
|
||||
tools: latest
|
||||
|
||||
- name: Assemble
|
||||
if: matrix.language == 'java'
|
||||
# --no-build-cache is required for codeql to analyze all modules
|
||||
# --no-daemon is required for codeql to observe the compilation
|
||||
# (see https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#specifying-build-commands)
|
||||
run: ./gradlew assemble --no-build-cache --no-daemon
|
||||
|
||||
- name: Perform CodeQL analysis
|
||||
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
|
@ -0,0 +1,40 @@
|
|||
name: Copy test container docker images (daily)
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "23 3 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
copy-images:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- source: jaegertracing/all-in-one:1.32
|
||||
target_image: jaeger:1.32
|
||||
- source: otel/opentelemetry-collector-contrib:latest
|
||||
target_image: otel-collector
|
||||
- source: shopify/toxiproxy:latest
|
||||
target_image: toxiproxy
|
||||
- source: eclipse-temurin:17-jre-focal
|
||||
target_image: openjdk17
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker login
|
||||
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Copy image
|
||||
# Non-debug image doesn't seem to support reading the .docker creds.
|
||||
run: |
|
||||
docker run --rm -v $HOME/.docker:/root/.docker gcr.io/go-containerregistry/crane:debug \
|
||||
cp ${{ matrix.source }} ghcr.io/open-telemetry/opentelemetry-java/${{ matrix.target_image }}
|
|
@ -1,33 +0,0 @@
|
|||
name: Copy test container docker images
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "23 3 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
copy-images:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- source: jaegertracing/all-in-one:1.17
|
||||
target_image: jaeger
|
||||
- source: otel/opentelemetry-collector-contrib:latest
|
||||
target_image: otel-collector
|
||||
- source: shopify/toxiproxy:latest
|
||||
target_image: toxiproxy
|
||||
- source: eclipse-temurin:8-jdk
|
||||
target_image: openjdk8
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Pull and push
|
||||
run: |
|
||||
docker pull ${{ matrix.source }}
|
||||
docker tag ${{ matrix.source }} ghcr.io/open-telemetry/opentelemetry-java/${{ matrix.target_image }}
|
||||
docker push ghcr.io/open-telemetry/opentelemetry-java/${{ matrix.target_image }}
|
|
@ -0,0 +1,20 @@
|
|||
name: FOSSA
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
fossa:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
|
||||
with:
|
||||
api-key: ${{secrets.FOSSA_API_KEY}}
|
||||
team: OpenTelemetry
|
|
@ -1,10 +1,16 @@
|
|||
name: "Validate Gradle Wrapper"
|
||||
on: [push, pull_request]
|
||||
name: Gradle wrapper validation
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
validation:
|
||||
name: "Gradle wrapper validation"
|
||||
gradle-wrapper-validation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: gradle/actions/wrapper-validation@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
name: Issue management - remove needs feedback label
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
issue_comment:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
if: >
|
||||
contains(github.event.issue.labels.*.name, 'needs author feedback') &&
|
||||
github.event.comment.user.login == github.event.issue.user.login
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Remove label
|
||||
env:
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh issue edit --remove-label "needs author feedback" $ISSUE_NUMBER
|
|
@ -0,0 +1,32 @@
|
|||
name: Issue management - run stale action
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# hourly at minute 23
|
||||
- cron: "23 * * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 7
|
||||
days-before-close: 7
|
||||
only-labels: "needs author feedback"
|
||||
stale-issue-message: >
|
||||
This has been automatically marked as stale because it has been marked
|
||||
as needing author feedback and has not had any activity for 7 days.
|
||||
It will be closed if no further activity occurs within 7 days of this comment.
|
||||
stale-pr-message: >
|
||||
This has been automatically marked as stale because it has been marked
|
||||
as needing author feedback and has not had any activity for 7 days.
|
||||
It will be closed if no further activity occurs within 7 days of this comment.
|
|
@ -0,0 +1,26 @@
|
|||
name: Javadoc.io site crawler (daily)
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *" # daily at 1:30 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
crawl:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
|
||||
- name: Run crawler
|
||||
run: ./gradlew :javadoc-crawler:crawl
|
|
@ -1,86 +0,0 @@
|
|||
name: "Continuous Build"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-20.04
|
||||
test-java-version:
|
||||
- 8
|
||||
- 11
|
||||
- 17
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
test-java-version: 17
|
||||
coverage: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- id: setup-java-8
|
||||
name: Setup Java 8 for tests
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 8
|
||||
java-package: jre
|
||||
- id: setup-java-11
|
||||
name: Setup Java 11 for tests
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
- id: setup-java-17
|
||||
name: Setup Java 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: |
|
||||
build
|
||||
--stacktrace
|
||||
${{ matrix.coverage && 'jacocoTestReport' || '' }}
|
||||
-PtestJavaVersion=${{ matrix.test-java-version }}
|
||||
-Porg.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-17.outputs.path }}
|
||||
- uses: codecov/codecov-action@v2.1.0
|
||||
if: ${{ matrix.coverage }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ matrix.coverage }}
|
||||
with:
|
||||
name: coverage-report
|
||||
path: all/build/reports/jacoco/test/html
|
||||
publish-snapshots:
|
||||
name: Publish snapshots
|
||||
if: ${{ github.event_name == 'push' && github.repository == 'open-telemetry/opentelemetry-java' }}
|
||||
needs: build
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- id: setup-java-11
|
||||
name: Setup Java 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: snapshot --stacktrace
|
||||
env:
|
||||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
||||
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
|
|
@ -0,0 +1,47 @@
|
|||
name: OSSF Scorecard
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "43 6 * * 5" # weekly at 06:43 (UTC) on Friday
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed for Code scanning upload
|
||||
security-events: write
|
||||
# Needed for GitHub OIDC token if publish_results is true
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ossf/scorecard-action@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@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
|
||||
with:
|
||||
sarif_file: results.sarif
|
|
@ -0,0 +1,47 @@
|
|||
# the benefit of this over renovate is that this also analyzes transitive dependencies
|
||||
# while renovate (at least currently) only analyzes top-level dependencies
|
||||
name: OWASP dependency check (daily)
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *" # daily at 1:30 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
|
||||
- name: Check dependencies
|
||||
run: ./gradlew dependencyCheckAnalyze
|
||||
env:
|
||||
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
path: javaagent/build/reports
|
||||
|
||||
workflow-notification:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
needs:
|
||||
- analyze
|
||||
if: always()
|
||||
uses: ./.github/workflows/reusable-workflow-notification.yml
|
||||
with:
|
||||
success: ${{ needs.analyze.result == 'success' }}
|
|
@ -1,89 +0,0 @@
|
|||
# Releases a patch by cherrypicking commits into a release branch based on the previous
|
||||
# release tag.
|
||||
name: Patch Release Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: The version to tag the release with, e.g., 1.2.1, 1.2.2
|
||||
required: true
|
||||
commits:
|
||||
description: Comma separated list of commit shas to cherrypick, leave blank if changes have already been merged into the release branch
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
prepare-release-branch:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
release-branch-name: ${{ steps.parse-release-branch.outputs.release-branch-name }}
|
||||
steps:
|
||||
- id: parse-release-branch
|
||||
name: Parse release branch name
|
||||
run: |
|
||||
# Sets the release-branch-name output to the version number with the last non-period element replaced with an 'x' and preprended with v.
|
||||
echo "::set-output name=release-branch-name::$(echo '${{ github.event.inputs.version }}' | sed -E 's/([^.]+)\.([^.]+)\.([^.]+)/v\1.\2.x/')"
|
||||
# Sets the release-tag-name output to the version number with the last non-period element replace with a '0' and prepended with v
|
||||
echo "::set-output name=release-tag-name::$(echo '${{ github.event.inputs.version }}' | sed -E 's/([^.]+)\.([^.]+)\.([^.]+)/v\1.\2.0/')"
|
||||
- id: checkout-release-branch
|
||||
name: Check out release branch
|
||||
continue-on-error: true
|
||||
uses: actions/checkout@v2.4.0
|
||||
with:
|
||||
ref: ${{ steps.parse-release-branch.outputs.release-branch-name }}
|
||||
- id: checkout-release-tag
|
||||
name: Check out release tag
|
||||
if: ${{ steps.checkout-release-branch.outcome == 'failure' }}
|
||||
uses: actions/checkout@v2.4.0
|
||||
with:
|
||||
ref: ${{ steps.parse-release-branch.outputs.release-tag-name }}
|
||||
- name: Create release branch
|
||||
if: ${{ steps.checkout-release-tag.outcome == 'success' }}
|
||||
run: |
|
||||
git checkout -b ${{ steps.parse-release-branch.outputs.release-branch-name }}
|
||||
git push --set-upstream origin ${{ steps.parse-release-branch.outputs.release-branch-name }}
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: prepare-release-branch
|
||||
steps:
|
||||
- name: Checkout release branch
|
||||
uses: actions/checkout@v2.4.0
|
||||
with:
|
||||
ref: ${{ needs.prepare-release-branch.outputs.release-branch-name }}
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- name: Setup git name
|
||||
run: |
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
- name: Cherrypicks
|
||||
if: ${{ github.event.inputs.commits != '' }}
|
||||
run: |
|
||||
git fetch origin main
|
||||
echo ${{ github.event.inputs.commits }} | sed -n 1'p' | tr ',' '\n' | while read word; do
|
||||
# Trim whitespaces and cherrypick
|
||||
echo $word | sed 's/ *$//g' | sed 's/^ *//g' | git cherry-pick --stdin
|
||||
done
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: |
|
||||
build
|
||||
--stacktrace
|
||||
-Prelease.version=${{ github.event.inputs.version }}
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
name: Publish artifacts
|
||||
with:
|
||||
arguments: |
|
||||
final
|
||||
closeAndReleaseSonatypeStagingRepository
|
||||
--stacktrace
|
||||
-Prelease.version=${{ github.event.inputs.version }}
|
||||
env:
|
||||
GRGIT_USER: ${{ github.actor }}
|
||||
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
||||
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
|
||||
- run: git push
|
|
@ -1,64 +0,0 @@
|
|||
name: "PR Build"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-20.04
|
||||
test-java-version:
|
||||
- 8
|
||||
- 11
|
||||
- 17
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
test-java-version: 11
|
||||
coverage: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- id: setup-java-8
|
||||
name: Setup Java 8 for tests
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 8
|
||||
java-package: jre
|
||||
- id: setup-java-11
|
||||
name: Setup Java 11 for tests
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
- id: setup-java-17
|
||||
name: Setup Java 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: |
|
||||
build
|
||||
--stacktrace
|
||||
${{ matrix.coverage && 'jacocoTestReport' || '' }}
|
||||
-PtestJavaVersion=${{ matrix.test-java-version }}
|
||||
-Porg.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-11.outputs.path }},${{ steps.setup-java-16.outputs.path }},${{ steps.setup-java-17.outputs.path }}
|
||||
- uses: codecov/codecov-action@v2.1.0
|
||||
if: ${{ matrix.coverage }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ matrix.coverage }}
|
||||
with:
|
||||
name: coverage-report
|
||||
path: all/build/reports/jacoco/test/html
|
|
@ -1,29 +0,0 @@
|
|||
name: "PR Examples Build"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'examples/**'
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- name: Setup Java 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: clean check shadowJar
|
||||
build-root-directory: examples
|
||||
- run: java -cp examples/sdk-usage/build/libs/opentelemetry-examples-sdk-usage-0.1.0-SNAPSHOT-all.jar io.opentelemetry.sdk.example.ConfigureSpanProcessorExample
|
|
@ -0,0 +1,69 @@
|
|||
name: Prepare patch release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prepare-patch-release:
|
||||
permissions:
|
||||
contents: write # for git push to PR branch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- run: |
|
||||
if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x$ ]]; then
|
||||
echo this workflow should only be run against release branches
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then
|
||||
echo the change log is missing an \"Unreleased\" section
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
version=$(.github/scripts/get-version.sh)
|
||||
if [[ $version =~ ^([0-9]+\.[0-9]+)\.([0-9]+)$ ]]; then
|
||||
major_minor="${BASH_REMATCH[1]}"
|
||||
patch="${BASH_REMATCH[2]}"
|
||||
else
|
||||
echo "unexpected version: $version"
|
||||
exit 1
|
||||
fi
|
||||
echo "VERSION=$major_minor.$((patch + 1))" >> $GITHUB_ENV
|
||||
|
||||
- name: Update version
|
||||
run: .github/scripts/update-version.sh $VERSION
|
||||
|
||||
- name: Update the change log with the approximate release date
|
||||
run: |
|
||||
date=$(date "+%Y-%m-%d")
|
||||
sed -Ei "s/^## Unreleased$/## Version $VERSION ($date)/" CHANGELOG.md
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
|
||||
id: otelbot-token
|
||||
with:
|
||||
app-id: ${{ vars.OTELBOT_APP_ID }}
|
||||
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
|
||||
|
||||
- name: Create pull request
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
|
||||
run: |
|
||||
message="Prepare release $VERSION"
|
||||
branch="otelbot/prepare-release-${VERSION}"
|
||||
|
||||
git checkout -b $branch
|
||||
git commit -a -m "$message"
|
||||
git push --set-upstream origin $branch
|
||||
gh pr create --title "[$GITHUB_REF_NAME] $message" \
|
||||
--body "$message." \
|
||||
--base $GITHUB_REF_NAME
|
|
@ -0,0 +1,138 @@
|
|||
name: Prepare release branch
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prereqs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Verify prerequisites
|
||||
run: |
|
||||
if [[ $GITHUB_REF_NAME != main ]]; then
|
||||
echo this workflow should only be run against main
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then
|
||||
echo the change log is missing an \"Unreleased\" section
|
||||
exit 1
|
||||
fi
|
||||
|
||||
create-pull-request-against-release-branch:
|
||||
permissions:
|
||||
contents: write # for git push to PR branch
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- prereqs
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Create release branch
|
||||
run: |
|
||||
version=$(.github/scripts/get-version.sh)
|
||||
version=${version//-SNAPSHOT/}
|
||||
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then
|
||||
release_branch_name=$(echo $version | sed -E 's/([0-9]+)\.([0-9]+)\.0/release\/v\1.\2.x/')
|
||||
else
|
||||
echo "unexpected version: $version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git push origin HEAD:$release_branch_name
|
||||
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
echo "RELEASE_BRANCH_NAME=$release_branch_name" >> $GITHUB_ENV
|
||||
|
||||
- name: Update version
|
||||
run: sed -Ei "s/val snapshot = true/val snapshot = false/" version.gradle.kts
|
||||
|
||||
- name: Update the change log with the approximate release date
|
||||
run: |
|
||||
date=$(date "+%Y-%m-%d")
|
||||
sed -Ei "s/^## Unreleased$/## Version $VERSION ($date)/" CHANGELOG.md
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
|
||||
id: otelbot-token
|
||||
with:
|
||||
app-id: ${{ vars.OTELBOT_APP_ID }}
|
||||
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
|
||||
|
||||
- name: Create pull request against the release branch
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
|
||||
run: |
|
||||
message="Prepare release $VERSION"
|
||||
branch="otelbot/prepare-release-${VERSION}"
|
||||
|
||||
git checkout -b $branch
|
||||
git commit -a -m "$message"
|
||||
git push --set-upstream origin $branch
|
||||
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
|
||||
--body "$message." \
|
||||
--base $RELEASE_BRANCH_NAME
|
||||
|
||||
create-pull-request-against-main:
|
||||
permissions:
|
||||
contents: write # for git push to PR branch
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- prereqs
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
version=$(.github/scripts/get-version.sh)
|
||||
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
next_version="$major.$((minor + 1)).0"
|
||||
else
|
||||
echo "unexpected version: $version"
|
||||
exit 1
|
||||
fi
|
||||
echo "NEXT_VERSION=${next_version}" >> $GITHUB_ENV
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
- name: Update version
|
||||
run: .github/scripts/update-version.sh $NEXT_VERSION
|
||||
|
||||
- name: Update the change log on main
|
||||
run: |
|
||||
# the actual release date on main will be updated at the end of the release workflow
|
||||
date=$(date "+%Y-%m-%d")
|
||||
sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version $VERSION ($date)/" CHANGELOG.md
|
||||
|
||||
- name: Use CLA approved github bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
|
||||
id: otelbot-token
|
||||
with:
|
||||
app-id: ${{ vars.OTELBOT_APP_ID }}
|
||||
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
|
||||
|
||||
- name: Create pull request against main
|
||||
env:
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
|
||||
run: |
|
||||
message="Update version to $NEXT_VERSION"
|
||||
body="Update version to \`$NEXT_VERSION\`."
|
||||
branch="otelbot/update-version-to-${NEXT_VERSION}"
|
||||
|
||||
git checkout -b $branch
|
||||
git commit -a -m "$message"
|
||||
git push --set-upstream origin $branch
|
||||
gh pr create --title "$message" \
|
||||
--body "$body" \
|
||||
--base main
|
|
@ -1,40 +0,0 @@
|
|||
# Releases a new minor / major version from the HEAD of the main branch
|
||||
name: Release Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: The version to tag the release with, e.g., 1.2.0, 1.2.1-alpha.1
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and release
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: |
|
||||
build
|
||||
--stacktrace
|
||||
-Prelease.version=${{ github.event.inputs.version }}
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
name: Publish artifacts
|
||||
with:
|
||||
arguments: |
|
||||
final
|
||||
closeAndReleaseSonatypeStagingRepository
|
||||
--stacktrace
|
||||
-Prelease.version=${{ github.event.inputs.version }}
|
||||
env:
|
||||
GRGIT_USER: ${{ github.actor }}
|
||||
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
||||
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
|
|
@ -0,0 +1,221 @@
|
|||
name: Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: write # for creating the release
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
version: ${{ steps.create-github-release.outputs.version }}
|
||||
prior-version: ${{ steps.create-github-release.outputs.prior-version }}
|
||||
steps:
|
||||
- run: |
|
||||
if [[ $GITHUB_REF_NAME != release/* ]]; then
|
||||
echo this workflow should only be run against release branches
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||
|
||||
- name: Build and publish artifacts
|
||||
run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
|
||||
env:
|
||||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
||||
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
version=$(.github/scripts/get-version.sh)
|
||||
if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
patch="${BASH_REMATCH[3]}"
|
||||
else
|
||||
echo "unexpected version: $version"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $patch == 0 ]]; then
|
||||
if [[ $minor == 0 ]]; then
|
||||
prior_major=$((major - 1))
|
||||
prior_minor=$(grep -Po "^## Version $prior_major.\K[0-9]+" CHANGELOG.md | head -1)
|
||||
prior_version="$prior_major.$prior_minor"
|
||||
else
|
||||
prior_version="$major.$((minor - 1)).0"
|
||||
fi
|
||||
else
|
||||
prior_version="$major.$minor.$((patch - 1))"
|
||||
fi
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
echo "PRIOR_VERSION=$prior_version" >> $GITHUB_ENV
|
||||
|
||||
# check out main branch to verify there won't be problems with merging the change log
|
||||
# at the end of this workflow
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Check that change log update was merged to main
|
||||
run: |
|
||||
if [[ $VERSION == *.0 ]]; then
|
||||
# not making a patch release
|
||||
if ! grep --quiet "^## Version $VERSION " CHANGELOG.md; then
|
||||
echo the pull request generated by prepare-release-branch.yml needs to be merged first
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# back to the release branch
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
# tags are needed for the generate-release-contributors.sh script
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Generate release notes
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# conditional blocks not indented because of the heredoc
|
||||
if [[ $VERSION != *.0 ]]; then
|
||||
cat > /tmp/release-notes.txt << EOF
|
||||
This is a patch release on the previous $PRIOR_VERSION release, fixing the issue(s) below.
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
# CHANGELOG_SECTION.md is also used at the end of the release workflow
|
||||
# for copying the change log updates to main
|
||||
sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \
|
||||
> /tmp/CHANGELOG_SECTION.md
|
||||
|
||||
# the complex perl regex is needed because markdown docs render newlines as soft wraps
|
||||
# while release notes render them as line breaks
|
||||
perl -0pe 's/(?<!\n)\n *(?!\n)(?![-*] )(?![1-9]+\. )/ /g' /tmp/CHANGELOG_SECTION.md \
|
||||
>> /tmp/release-notes.txt
|
||||
|
||||
# conditional block not indented because of the heredoc
|
||||
if [[ $VERSION == *.0 ]]; then
|
||||
cat >> /tmp/release-notes.txt << EOF
|
||||
|
||||
### 🙇 Thank you
|
||||
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
|
||||
|
||||
EOF
|
||||
|
||||
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt
|
||||
fi
|
||||
|
||||
- id: create-github-release
|
||||
name: Create GitHub release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create --target $GITHUB_REF_NAME \
|
||||
--title "Version $VERSION" \
|
||||
--notes-file /tmp/release-notes.txt \
|
||||
v$VERSION
|
||||
|
||||
# these are used as job outputs
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
update-apidiff-baseline-and-docs-to-released-version:
|
||||
permissions:
|
||||
contents: write # for git push to PR branch
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- release
|
||||
steps:
|
||||
# add change log sync (if any) into this PR since the apidiff update
|
||||
# is required before any other PR can be merged anyway
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Copy change log section from release branch
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.version }}
|
||||
run: |
|
||||
sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \
|
||||
> /tmp/changelog-section.md
|
||||
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Merge change log to main
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.version }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
release_date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
|
||||
RELEASE_DATE=$release_date .github/scripts/merge-change-log-after-release.sh
|
||||
git add CHANGELOG.md
|
||||
|
||||
- name: Wait for release to be available in maven central
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.version }}
|
||||
run: |
|
||||
until curl --silent \
|
||||
--show-error \
|
||||
--output /dev/null \
|
||||
--head \
|
||||
--fail \
|
||||
https://repo1.maven.org/maven2/io/opentelemetry/opentelemetry-api/$VERSION/opentelemetry-api-$VERSION.jar
|
||||
do
|
||||
sleep 60
|
||||
done
|
||||
|
||||
- name: Update apidiff baseline
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.version }}
|
||||
PRIOR_VERSION: ${{ needs.release.outputs.prior-version }}
|
||||
run: |
|
||||
./gradlew japicmp -PapiBaseVersion=$PRIOR_VERSION -PapiNewVersion=$VERSION
|
||||
./gradlew --refresh-dependencies japicmp
|
||||
git add docs/apidiffs
|
||||
|
||||
- name: Update versions in README.md
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.version }}
|
||||
run: |
|
||||
./gradlew updateVersionInDocs -Prelease.version=$VERSION
|
||||
git add README.md
|
||||
|
||||
- name: Use CLA approved bot
|
||||
run: .github/scripts/use-cla-approved-github-bot.sh
|
||||
|
||||
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
|
||||
id: otelbot-token
|
||||
with:
|
||||
app-id: ${{ vars.OTELBOT_APP_ID }}
|
||||
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
|
||||
|
||||
- name: Create pull request against main
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.version }}
|
||||
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
|
||||
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
|
||||
run: |
|
||||
message="Update apidiff baseline and documentation versions to released version $VERSION"
|
||||
body="Update apidiff baseline and documentation versions to released version \`$VERSION\`."
|
||||
branch="otelbot/update-apidiff-baseline-and-documentation-to-released-version-${VERSION}"
|
||||
|
||||
git checkout -b $branch
|
||||
git commit -m "$message"
|
||||
git push --set-upstream origin $branch
|
||||
gh pr create --title "$message" \
|
||||
--body "$body" \
|
||||
--base main
|
|
@ -0,0 +1,24 @@
|
|||
name: Reusable - Markdown link check
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
markdown-link-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
|
||||
with:
|
||||
# excluding links to pull requests and issues is done for performance
|
||||
args: >
|
||||
--include-fragments
|
||||
--exclude "^https://github.com/open-telemetry/opentelemetry-java/(issues|pull)/\\d+$"
|
||||
--max-retries 6
|
||||
--retry-wait-time 10
|
||||
--max-concurrency 1
|
||||
.
|
|
@ -0,0 +1,21 @@
|
|||
name: Reusable - Misspell check
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
misspell-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Install misspell
|
||||
run: |
|
||||
curl -L -o install-misspell.sh https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh
|
||||
sh ./install-misspell.sh
|
||||
|
||||
- name: Run misspell
|
||||
run: bin/misspell -error .
|
|
@ -0,0 +1,24 @@
|
|||
name: Reusable - Open issue on workflow failure
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
open-issue:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write # for creating the issue
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Open issue
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh issue create --title "$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER failed" \
|
||||
--label Bug \
|
||||
--body "See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
|
|
@ -0,0 +1,44 @@
|
|||
# this is useful because notifications for scheduled workflows are only sent to the user who
|
||||
# initially created the given workflow
|
||||
name: Reusable - Workflow notification
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
success:
|
||||
type: boolean
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
workflow-notification:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Open issue or add comment if issue already open
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# TODO (trask) search doesn't support exact phrases, so it's possible that this could grab the wrong issue
|
||||
number=$(gh issue list --search "in:title Workflow failed: $GITHUB_WORKFLOW" --limit 1 --json number -q .[].number)
|
||||
|
||||
echo $number
|
||||
echo ${{ inputs.success }}
|
||||
|
||||
if [[ $number ]]; then
|
||||
if [[ "${{ inputs.success }}" == "true" ]]; then
|
||||
gh issue close $number
|
||||
else
|
||||
gh issue comment $number \
|
||||
--body "See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
|
||||
fi
|
||||
elif [[ "${{ inputs.success }}" == "false" ]]; then
|
||||
gh issue create --title "Workflow failed: $GITHUB_WORKFLOW (#$GITHUB_RUN_NUMBER)" \
|
||||
--body "See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
|
||||
fi
|
|
@ -1,6 +1,7 @@
|
|||
# Gradle
|
||||
build
|
||||
.gradle
|
||||
.kotlin
|
||||
local.properties
|
||||
out/
|
||||
|
||||
|
|
2725
CHANGELOG.md
2725
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
267
CONTRIBUTING.md
267
CONTRIBUTING.md
|
@ -3,12 +3,12 @@
|
|||
Welcome to OpenTelemetry Java repository!
|
||||
|
||||
Before you start - see OpenTelemetry general
|
||||
[contributing](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md)
|
||||
[contributing](https://github.com/open-telemetry/community/blob/main/guides/contributor/README.md)
|
||||
requirements and recommendations.
|
||||
|
||||
If you want to add new features or change behavior, please make sure your changes follow the
|
||||
[OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification).
|
||||
Otherwise file an issue or submit a PR to the specification repo first.
|
||||
Otherwise, file an issue or submit a pull request (PR) to the specification repo first.
|
||||
|
||||
Make sure to review the projects [license](LICENSE) and sign the
|
||||
[CNCF CLA](https://identity.linuxfoundation.org/projects/cncf). A signed CLA will be enforced by an
|
||||
|
@ -16,31 +16,30 @@ automatic check once you submit a PR, but you can also sign it after opening you
|
|||
|
||||
## Requirements
|
||||
|
||||
Java 11 or higher is required to build the projects in this repository. The built artifacts can be
|
||||
Java 17 or higher is required to build the projects in this repository. The built artifacts can be
|
||||
used on Java 8 or higher.
|
||||
|
||||
## Building opentelemetry-java
|
||||
|
||||
Continuous integration builds the project, runs the tests, and runs multiple
|
||||
types of static analysis.
|
||||
Continuous integration builds the project, runs the tests, and runs multiple types of static
|
||||
analysis.
|
||||
|
||||
1. Note: Currently, to run the full suite of tests, you'll need to be running a docker daemon.
|
||||
The tests that require docker are disabled if docker is not present. If you wish to run them,
|
||||
you must run a local docker daemon.
|
||||
1. Note: Currently, to run the full suite of tests, you'll need to be running a docker daemon. The
|
||||
tests that require docker are disabled if docker is not present. If you wish to run them, you
|
||||
must run a local docker daemon.
|
||||
|
||||
2. Clone the repository
|
||||
|
||||
`git clone https://github.com/open-telemetry/opentelemetry-java.git`
|
||||
`git clone https://github.com/open-telemetry/opentelemetry-java.git`
|
||||
|
||||
3. Run the following commands to build, run tests and most static analysis, and
|
||||
check formatting:
|
||||
3. Run the following commands to build, run tests and most static analysis, and check formatting:
|
||||
|
||||
`./gradlew build`
|
||||
`./gradlew build`
|
||||
|
||||
4. If you are a Windows user, use the alternate command mentioned below to run tests and
|
||||
check formatting:
|
||||
4. If you are a Windows user, use the alternate command mentioned below to run tests and check
|
||||
formatting:
|
||||
|
||||
`gradlew.bat`
|
||||
`gradlew.bat`
|
||||
|
||||
## Checks
|
||||
|
||||
|
@ -51,91 +50,156 @@ with the `check` task.
|
|||
$ ./gradlew check
|
||||
```
|
||||
|
||||
Note: this gradle task will potentially generate changes to files in the `docs/apidiffs/current_vs_latest`
|
||||
directory. Please make sure to include any changes to these files in your pull request.
|
||||
Note: this gradle task will potentially generate changes to files in
|
||||
the `docs/apidiffs/current_vs_latest`
|
||||
directory. Please make sure to include any changes to these files in your pull request (i.e.
|
||||
add those files to your commits in the PR).
|
||||
|
||||
## PR Review
|
||||
After you submit a PR, it will be reviewed by the project maintainers and approvers. Not all maintainers need to review a
|
||||
particular PR, but merging to the base branch is authorized to restricted members (administrators).
|
||||
|
||||
After you submit a PR, it will be reviewed by the project maintainers and approvers. Not all
|
||||
maintainers need to review a particular PR, but merging to the base branch is authorized to
|
||||
restricted members (administrators).
|
||||
|
||||
### Draft PRs
|
||||
|
||||
Draft PRs are welcome, especially when exploring new ideas or experimenting with a hypothesis.
|
||||
However, draft PRs may not receive the same degree of attention, feedback, or scrutiny unless
|
||||
requested directly. In order to help keep the PR backlog maintainable, drafts older than 6 months
|
||||
will be closed by the project maintainers. This should not be interpreted as a rejection. Closed
|
||||
PRs may be reopened by the author when time or interest allows.
|
||||
|
||||
## Project Scope
|
||||
|
||||
`opentelemetry-java` is one of several repositories which comprise the OpenTelemetry Java ecosystem,
|
||||
and contains the core components upon which instrumentation and extensions are built. In order to
|
||||
prevent sprawl and maintain a high level of quality, we limit this repository's scope to components
|
||||
which implement concepts defined in
|
||||
the [opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification),
|
||||
with a few exceptions / comments:
|
||||
|
||||
* The [API incubator](./api/incubator) and [SDK incubator](./sdk-extensions/incubator)
|
||||
contain prototypes which have been discussed in the specification
|
||||
or [oteps](https://github.com/open-telemetry/oteps) and have a reasonable chance of becoming part
|
||||
of the specification, subject to maintainers' discretion.
|
||||
* Components like the [Kotlin Extension](./extensions/kotlin) are included which are required for
|
||||
the API / SDK to function in key areas of the Java ecosystem. Inclusion is subject to maintainers'
|
||||
discretion.
|
||||
* As a general rule, components which implement semantic conventions belong elsewhere.
|
||||
|
||||
Other repositories in the OpenTelemetry Java ecosystem include:
|
||||
|
||||
* [opentelemetry-java-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation)
|
||||
contains instrumentation.
|
||||
* [opentelemetry-java-contrib](https://github.com/open-telemetry/opentelemetry-java-contrib)
|
||||
contains extensions, prototypes, and instrumentation, including vendor specific components.
|
||||
* [opentelemetry-java-examples](https://github.com/open-telemetry/opentelemetry-java-examples) contains
|
||||
working code snippets demonstrating various concepts.
|
||||
|
||||
## Style guideline
|
||||
|
||||
We follow the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).
|
||||
Our build will fail if source code is not formatted according to that style. To fix any
|
||||
style failures the above [checks](#checks) show, automatically apply the formatting with:
|
||||
We follow the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html). Our
|
||||
build will fail if source code is not formatted according to that style. To fix any style failures
|
||||
the above [checks](#checks) show, automatically apply the formatting with:
|
||||
|
||||
```bash
|
||||
$ ./gradlew spotlessApply
|
||||
```
|
||||
|
||||
To verify code style manually run the following command,
|
||||
which uses [google-java-format](https://github.com/google/google-java-format) library:
|
||||
To verify code style manually run the following command, which
|
||||
uses [google-java-format](https://github.com/google/google-java-format) library:
|
||||
|
||||
`./gradlew spotlessCheck`
|
||||
|
||||
### Best practices that we follow
|
||||
|
||||
* This project uses [semantic versioning](https://semver.org/). Except for major versions, a user should be able to update
|
||||
their dependency version on this project and have nothing break. This means we do not make breaking
|
||||
changes to the API (e.g., remove a public method) or to the ABI (e.g., change return type from void to non-void).
|
||||
* This project uses [semantic versioning](https://semver.org/). Except for major versions, a user
|
||||
should be able to update their dependency version on this project and have nothing break. This
|
||||
means we do not make breaking changes to the API (e.g., remove a public method) or to the ABI (
|
||||
e.g., change return type from void to non-void).
|
||||
* Avoid exposing publicly any class/method/variable that don't need to be public.
|
||||
* By default, all arguments/members are treated as non-null. Every argument/member that can be `null` must be annotated with `@Nullable`.
|
||||
* The project aims to provide a consistent experience across all the public APIs. It is important to ensure consistency (same look and feel) across different public packages.
|
||||
* Use `final` for public classes everywhere it is possible, this ensures that these classes cannot be extended when the API does not intend to offer that functionality.
|
||||
* By default, all arguments/members are treated as non-null. Every argument/member that can
|
||||
be `null` must be annotated with `@Nullable`.
|
||||
* The project aims to provide a consistent experience across all the public APIs. It is important to
|
||||
ensure consistency (same look and feel) across different public packages.
|
||||
* Use `final` for public classes everywhere it is possible, this ensures that these classes cannot
|
||||
be extended when the API does not intend to offer that functionality.
|
||||
* In general, we use the following ordering of class members:
|
||||
* Static fields (final before non-final)
|
||||
* Instance fields (final before non-final)
|
||||
* Constructors
|
||||
* In static utility classes (where all members are static), the private constructor
|
||||
(used to prevent construction) should be ordered after methods instead of before methods.
|
||||
* Methods
|
||||
* If methods call each other, it's nice if the calling method is ordered (somewhere) above
|
||||
the method that it calls. So, for one example, a private method would be ordered (somewhere) below
|
||||
the non-private methods that use it.
|
||||
* Nested classes
|
||||
* Adding `toString()` overrides on classes is encouraged, but we only use `toString()` to provide debugging assistance. The implementations
|
||||
of all `toString()` methods should be considered to be unstable unless explicitly documented otherwise.
|
||||
* Static fields (final before non-final)
|
||||
* Instance fields (final before non-final)
|
||||
* Constructors
|
||||
* In static utility classes (where all members are static), the private constructor
|
||||
(used to prevent construction) should be ordered after methods instead of before methods.
|
||||
* Methods
|
||||
* If methods call each other, it's nice if the calling method is ordered (somewhere) above the
|
||||
method that it calls. So, for one example, a private method would be ordered (somewhere) below
|
||||
the non-private methods that use it.
|
||||
* Nested classes
|
||||
* Adding `toString()` overrides on classes is encouraged, but we only use `toString()` to provide
|
||||
debugging assistance. The implementations of all `toString()` methods should be considered to be
|
||||
unstable unless explicitly documented otherwise.
|
||||
* Avoid synchronizing using a class's intrinsic lock. Instead, synchronize on a dedicated lock object. E.g:
|
||||
```java
|
||||
private final Object lock = new Object();
|
||||
|
||||
If you notice any practice being applied in the project consistently that isn't listed here, please consider a pull request to add it.
|
||||
public void doSomething() {
|
||||
synchronized (lock) { ... }
|
||||
}
|
||||
```
|
||||
* Don't
|
||||
use [gradle test fixtures](https://docs.gradle.org/current/userguide/java_testing.html#sec:java_test_fixtures) (
|
||||
i.e. `java-test-fixtures` plugin) to reuse code for internal testing. The test fixtures plugin has
|
||||
side effects where test dependencies are added to the `pom.xml` and publishes an
|
||||
extra `*-test-fixtures.jar` artifact which is unnecessary for internal testing. Instead, create a
|
||||
new `*:testing-internal` module and omit the `otel.java-conventions`. For example,
|
||||
see [/exporters/otlp/testing-internal](./exporters/otlp/testing-internal).
|
||||
|
||||
If you notice any practice being applied in the project consistently that isn't listed here, please
|
||||
consider a pull request to add it.
|
||||
|
||||
### Pre-commit hook
|
||||
To completely delegate code style formatting to the machine,
|
||||
you can add [git pre-commit hook](https://git-scm.com/docs/githooks).
|
||||
We provide an example script in `buildscripts/pre-commit` file.
|
||||
Just copy or symlink it into `.git/hooks` folder.
|
||||
|
||||
To completely delegate code style formatting to the machine, you can
|
||||
add [git pre-commit hook](https://git-scm.com/docs/githooks). We provide an example script
|
||||
in `buildscripts/pre-commit` file. Just copy or symlink it into `.git/hooks` folder.
|
||||
|
||||
### Editorconfig
|
||||
As additional convenience for IntelliJ Idea users, we provide `.editorconfig` file.
|
||||
Idea will automatically use it to adjust its code formatting settings.
|
||||
It does not support all required rules, so you still have to run `spotlessApply` from time to time.
|
||||
|
||||
As additional convenience for IntelliJ Idea users, we provide `.editorconfig` file. Idea will
|
||||
automatically use it to adjust its code formatting settings. It does not support all required rules,
|
||||
so you still have to run `spotlessApply` from time to time.
|
||||
|
||||
### Javadoc
|
||||
|
||||
* All public classes and their public and protected methods MUST have javadoc.
|
||||
It MUST be complete (all params documented etc.) Everything else
|
||||
(package-protected classes, private) MAY have javadoc, at the code writer's
|
||||
whim. It does not have to be complete, and reviewers are not allowed to
|
||||
require or disallow it.
|
||||
* Each API element should have a `@since` tag specifying the minor version when
|
||||
it was released (or the next minor version).
|
||||
* All public classes and their public and protected methods MUST have javadoc. It MUST be complete (
|
||||
all params documented etc.) Everything else
|
||||
(package-protected classes, private) MAY have javadoc, at the code writer's whim. It does not have
|
||||
to be complete, and reviewers are not allowed to require or disallow it.
|
||||
* Each API element should have a `@since` tag specifying the minor version when it was released (or
|
||||
the next minor version).
|
||||
* There MUST be NO javadoc errors.
|
||||
* See [section
|
||||
7.3.1](https://google.github.io/styleguide/javaguide.html#s7.3.1-javadoc-exception-self-explanatory)
|
||||
in the guide for exceptions to the Javadoc requirement.
|
||||
* Reviewers may request documentation for any element that doesn't require
|
||||
Javadoc, though the style of documentation is up to the author.
|
||||
* Try to do the least amount of change when modifying existing documentation.
|
||||
Don't change the style unless you have a good reason.
|
||||
|
||||
See [section 7.3.1](https://google.github.io/styleguide/javaguide.html#s7.3.1-javadoc-exception-self-explanatory)
|
||||
in the guide for exceptions to the Javadoc requirement.
|
||||
|
||||
* Reviewers may request documentation for any element that doesn't require Javadoc, though the style
|
||||
of documentation is up to the author.
|
||||
* Try to do the least amount of change when modifying existing documentation. Don't change the style
|
||||
unless you have a good reason.
|
||||
* We do not use `@author` tags in our javadoc.
|
||||
* Our javadoc is available via [javadoc.io}(https://javadoc.io/doc/io.opentelemetry/opentelemetry-api)
|
||||
* Our javadoc is available via [
|
||||
javadoc.io}(https://javadoc.io/doc/io.opentelemetry/opentelemetry-api)
|
||||
|
||||
### SDK Configuration Documentation
|
||||
|
||||
All changes to the SDK configuration options or autoconfigure module should be documented on
|
||||
[opentelemetry.io](https://opentelemetry.io/docs/languages/java/configuration/).
|
||||
|
||||
### AutoValue
|
||||
|
||||
* Use [AutoValue](https://github.com/google/auto/tree/master/value), when
|
||||
possible, for any new value classes. Remember to add package-private
|
||||
constructors to all AutoValue classes to prevent classes in other packages
|
||||
from extending them.
|
||||
|
||||
* Use [AutoValue](https://github.com/google/auto/tree/master/value), when possible, for any new
|
||||
value classes. Remember to add package-private constructors to all AutoValue classes to prevent
|
||||
classes in other packages from extending them.
|
||||
|
||||
### Unit Tests
|
||||
|
||||
|
@ -145,35 +209,31 @@ It does not support all required rules, so you still have to run `spotlessApply`
|
|||
|
||||
### Updating the Snapshot build number
|
||||
|
||||
The overall version number for opentelemetry-java is determined from git tags, and not fixed in any file.
|
||||
The overall version number for opentelemetry-java is determined from git tags, and not fixed in any
|
||||
file.
|
||||
|
||||
This means it will not update, even if you `git pull` from the repo tip. It will still produce a set of libraries with the old version number.
|
||||
This means it will not update, even if you `git pull` from the repo tip. It will still produce a set
|
||||
of libraries with the old version number.
|
||||
|
||||
To update it, you must fetch the tags, via `git fetch --all --tags` - which should work, even if you have forked the repo, as long as the trunk repo is set as an upstream remote.
|
||||
|
||||
### Updating OTLP proto dependency version
|
||||
|
||||
The OTLP proto dependency version is defined [here](proto/build.gradle). To bump the version,
|
||||
|
||||
1. Find the latest release version [here](https://github.com/open-telemetry/opentelemetry-proto/releases/latest)
|
||||
2. Download the zip source code archive
|
||||
3. Run `shasum -a 256 ~/path/to/downloaded.zip` to compute its checksum
|
||||
4. Update `protoVersion` and `protoChecksum` in the build file with the new version and checksum
|
||||
To update it, you must fetch the tags, via `git fetch --all --tags` - which should work, even if you
|
||||
have forked the repo, as long as the trunk repo is set as an upstream remote.
|
||||
|
||||
### Composing builds
|
||||
|
||||
Beware that this section is only meant for developers of opentelemetry-java, or closely related projects.
|
||||
The steps described here could change at any time and what you do for one version (commit) may break
|
||||
with the next one already.
|
||||
Beware that this section is only meant for developers of opentelemetry-java, or closely related
|
||||
projects. The steps described here could change at any time and what you do for one version (commit)
|
||||
may break with the next one already.
|
||||
|
||||
Gradle provides a feature called ["composite builds"](https://docs.gradle.org/current/userguide/composite_builds.html)
|
||||
Gradle provides a feature
|
||||
called ["composite builds"](https://docs.gradle.org/current/userguide/composite_builds.html)
|
||||
that allows to replace some normally externally provided dependencies with a project that is built
|
||||
(included) in the same Gradle invocation. This can be useful to quickly test a new feature or bug fix you are
|
||||
developing in opentelemetry-java with the examples or the app or instrumentation library where you
|
||||
need the feature or run into the bug. Unfortunately, opentelemetry-java does not work out of the box
|
||||
with this feature because Gradle is unable to map the project names to the customized artifact
|
||||
coordinates (see e.g. [gradle/gradle#18291](https://github.com/gradle/gradle/issues/18291)
|
||||
and related issues. However, gradle supports manually declaring the mapping between ("substitution of")
|
||||
(included) in the same Gradle invocation. This can be useful to quickly test a new feature or bug
|
||||
fix you are developing in opentelemetry-java with the examples or the app or instrumentation library
|
||||
where you need the feature or run into the bug. Unfortunately, opentelemetry-java does not work out
|
||||
of the box with this feature because Gradle is unable to map the project names to the customized
|
||||
artifact coordinates (see e.g. [gradle/gradle#18291](https://github.com/gradle/gradle/issues/18291)
|
||||
and related issues. However, gradle supports manually declaring the mapping between ("substitution
|
||||
of")
|
||||
artifact coordinates and project names. To ease this tedious task, opentelemetry-java provides a
|
||||
gradle task `:generateBuildSubstitutions` that generates a code snippet with these substitutions in
|
||||
kts (Kotlin Script) format.
|
||||
|
@ -197,9 +257,26 @@ Example usage could be as follows:
|
|||
}
|
||||
```
|
||||
|
||||
Please confirm whether the local opentelemetry-java version is consistent with the
|
||||
opentelemetry-java version declared in the project that relies on opentelemetry-java.
|
||||
If it is inconsistent, `dependencySubstitution` may not take effect.
|
||||
|
||||
See [the Gradle documentation](https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions)
|
||||
for more information.
|
||||
4. If you now build your project, it will use the included build to supply the opentelemetry-java
|
||||
artifacts, ignoring any version declarations. Use the prefix `:DIRECTORY:` to refer to
|
||||
tasks/projects within the included build, where DIRECTORY is the name of the directory in the
|
||||
included build (only the part after the last `/`).
|
||||
5. Here are some issues and solutions ([discussions/6551](https://github.com/open-telemetry/opentelemetry-java/discussions/6551))
|
||||
you may encounter that may be helpful to you.
|
||||
|
||||
4. If you now build your project, it will use the included build to supply the opentelemetry-java artifacts,
|
||||
ignoring any version declarations. Use the prefix `:DIRECTORY:` to refer to tasks/projects within
|
||||
the included build, where DIRECTORY is the name of the directory in the included build (only the part after the last `/`).
|
||||
### Updating the OTLP protobufs
|
||||
|
||||
OTLP protobuf Java bindings are published via
|
||||
the [opentelemetry-proto-java](https://github.com/open-telemetry/opentelemetry-proto-java)
|
||||
repository. This project does not use the java bindings, but does use the `.proto` files that are
|
||||
published in the binding jar by that project.
|
||||
|
||||
To update the OTLP protobuf version,
|
||||
first [release a new version of the java bindings](https://github.com/open-telemetry/opentelemetry-proto-java/blob/main/RELEASING.md)
|
||||
then simply update the dependency version that this project has on that jar.
|
||||
|
|
494
README.md
494
README.md
|
@ -1,247 +1,307 @@
|
|||
# OpenTelemetry for Java
|
||||
[![Continuous Build][ci-image]][ci-url]
|
||||
[![Coverage Status][codecov-image]][codecov-url]
|
||||
# OpenTelemetry Java
|
||||
|
||||
[![Maven Central][maven-image]][maven-url]
|
||||
[![Coverage Status][codecov-image]][codecov-url]
|
||||
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-java?ref=badge_shield&issueType=license)
|
||||
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-java?ref=badge_shield&issueType=security)
|
||||
[](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-java)
|
||||
[](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/io/opentelemetry/java/README.md)
|
||||
|
||||
## Getting Started
|
||||
`opentelemetry-java` is the home of the Java implementation of the OpenTelemetry API for recording
|
||||
telemetry, and SDK for managing telemetry recorded by the API.
|
||||
|
||||
If you are looking for an all-in-one, easy-to-install **auto-instrumentation
|
||||
javaagent**, see [opentelemetry-java-instrumentation][].
|
||||
See [opentelemetry.io Java Documentation](https://opentelemetry.io/docs/languages/java/intro/) for:
|
||||
|
||||
If you are looking for **examples** on how to use the OpenTelemetry API to
|
||||
write your own **manual instrumentation**, or how to set up the OpenTelemetry
|
||||
Java SDK, see [Manual instrumentation][]. Fully-functional examples
|
||||
are available from the [examples](examples) directory.
|
||||
* An overview of the OpenTelemetry Java ecosystem and key repositories
|
||||
* Detailed documentation on the components published from this repository
|
||||
* Review of instrumentation ecosystem, including OpenTelemetry Java agent
|
||||
* End-to-end working code examples
|
||||
* And more
|
||||
|
||||
For a general overview of OpenTelemetry, visit [opentelemetry.io][].
|
||||
> [!IMPORTANT]
|
||||
> We are currently seeking additional contributors! See [help wanted](#help-wanted) for details.
|
||||
|
||||
Would you like to get involved with the project? Read our [contributing guide](CONTRIBUTING.md). We welcome
|
||||
contributions!
|
||||
## Requirements
|
||||
|
||||
Unless otherwise noted, all published artifacts support Java 8 or higher.
|
||||
See [language version compatibility](VERSIONING.md#language-version-compatibility) for complete
|
||||
details.
|
||||
|
||||
**Android Disclaimer:** For compatibility
|
||||
reasons, [library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring)
|
||||
must be enabled.
|
||||
|
||||
See [contributing](#contributing) for details on building this project locally.
|
||||
|
||||
## Releases
|
||||
|
||||
Releases are published to maven central. We
|
||||
publish [minor releases monthly](RELEASING.md#release-cadence)
|
||||
and [patch releases as needed](RELEASING.md#preparing-a-new-patch-release).
|
||||
|
||||
See [releases](https://github.com/open-telemetry/opentelemetry-java/releases) for a listing of
|
||||
released versions and notes (see also [changelog](CHANGELOG.md)).
|
||||
|
||||
## Artifacts
|
||||
|
||||
The artifacts published by this repository are summarized below in tables, organized in collapsible
|
||||
sections by topic.
|
||||
|
||||
As discussed in [compatibility](#compatibility), artifact versions must be kept in sync, for which
|
||||
we strongly recommend [using one of our BOMs][dependencies-and-boms].
|
||||
|
||||
<details>
|
||||
<summary>Bill of Materials (BOMs)</summary>
|
||||
|
||||
A bill of materials (or BOM) helps sync dependency versions of related artifacts.
|
||||
|
||||
| Component | Description | Artifact ID | Version | Javadoc |
|
||||
|----------------------------------------------|----------------------------------------|---------------------------|-------------------------------------------------------------|---------|
|
||||
| [Bill of Materials (BOM)](./bom) | Bill of materials for stable artifacts | `opentelemetry-bom` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | N/A |
|
||||
| [Alpha Bill of Materials (BOM)](./bom-alpha) | Bill of materials for alpha artifacts | `opentelemetry-bom-alpha` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | N/A |
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>API</summary>
|
||||
|
||||
The OpenTelemetry API for recording telemetry.
|
||||
|
||||
| Component | Description | Artifact ID | Version | Javadoc |
|
||||
|-----------------------------------|--------------------------------------------------------------------------------------|-------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [API](./api/all) | OpenTelemetry API, including metrics, traces, baggage, context | `opentelemetry-api` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api) |
|
||||
| [API Incubator](./api/incubator) | API incubator, including pass through propagator, and extended tracer, and Event API | `opentelemetry-api-incubator` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api-incubator) |
|
||||
| [Context API](./context) | OpenTelemetry context API | `opentelemetry-context` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-context) |
|
||||
| [Common](./common) | Common utility methods used across API components | `opentelemetry-common` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-common) |
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>API Extensions</summary>
|
||||
|
||||
Extensions to the OpenTelemetry API.
|
||||
|
||||
| Component | Description | Artifact ID | Version | Javadoc |
|
||||
|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Kotlin Extension](./extensions/kotlin) | Context extension for coroutines | `opentelemetry-extension-kotlin` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-extension-kotlin) |
|
||||
| [Trace Propagators Extension](./extensions/trace-propagators) | Trace propagators, including B3, Jaeger, OT Trace | `opentelemetry-extension-trace-propagators` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-extension-trace-propagators) |
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>SDK</summary>
|
||||
|
||||
The OpenTelemetry SDK for managing telemetry producing by the API.
|
||||
|
||||
| Component | Description | Artifact ID | Version | Javadoc |
|
||||
|------------------------------|--------------------------------------------------------|-----------------------------|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [SDK](./sdk/all) | OpenTelemetry SDK, including metrics, traces, and logs | `opentelemetry-sdk` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk) |
|
||||
| [Metrics SDK](./sdk/metrics) | OpenTelemetry metrics SDK | `opentelemetry-sdk-metrics` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-metrics) |
|
||||
| [Trace SDK](./sdk/trace) | OpenTelemetry trace SDK | `opentelemetry-sdk-trace` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-trace) |
|
||||
| [Log SDK](./sdk/logs) | OpenTelemetry log SDK | `opentelemetry-sdk-logs` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-logs) |
|
||||
| [SDK Common](./sdk/common) | Shared SDK components | `opentelemetry-sdk-common` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-common) |
|
||||
| [SDK Testing](./sdk/testing) | Components for testing OpenTelemetry instrumentation | `opentelemetry-sdk-testing` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-testing) |
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>SDK Exporters</summary>
|
||||
|
||||
SDK exporters for shipping traces, metrics, and logs out of process.
|
||||
|
||||
| Component | Description | Artifact ID | Version | Javadoc |
|
||||
|-----------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [OTLP Exporters](./exporters/otlp/all) | OTLP gRPC & HTTP exporters, including traces, metrics, and logs | `opentelemetry-exporter-otlp` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp) |
|
||||
| [OTLP Logging Exporters](./exporters/logging-otlp) | Logging exporters in OTLP JSON encoding, including traces, metrics, and logs | `opentelemetry-exporter-logging-otlp` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging-otlp) |
|
||||
| [OTLP Common](./exporters/otlp/common) | Shared OTLP components (internal) | `opentelemetry-exporter-otlp-common` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-otlp-common) |
|
||||
| [Logging Exporter](./exporters/logging) | Logging exporters, including metrics, traces, and logs | `opentelemetry-exporter-logging` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-logging) |
|
||||
| [Zipkin Exporter](./exporters/zipkin) | Zipkin trace exporter | `opentelemetry-exporter-zipkin` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-zipkin) |
|
||||
| [Prometheus Exporter](./exporters/prometheus) | Prometheus metric exporter | `opentelemetry-exporter-prometheus` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-prometheus) |
|
||||
| [Exporter Common](./exporters/common) | Shared exporter components (internal) | `opentelemetry-exporter-common` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-common) |
|
||||
| [OkHttp Sender](./exporters/sender/okhttp) | OkHttp implementation of HttpSender (internal) | `opentelemetry-exporter-sender-okhttp` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-okhttp) |
|
||||
| [JDK Sender](./exporters/sender/jdk) | Java 11+ native HttpClient implementation of HttpSender (internal) | `opentelemetry-exporter-sender-jdk` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-jdk) | |
|
||||
| [gRPC ManagedChannel Sender](./exporters/sender/grpc-managed-channel) | gRPC ManagedChannel implementation of GrpcSender (internal) | `opentelemetry-exporter-sender-grpc-managed-channel` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-exporter-sender-grpc-managed-channel) | |
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>SDK Extensions</summary>
|
||||
|
||||
Extensions to the OpenTelemetry SDK.
|
||||
|
||||
| Component | Description | Artifact ID | Version | Javadoc |
|
||||
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [SDK Autoconfigure](./sdk-extensions/autoconfigure) | Autoconfigure OpenTelemetry SDK from env vars, system properties, and SPI | `opentelemetry-sdk-extension-autoconfigure` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure) |
|
||||
| [SDK Autoconfigure SPI](./sdk-extensions/autoconfigure-spi) | Service Provider Interface (SPI) definitions for autoconfigure | `opentelemetry-sdk-extension-autoconfigure-spi` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi) |
|
||||
| [SDK Jaeger Remote Sampler Extension](./sdk-extensions/jaeger-remote-sampler) | Sampler which obtains sampling configuration from remote Jaeger server | `opentelemetry-sdk-extension-jaeger-remote-sampler` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-jaeger-remote-sampler) |
|
||||
| [SDK Incubator](./sdk-extensions/incubator) | SDK incubator, including YAML based view configuration, LeakDetectingSpanProcessor | `opentelemetry-sdk-extension-incubator` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-incubator) |
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Shims</summary>
|
||||
|
||||
Shims for bridging data from one observability library to another.
|
||||
|
||||
| Component | Description | Artifact ID | Version | Javadoc |
|
||||
|----------------------------------------|--------------------------------------------------------------|----------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [OpenCensus Shim](./opencensus-shim) | Bridge opencensus metrics into the OpenTelemetry metrics SDK | `opentelemetry-opencensus-shim` | <!--VERSION_UNSTABLE-->1.52.0-alpha<!--/VERSION_UNSTABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-opencensus-shim) |
|
||||
| [OpenTracing Shim](./opentracing-shim) | Bridge opentracing spans into the OpenTelemetry trace API | `opentelemetry-opentracing-shim` | <!--VERSION_STABLE-->1.52.0<!--/VERSION_STABLE--> | [](https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-opentracing-shim) |
|
||||
</details>
|
||||
|
||||
## Dependencies
|
||||
|
||||
To take a dependency, [include a BOM][dependencies-and-boms] and specify the dependency as follows,
|
||||
replacing `{{artifact-id}}` with the value from the "Artifact ID" column
|
||||
from [artifacts](#artifacts):
|
||||
|
||||
<details open>
|
||||
<summary>Gradle</summary>
|
||||
|
||||
```groovy
|
||||
implementation('io.opentelemetry:{{artifact-id}}')
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Maven</summary>
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry</groupId>
|
||||
<artifactId>{{artifact-id}}</artifactId>
|
||||
</dependency>
|
||||
```
|
||||
</details>
|
||||
|
||||
### Snapshots
|
||||
|
||||
Snapshots of the `main` branch are available as follows:
|
||||
|
||||
<details open>
|
||||
<summary>Gradle</summary>
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation platform("io.opentelemetry:opentelemetry-bom:1.53.0-SNAPSHOT")
|
||||
implementation('io.opentelemetry:opentelemetry-api')
|
||||
}
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Maven</summary>
|
||||
|
||||
```xml
|
||||
<project>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>sonatype-snapshot-repository</id>
|
||||
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry</groupId>
|
||||
<artifactId>opentelemetry-bom</artifactId>
|
||||
<version>1.53.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry</groupId>
|
||||
<artifactId>opentelemetry-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
```
|
||||
</details>
|
||||
|
||||
## Compatibility
|
||||
|
||||
Artifacts from this repository follow semantic versioning.
|
||||
|
||||
Stable artifacts (i.e. artifacts without `-alpha` version suffix) come with strong backwards
|
||||
compatibility guarantees for public APIs.
|
||||
|
||||
Artifacts may depend on other artifacts from this repository, and may depend on internal APIs (i.e.
|
||||
non-public APIs) which are subject to change across minor versions. Therefore, it's critical to keep
|
||||
artifact versions in sync in order to avoid possible runtime exceptions. We strongly
|
||||
recommend [using one of our BOMs][dependencies-and-boms] to assist in keeping artifacts in sync.
|
||||
|
||||
See the [VERSIONING.md](VERSIONING.md) for complete details on compatibility policy.
|
||||
|
||||
## Contacting us
|
||||
|
||||
We hold regular meetings. See details at [community page](https://github.com/open-telemetry/community#java-sdk).
|
||||
|
||||
To report a bug, or request a new feature,
|
||||
please [open an issue](https://github.com/open-telemetry/opentelemetry-java/issues/new/choose).
|
||||
|
||||
We use [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-java/discussions)
|
||||
for support or general questions. Feel free to drop us a line.
|
||||
|
||||
We are also present in the `#otel-java` channel in the [CNCF slack](https://slack.cncf.io/).
|
||||
We are also present in the [`#otel-java`](https://cloud-native.slack.com/archives/C014L2KCTE3) channel in the [CNCF slack](https://slack.cncf.io/).
|
||||
Please join us for more informal discussions.
|
||||
|
||||
## Overview
|
||||
|
||||
OpenTelemetry is the merging of OpenCensus and OpenTracing into a single project.
|
||||
|
||||
This project contains the following top level components:
|
||||
|
||||
* [OpenTelemetry API](api/):
|
||||
* [stable apis](api/all/src/main/java/io/opentelemetry/api/) including `Tracer`, `Span`, `SpanContext`, `Meter`, and `Baggage`
|
||||
* [semantic conventions](semconv/) Generated code for the OpenTelemetry semantic conventions.
|
||||
* [context api](context/src/main/java/io/opentelemetry/context/) The OpenTelemetry Context implementation.
|
||||
* [extensions](extensions/) define additional API extensions, which are not part of the core API.
|
||||
* [sdk](sdk/) defines the implementation of the OpenTelemetry API.
|
||||
* [sdk-extensions](sdk-extensions/) defines additional SDK extensions, which are not part of the core SDK.
|
||||
* [OpenTracing shim](opentracing-shim/) defines a bridge layer from OpenTracing to the OpenTelemetry API.
|
||||
* [OpenCensus shim](opencensus-shim/) defines a bridge layer from OpenCensus to the OpenTelemetry API.
|
||||
* [examples](examples/) on how to use the APIs, SDK, and standard exporters.
|
||||
|
||||
This project publishes a lot of artifacts. The easiest way to see the most recent stable artifacts is to use the
|
||||
[`opentelemetry-bom`](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-bom). Unstable artifacts are referenced by
|
||||
the [`opentelemetry-alpha-bom`](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-bom-alpha).
|
||||
|
||||
We would love to hear from the larger community: please provide feedback proactively.
|
||||
|
||||
## Requirements
|
||||
|
||||
Unless otherwise noted, all published artifacts support Java 8 or higher. See [CONTRIBUTING.md](./CONTRIBUTING.md)
|
||||
for additional instructions for building this project for development.
|
||||
|
||||
### Note about extensions
|
||||
|
||||
Both API and SDK extensions consist of various additional components which are excluded from the core artifacts
|
||||
to keep them from growing too large.
|
||||
|
||||
We still aim to provide the same level of quality and guarantee for them as for the core components.
|
||||
Please don't hesitate to use them if you find them useful.
|
||||
|
||||
## Project setup and contributing
|
||||
|
||||
Please refer to the [contribution guide](CONTRIBUTING.md) on how to set up for development and contribute!
|
||||
|
||||
## Published Releases
|
||||
|
||||
Published releases are available on maven central. We strongly recommend using our published BOM to keep all
|
||||
dependency versions in sync.
|
||||
|
||||
### Maven
|
||||
|
||||
```xml
|
||||
<project>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry</groupId>
|
||||
<artifactId>opentelemetry-bom</artifactId>
|
||||
<version>1.9.1</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry</groupId>
|
||||
<artifactId>opentelemetry-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
```
|
||||
|
||||
### Gradle
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation platform("io.opentelemetry:opentelemetry-bom:1.9.1")
|
||||
implementation('io.opentelemetry:opentelemetry-api')
|
||||
}
|
||||
```
|
||||
|
||||
Note that if you want to use any artifacts that have not fully stabilized yet (such as metrics), then you will need to add an entry for the Alpha BOM as well, e.g.
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation platform("io.opentelemetry:opentelemetry-bom:1.9.1")
|
||||
implementation platform('io.opentelemetry:opentelemetry-bom-alpha:1.9.1-alpha')
|
||||
|
||||
implementation('io.opentelemetry:opentelemetry-api')
|
||||
implementation('io.opentelemetry:opentelemetry-api-metrics')
|
||||
}
|
||||
```
|
||||
|
||||
## Snapshots
|
||||
|
||||
Snapshots based out the `main` branch are available for `opentelemetry-api`, `opentelemetry-sdk` and the rest of the artifacts.
|
||||
We strongly recommend using our published BOM to keep all dependency versions in sync.
|
||||
|
||||
### Maven
|
||||
|
||||
```xml
|
||||
<project>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>oss.sonatype.org-snapshot</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry</groupId>
|
||||
<artifactId>opentelemetry-bom</artifactId>
|
||||
<version>1.10.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry</groupId>
|
||||
<artifactId>opentelemetry-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
```
|
||||
|
||||
### Gradle
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation platform("io.opentelemetry:opentelemetry-bom:1.10.0-SNAPSHOT")
|
||||
implementation('io.opentelemetry:opentelemetry-api')
|
||||
}
|
||||
```
|
||||
|
||||
Libraries will usually only need `opentelemetry-api`, while applications
|
||||
will want to use the `opentelemetry-sdk` module which contains our standard implementation
|
||||
of the APIs.
|
||||
|
||||
## Gradle composite builds
|
||||
|
||||
For opentelemetry-java developers that need to test the latest source code with another
|
||||
project, composite builds can be used as an alternative to `publishToMavenLocal`. This
|
||||
requires some setup which is explained [here](CONTRIBUTING.md#composing-builds).
|
||||
|
||||
## Releases
|
||||
|
||||
See the [VERSIONING.md](VERSIONING.md) document for our policies for releases and compatibility
|
||||
guarantees.
|
||||
|
||||
Check out information about the [latest release](https://github.com/open-telemetry/opentelemetry-java/releases).
|
||||
|
||||
This is a **current** feature status list:
|
||||
|
||||
| Component | Version |
|
||||
| --------------------------- | ------- |
|
||||
| Trace API | v<!--VERSION_STABLE-->1.9.1<!--/VERSION_STABLE--> |
|
||||
| Trace SDK | v<!--VERSION_STABLE-->1.9.1<!--/VERSION_STABLE--> |
|
||||
| Context | v<!--VERSION_STABLE-->1.9.1<!--/VERSION_STABLE--> |
|
||||
| Baggage | v<!--VERSION_STABLE-->1.9.1<!--/VERSION_STABLE--> |
|
||||
| Jaeger Trace Exporter | v<!--VERSION_STABLE-->1.9.1<!--/VERSION_STABLE--> |
|
||||
| Zipkin Trace Exporter | v<!--VERSION_STABLE-->1.9.1<!--/VERSION_STABLE--> |
|
||||
| OTLP Exporter (Spans) | v<!--VERSION_STABLE-->1.9.1<!--/VERSION_STABLE--> |
|
||||
| OTLP Exporter (Metrics) | v<!--VERSION_UNSTABLE-->1.9.1-alpha<!--/VERSION_UNSTABLE--> |
|
||||
| Metrics API | v<!--VERSION_UNSTABLE-->1.9.1-alpha<!--/VERSION_UNSTABLE--> |
|
||||
| Metrics SDK | v<!--VERSION_UNSTABLE-->1.9.1-alpha<!--/VERSION_UNSTABLE--> |
|
||||
| Logs SDK | v<!--VERSION_UNSTABLE-->1.9.1-alpha<!--/VERSION_UNSTABLE--> |
|
||||
| Prometheus Metrics Exporter | v<!--VERSION_UNSTABLE-->1.9.1-alpha<!--/VERSION_UNSTABLE--> |
|
||||
| OpenTracing Bridge | v<!--VERSION_UNSTABLE-->1.9.1-alpha<!--/VERSION_UNSTABLE--> |
|
||||
| OpenCensus Bridge | v<!--VERSION_UNSTABLE-->1.9.1-alpha<!--/VERSION_UNSTABLE--> |
|
||||
|
||||
See the project [milestones](https://github.com/open-telemetry/opentelemetry-java/milestones)
|
||||
for details on upcoming releases. The dates and features described in issues
|
||||
and milestones are estimates, and subject to change.
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md) for:
|
||||
|
||||
Approvers ([@open-telemetry/java-approvers](https://github.com/orgs/open-telemetry/teams/java-approvers)):
|
||||
* Details on building locally
|
||||
* Project scope
|
||||
* Keys to successful PRs
|
||||
* Guide to using gradle composite builds
|
||||
|
||||
### Maintainers
|
||||
|
||||
- [Armin Ruech](https://github.com/arminru), Dynatrace
|
||||
- [Pavol Loffay](https://github.com/pavolloffay), Traceable.ai
|
||||
- [Tyler Benson](https://github.com/tylerbenson), DataDog
|
||||
- [Giovanni Liva](https://github.com/thisthat), Dynatrace
|
||||
- [Christian Neumüller](https://github.com/Oberon00), Dynatrace
|
||||
- [Carlos Alberto](https://github.com/carlosalberto), LightStep
|
||||
- [Jakub Wach](https://github.com/kubawach), Splunk
|
||||
- [Jack Berg](https://github.com/jack-berg), New Relic
|
||||
- [John Watson](https://github.com/jkwatson), Verta.ai
|
||||
|
||||
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
|
||||
|
||||
### Approvers
|
||||
|
||||
- [Jason Plumb](https://github.com/breedx-splk), Splunk
|
||||
- [Josh Suereth](https://github.com/jsuereth), Google
|
||||
- [Lauri Tulmin](https://github.com/laurit), Splunk
|
||||
- [Trask Stalnaker](https://github.com/trask), Microsoft
|
||||
|
||||
*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver).*
|
||||
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
|
||||
|
||||
Maintainers ([@open-telemetry/java-maintainers](https://github.com/orgs/open-telemetry/teams/java-maintainers)):
|
||||
### Triagers
|
||||
|
||||
- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk
|
||||
- [John Watson](https://github.com/jkwatson), Splunk
|
||||
- [Anuraag Agrawal](https://github.com/anuraaga), AWS
|
||||
- [Gregor Zeitlinger](https://github.com/zeitlinger), Grafana Labs
|
||||
|
||||
*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*
|
||||
For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
|
||||
|
||||
### Thanks to all the people who have contributed
|
||||
### Emeritus
|
||||
|
||||
[](https://github.com/open-telemetry/opentelemetry-java/graphs/contributors)
|
||||
- Maintainer [Bogdan Drutu](https://github.com/BogdanDrutu)
|
||||
- Maintainer [Carlos Alberto](https://github.com/carlosalberto)
|
||||
- Approver [Mateusz Rzeszutek](https://github.com/mateuszrzeszutek)
|
||||
|
||||
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).
|
||||
|
||||
### Help wanted
|
||||
|
||||
We are currently resource constrained and are actively seeking new contributors interested in working towards [approver](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver) / [maintainer](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer) roles. In addition to the documentation for approver / maintainer roles and the [contributing](./CONTRIBUTING.md) guide, here are some additional notes on engaging:
|
||||
|
||||
- [Pull request](https://github.com/open-telemetry/opentelemetry-java/pulls) reviews are equally or more helpful than code contributions. Comments and approvals are valuable with or without a formal project role. They're also a great forcing function to explore a fairly complex codebase.
|
||||
- Attending the [Java: SDK + Automatic Instrumentation](https://github.com/open-telemetry/community?tab=readme-ov-file#implementation-sigs) Special Interest Group (SIG) is a great way to get to know community members and learn about project priorities.
|
||||
- Issues labeled [help wanted](https://github.com/open-telemetry/opentelemetry-java/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) are project priorities. Code contributions (or pull request reviews when a PR is linked) for these issues are particularly important.
|
||||
- Triaging / responding to new issues and discussions is a great way to engage with the project.
|
||||
|
||||
### Thanks to all of our contributors!
|
||||
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-java/graphs/contributors">
|
||||
<img alt="Repo contributors" src="https://contrib.rocks/image?repo=open-telemetry/opentelemetry-java" />
|
||||
</a>
|
||||
|
||||
[ci-image]: https://github.com/open-telemetry/opentelemetry-java/workflows/Continuous%20Build/badge.svg
|
||||
[ci-url]: https://github.com/open-telemetry/opentelemetry-java/actions?query=workflow%3Aci+branch%3Amain
|
||||
[codecov-image]: https://codecov.io/gh/open-telemetry/opentelemetry-java/branch/main/graph/badge.svg
|
||||
[codecov-url]: https://codecov.io/gh/open-telemetry/opentelemetry-java/branch/main/
|
||||
[Manual instrumentation]: https://opentelemetry.io/docs/java/manual_instrumentation/
|
||||
[maven-image]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry/opentelemetry-api/badge.svg
|
||||
[maven-url]: https://maven-badges.herokuapp.com/maven-central/io.opentelemetry/opentelemetry-api
|
||||
[opentelemetry-java-instrumentation]: https://github.com/open-telemetry/opentelemetry-java-instrumentation
|
||||
[opentelemetry.io]: https://opentelemetry.io
|
||||
[codecov-url]: https://app.codecov.io/gh/open-telemetry/opentelemetry-java/branch/main/
|
||||
[dependencies-and-boms]: https://opentelemetry.io/docs/languages/java/intro/#dependencies-and-boms
|
||||
[maven-image]: https://maven-badges.sml.io/maven-central/io.opentelemetry/opentelemetry-api/badge.svg
|
||||
[maven-url]: https://maven-badges.sml.io/maven-central/io.opentelemetry/opentelemetry-api
|
||||
|
|
170
RELEASING.md
170
RELEASING.md
|
@ -1,116 +1,96 @@
|
|||
# OpenTelemetry Release Process
|
||||
|
||||
## Starting the Release
|
||||
Before releasing, it is a good idea to run `./gradlew japicmp` on the main branch and verify that
|
||||
there are no unexpected public API changes seen in the `docs/apidiffs/current_vs_latest`
|
||||
directory. Additionally, ensure that appropriate `@since` annotations are added to any additions to
|
||||
the public APIs.
|
||||
|
||||
Before releasing, it is a good idea to run `./gradlew japicmp` on the main branch
|
||||
and verify that there are no unexpected public API changes seen in the `docs/apidiffs/current_vs_latest`
|
||||
directory.
|
||||
When preparing the change log, you can use
|
||||
the [draft-change-log-entries.sh](./.github/scripts/draft-change-log-entries.sh) script to assist
|
||||
with drafting. Alternatively,
|
||||
use `git log upstream/v$MAJOR.$((MINOR-1)).x..upstream/v$MAJOR.$MINOR.x --graph --first-parent` or
|
||||
the Github [compare tool](https://github.com/open-telemetry/opentelemetry-java/compare/) to view a
|
||||
summary of all commits since last release as a reference.
|
||||
|
||||
Open the release build workflow in your browser [here](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/release-build.yml).
|
||||
## Release cadence
|
||||
|
||||
You will see a button that says "Run workflow". Press the button, enter the version number you want
|
||||
to release in the input field that pops up, and then press "Run workflow".
|
||||
This repository roughly targets monthly minor releases from the `main` branch on the Friday after
|
||||
the first Monday of the month.
|
||||
|
||||
This triggers the release process, which builds the artifacts. It will not automatically update the
|
||||
documentation, because the Github Actions cannot push changes to the main branch.
|
||||
## Preparing a new major or minor release
|
||||
|
||||
## Announcement
|
||||
* Close the release milestone if there is one.
|
||||
* Merge a pull request to `main` updating the `CHANGELOG.md`.
|
||||
* The heading for the unreleased entries should be `## Unreleased`.
|
||||
* Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/prepare-release-branch.yml).
|
||||
* Press the "Run workflow" button, and leave the default branch `main` selected.
|
||||
* Review and merge the two pull requests that it creates
|
||||
(one is targeted to the release branch and one is targeted to `main`).
|
||||
|
||||
Once the GitHub workflow completes, go to Github [release
|
||||
page](https://github.com/open-telemetry/opentelemetry-java/releases), press
|
||||
`Draft a new release` to write release notes about the new release. If there is already a draft
|
||||
release notes, just point it at the created tag.
|
||||
## Preparing a new patch release
|
||||
|
||||
You can use `git log upstream/v$MAJOR.$((MINOR-1)).x..upstream/v$MAJOR.$MINOR.x --graph --first-parent`
|
||||
or the Github [compare tool](https://github.com/open-telemetry/opentelemetry-java/compare/)
|
||||
to view a summary of all commits since last release as a reference.
|
||||
All patch releases should include only bug-fixes, and must avoid adding/modifying the public APIs.
|
||||
|
||||
In addition, you can refer to
|
||||
[CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-java/blob/main/CHANGELOG.md)
|
||||
for a list of major changes since last release.
|
||||
In general, patch releases are only made for regressions, security vulnerabilities, memory leaks
|
||||
and deadlocks.
|
||||
|
||||
## Update release versions in documentations and CHANGELOG files
|
||||
* Backport pull request(s) to the release branch.
|
||||
* Run the [Backport workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/backport.yml).
|
||||
* Press the "Run workflow" button, then select the release branch from the dropdown list,
|
||||
e.g. `release/v1.9.x`, then enter the pull request number that you want to backport,
|
||||
then click the "Run workflow" button below that.
|
||||
* Review and merge the backport pull request that it generates.
|
||||
* Merge a pull request to the release branch updating the `CHANGELOG.md`.
|
||||
* The heading for the unreleased entries should be `## Unreleased`.
|
||||
* Run the [Prepare patch release workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/prepare-patch-release.yml).
|
||||
* Press the "Run workflow" button, then select the release branch from the dropdown list,
|
||||
e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
|
||||
* Review and merge the pull request that it creates for updating the version.
|
||||
|
||||
After releasing is done, you need to first update the docs. This needs to happen after artifacts have propagated
|
||||
to Maven Central so should probably be done an hour or two after the release workflow finishes.
|
||||
## Making the release
|
||||
|
||||
```
|
||||
./gradlew updateVersionInDocs -Prelease.version=x.y.z
|
||||
./gradlew japicmp -PapiBaseVersion=a.b.c -PapiNewVersion=x.y.z
|
||||
./gradlew --refresh-dependencies japicmp
|
||||
```
|
||||
|
||||
Where `x.y.z` is the version just released and `a.b.c` is the previous version.
|
||||
|
||||
Next, update the
|
||||
[CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-java/blob/main/CHANGELOG.md).
|
||||
|
||||
Create a PR to mark the new release in README.md and CHANGELOG.md on the main branch.
|
||||
|
||||
Finally, update the [website docs][] to refer to the newly released version.
|
||||
|
||||
[website docs]: https://github.com/open-telemetry/opentelemetry-java-docs/tree/main/website_docs
|
||||
|
||||
## Patch Release
|
||||
|
||||
All patch releases should include only bug-fixes, and must avoid
|
||||
adding/modifying the public APIs.
|
||||
|
||||
Open the patch release build workflow in your browser [here](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/patch-release-build.yml).
|
||||
|
||||
You will see a button that says "Run workflow". Press the button, enter the version number you want
|
||||
to release in the input field for version that pops up and the commits you want to cherrypick for the
|
||||
patch as a comma-separated list. Then, press "Run workflow".
|
||||
|
||||
If the commits cannot be cleanly applied to the release branch, for example because it has diverged
|
||||
too much from main, then the workflow will fail before building. In this case, you will need to
|
||||
prepare the release branch manually.
|
||||
|
||||
This example will assume patching into release branch `v1.2.x` from a git repository with remotes
|
||||
named `origin` and `upstream`.
|
||||
|
||||
```
|
||||
$ git remote -v
|
||||
origin git@github.com:username/opentelemetry-java.git (fetch)
|
||||
origin git@github.com:username/opentelemetry-java.git (push)
|
||||
upstream git@github.com:open-telemetry/opentelemetry-java.git (fetch)
|
||||
upstream git@github.com:open-telemetry/opentelemetry-java.git (push)
|
||||
```
|
||||
|
||||
First, checkout the release branch
|
||||
|
||||
```
|
||||
git fetch upstream v1.2.x
|
||||
git checkout upstream/v1.2.x
|
||||
```
|
||||
|
||||
Apply cherrypicks manually and commit. It is ok to apply multiple cherrypicks in a single commit.
|
||||
Use a commit message such as "Manual cherrypick for commits commithash1, commithash2".
|
||||
|
||||
After commiting the change, push to your fork's branch.
|
||||
|
||||
```
|
||||
git push origin v1.2.x
|
||||
```
|
||||
|
||||
Create a PR to have code review and merge this into upstream's release branch. As this was not
|
||||
applied automatically, we need to do code review to make sure the manual cherrypick is correct.
|
||||
|
||||
After it is merged, Run the patch release workflow again, but leave the commits input field blank.
|
||||
The release will be made with the current state of the release branch, which is what you prepared
|
||||
above.
|
||||
* Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-java/actions/workflows/release.yml).
|
||||
* Press the "Run workflow" button, then select the release branch from the dropdown list,
|
||||
e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
|
||||
* This workflow will publish the artifacts to maven central and will publish a GitHub release
|
||||
with release notes based on the change log.
|
||||
* Review and merge the pull request that it creates for updating the change log in main
|
||||
(note that if this is not a patch release then the change log on main may already be up-to-date,
|
||||
in which case no pull request will be created).
|
||||
* Once the release artifacts become available on Maven Central, the system will automatically
|
||||
generate a new pull request titled `Update apidiff baseline and documentation versions to
|
||||
released version $VERSION`. This pull request will contain updates to both the API diff baseline
|
||||
and version references in the documentation files (README.md). Please review and merge this
|
||||
automated pull request.
|
||||
* The [website](https://github.com/open-telemetry/opentelemetry.io) contains automation to update
|
||||
to the newly released version. Review and approve the pull request when available.
|
||||
* The [website](https://opentelemetry.io/docs/languages/java/configuration/#zero-code-sdk-autoconfigure)
|
||||
contains documentation on autoconfiguration properties. If the release has updated or modified any
|
||||
properties, open and merge a pull request to update the documentation.
|
||||
|
||||
## Credentials
|
||||
|
||||
The following credentials are required for publishing (and automatically set in Circle CI):
|
||||
|
||||
* `GPG_PRIVATE_KEY` and `GPG_PASSWORD`: GPG private key and password for signing
|
||||
- Note, currently only @anuraaga has this and we need to find a way to safely share secrets in the
|
||||
OpenTelemetry project, for example with a password manager. In the worst case if you need to
|
||||
release manually and cannot get a hold of it, you can generate a new key but don't forget to
|
||||
upload the public key to keyservers.
|
||||
The following credentials are required for building or publishing (and automatically set in Github Actions):
|
||||
|
||||
* `GPG_PRIVATE_KEY` and `GPG_PASSWORD`: GPG private key and password for signing.
|
||||
* `SONATYPE_USER` and `SONATYPE_KEY`: Sonatype username and password.
|
||||
* Each maintainer will have their own set of Sonotype credentials with permission to publish to
|
||||
the `io.opentelemetry` group prefix.
|
||||
* [Register to publish](https://central.sonatype.org/register/central-portal/#and-publishing-is-easy)
|
||||
and comment on [OSSRH-63768](https://issues.sonatype.org/browse/OSSRH-63768) with confirmation
|
||||
from another maintainer.
|
||||
* To obtain `SONATYPE_USER` and `SONATYPE_KEY` for your account, login
|
||||
to [oss.sonatype.org](https://oss.sonatype.org/) and navigate to Profile -> User Token -> Access
|
||||
User Token.
|
||||
|
||||
Additionally, credentials are stored with maintainers via
|
||||
the [OpenTelemetry 1Password](https://opentelemetry.1password.com/signin) account. The following
|
||||
defines the mapping from Github Action secret keys to 1Password keys:
|
||||
|
||||
| Github Actions Key | 1Password Key |
|
||||
|--------------------|---------------|
|
||||
| `GPG_PASSWORD` | `opentelemetry-java GPG_PASSWORD` |
|
||||
| `GPG_PRIVATE_KEY` | `opentelemetry-java GPG_PRIVATE_KEY` |
|
||||
|
||||
## Releasing from the local setup
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ changes are:
|
|||
reordering parameters, adding a method to an interface or abstract class without adding a default
|
||||
implementation.
|
||||
|
||||
- ABI changes that could require code using the artifact to be recompiled, but not changed, e.g.,
|
||||
- [ABI](https://wikipedia.org/wiki/Application_binary_interface) changes that could require code using the artifact to be recompiled, but not changed, e.g.,
|
||||
changing the return type of a method from `void` to non-`void`, changing a `class` to an `interface`.
|
||||
The [JLS](https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html) has more information on
|
||||
what constitutes compatible changes.
|
||||
|
@ -31,6 +31,17 @@ changes are:
|
|||
Such changes will be avoided - if they must be made, the `MAJOR` version of the artifact will be
|
||||
incremented.
|
||||
|
||||
A stable artifact may depend on an `-alpha` artifact, and expose classes, interfaces, enums, etc. of
|
||||
the `-alpha` artifact as part of its public API. In these cases, the stable artifact will place
|
||||
an [implementation](https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_separation)
|
||||
dependency (as opposed to an api dependency) on the `-alpha` artifact. In order to consume the
|
||||
portions of the API related to the `-alpha` artifact, a user must place their own implementation
|
||||
dependency on it. In adding the implementation dependency, the user has opted into to using
|
||||
an `-alpha` artifact, and we reserve the right to change the portions of the API pertaining to
|
||||
the `-alpha` artifact. This includes changing the names of methods, return types, argument types, etc.
|
||||
We will use this technique sparingly and only when there is some significant reduction in friction
|
||||
by including the `-alpha` artifact.
|
||||
|
||||
Backwards incompatible changes to `internal` packages are expected. Versions of published artifacts
|
||||
are expected to be aligned by using BOMs we publish. We will always provide BOMs to allow alignment
|
||||
of versions.
|
||||
|
@ -39,11 +50,31 @@ Changes may be made that require changes to the an app's dependency declarations
|
|||
incrementing the version on `MINOR` version updates. For example, code may be separated out to a
|
||||
new artifact which requires adding the new artifact to dependency declarations.
|
||||
|
||||
On rare occasions we may deprecate an entire stable artifact, with the intent of stopping functional
|
||||
changes or enhancements. In these situations we may stop publishing additional `MINOR` or `MAJOR`
|
||||
versions of the artifact. However, if necessary, we'll publish security fixes via `PATCH` releases.
|
||||
The API of the last published version will remain stable.
|
||||
|
||||
As a user, if you always depend on the latest version of the BOM for a given `MAJOR` version, and
|
||||
you do not use classes in the `internal` package (which you MUST NOT do), you can be assured that
|
||||
your app will always function and have access to the latest features of OpenTelemetry without needing
|
||||
any changes to code.
|
||||
|
||||
## Language Version Compatibility
|
||||
|
||||
The artifacts published by this codebase are compatible with certain language levels of tooling in
|
||||
the Java ecosystem. For example, all artifacts (except where otherwise noted) support Java language
|
||||
level 8 or higher, and the many artifacts intended to be used in Android environments adhere to a
|
||||
particular [Android API level](https://developer.android.com/tools/releases/build-tools). The
|
||||
following table defines the minimum language levels we adhere to, and how each is considered with
|
||||
respect to semantic versioning.
|
||||
|
||||
| Language | Minimum Version | Applicability | Semconv Notes |
|
||||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Java | 8+ | All artifacts, unless otherwise noted | Changing requires major version bump. |
|
||||
| Android | 23+ (NOTE: [desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) is required. We stay up to date with the latest version of [desugar_jdk_libs](https://github.com/google/desugar_jdk_libs).) | Artifacts using `otel.animalsniffer-conventions` plugin | Kept in sync with minimum requirements for [Google Play services](https://developers.google.com/android/guides/setup). Subject to change in minor version. |
|
||||
| Kotlin | 1.8+ | Only applies to `opentelemetry-extension-kotlin` | Kept in sync with [minimum non-deprecated](https://kotlinlang.org/docs/gradle-compiler-options.html#attributes-common-to-jvm-and-js) version. Subject to change in minor versions. |
|
||||
|
||||
## API vs SDK
|
||||
|
||||
This codebase is broadly split into two large pieces, the OpenTelemetry API and the OpenTelemetry SDK,
|
||||
|
|
|
@ -8,8 +8,9 @@ otelJava.moduleName.set("io.opentelemetry.all")
|
|||
tasks {
|
||||
// We don't compile much here, just some API boundary tests. This project is mostly for
|
||||
// aggregating jacoco reports and it doesn't work if this isn't at least as high as the
|
||||
// highest supported Java version in any of our projects. Most of our projects target
|
||||
// Java 8, except for jfr-events.
|
||||
// highest supported Java version in any of our projects. All of our
|
||||
// projects target Java 8 except :exporters:http-sender:jdk, which targets
|
||||
// Java 11
|
||||
withType(JavaCompile::class) {
|
||||
options.release.set(11)
|
||||
}
|
||||
|
@ -22,6 +23,11 @@ tasks {
|
|||
}
|
||||
}
|
||||
|
||||
// Skip OWASP dependencyCheck task on test module
|
||||
dependencyCheck {
|
||||
skip = true
|
||||
}
|
||||
|
||||
val testTasks = mutableListOf<Task>()
|
||||
|
||||
dependencies {
|
||||
|
@ -38,6 +44,7 @@ dependencies {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
testImplementation("com.tngtech.archunit:archunit-junit5")
|
||||
}
|
||||
|
||||
|
@ -78,15 +85,9 @@ tasks.named<JacocoReport>("jacocoTestReport") {
|
|||
// Exclude mrjar (jacoco complains), shaded, and generated code
|
||||
!it.absolutePath.contains("META-INF/versions/") &&
|
||||
!it.absolutePath.contains("/internal/shaded/") &&
|
||||
!it.absolutePath.contains("io/opentelemetry/proto/") &&
|
||||
!it.absolutePath.contains("io/opentelemetry/exporter/jaeger/proto/") &&
|
||||
!it.absolutePath.contains("io/opentelemetry/exporter/jaeger/internal/protobuf/") &&
|
||||
!it.absolutePath.contains("io/opentelemetry/sdk/extension/trace/jaeger/proto/") &&
|
||||
!it.absolutePath.contains("io/opentelemetry/semconv/trace/attributes/") &&
|
||||
!it.absolutePath.contains("AutoValue_") &&
|
||||
// TODO(anuraaga): Remove exclusion after enabling coverage for jfr-events
|
||||
!it.absolutePath.contains("io/opentelemetry/sdk/extension/jfr")
|
||||
}
|
||||
!it.absolutePath.contains("AutoValue_")
|
||||
},
|
||||
)
|
||||
}
|
||||
additionalSourceDirs(sourcesPath.incoming.artifactView { lenient(true) }.files)
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
package io.opentelemetry.all;
|
||||
|
||||
import com.tngtech.archunit.base.DescribedPredicate;
|
||||
import com.tngtech.archunit.base.Optional;
|
||||
import com.tngtech.archunit.base.PackageMatcher;
|
||||
import com.tngtech.archunit.core.domain.JavaClass;
|
||||
import com.tngtech.archunit.core.domain.JavaClasses;
|
||||
import com.tngtech.archunit.core.domain.JavaMethod;
|
||||
import com.tngtech.archunit.core.domain.PackageMatcher;
|
||||
import com.tngtech.archunit.core.importer.ClassFileImporter;
|
||||
import com.tngtech.archunit.lang.syntax.ArchRuleDefinition;
|
||||
import com.tngtech.archunit.lang.syntax.elements.MethodsShouldConjunction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SdkDesignTest {
|
||||
|
@ -28,7 +28,7 @@ class SdkDesignTest {
|
|||
* Ensures that all SDK methods that: - are defined in classes that extend or implement API model
|
||||
* and are public (to exclude protected builders) - are public (avoids issues with protected
|
||||
* methods returning classes unavailable to test's CL) - override or implement parent method
|
||||
* return only API, Context or generic Java type.
|
||||
* return only API, Context, Common, or generic Java type.
|
||||
*/
|
||||
@Test
|
||||
void sdkImplementationOfApiClassesShouldReturnApiTypeOnly() {
|
||||
|
@ -45,7 +45,11 @@ class SdkDesignTest {
|
|||
.and(implementOrOverride())
|
||||
.should()
|
||||
.haveRawReturnType(
|
||||
inPackage("io.opentelemetry.api..", "io.opentelemetry.context..", "java.."))
|
||||
inPackage(
|
||||
"io.opentelemetry.api..",
|
||||
"io.opentelemetry.context..",
|
||||
"io.opentelemetry.common..",
|
||||
"java.."))
|
||||
.orShould()
|
||||
.haveRawReturnType("void");
|
||||
|
||||
|
@ -53,9 +57,9 @@ class SdkDesignTest {
|
|||
}
|
||||
|
||||
static DescribedPredicate<? super JavaMethod> implementOrOverride() {
|
||||
return new DescribedPredicate<>("implement or override a method") {
|
||||
return new DescribedPredicate<JavaMethod>("implement or override a method") {
|
||||
@Override
|
||||
public boolean apply(JavaMethod input) {
|
||||
public boolean test(JavaMethod input) {
|
||||
List<JavaClass> params = input.getRawParameterTypes();
|
||||
Class<?>[] paramsType = new Class<?>[params.size()];
|
||||
for (int i = 0, n = params.size(); i < n; i++) {
|
||||
|
@ -78,9 +82,9 @@ class SdkDesignTest {
|
|||
}
|
||||
|
||||
static DescribedPredicate<? super JavaClass> inPackage(String... requiredPackages) {
|
||||
return new DescribedPredicate<>("are in " + Arrays.toString(requiredPackages)) {
|
||||
return new DescribedPredicate<JavaClass>("are in " + Arrays.toString(requiredPackages)) {
|
||||
@Override
|
||||
public boolean apply(JavaClass member) {
|
||||
public boolean test(JavaClass member) {
|
||||
for (String requiredPackage : requiredPackages) {
|
||||
if (PackageMatcher.of(requiredPackage).matches(member.getPackageName())) {
|
||||
return true;
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.extension.noopapi;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import io.opentelemetry.api.common.AttributeKey;
|
||||
import io.opentelemetry.api.common.Attributes;
|
||||
import io.opentelemetry.api.trace.Span;
|
||||
import io.opentelemetry.api.trace.SpanBuilder;
|
||||
import io.opentelemetry.api.trace.SpanContext;
|
||||
import io.opentelemetry.api.trace.SpanKind;
|
||||
import io.opentelemetry.api.trace.TraceFlags;
|
||||
import io.opentelemetry.api.trace.TraceState;
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.context.Scope;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class NoopOpenTelemetryTest {
|
||||
|
||||
private static final SpanContext SPAN_CONTEXT =
|
||||
SpanContext.create(
|
||||
"00000000000000000000000000000061",
|
||||
"0000000000000061",
|
||||
TraceFlags.getDefault(),
|
||||
TraceState.getDefault());
|
||||
|
||||
@Test
|
||||
void contextNoOp() {
|
||||
// Context.root() is not a no-op Context, so the default context is never root.
|
||||
Context context = Context.current();
|
||||
assertThat(context).isNotSameAs(Context.root());
|
||||
// No allocations
|
||||
assertThat(context.with(Span.wrap(SPAN_CONTEXT))).isSameAs(context);
|
||||
assertThat(SPAN_CONTEXT.isValid()).isTrue();
|
||||
try (Scope ignored = Context.current().with(Span.wrap(SPAN_CONTEXT)).makeCurrent()) {
|
||||
// No context mounted, so always an invalid span.
|
||||
assertThat(Span.fromContext(Context.current()).getSpanContext().isValid()).isFalse();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void tracerNoOp() {
|
||||
SpanBuilder span1 = NoopOpenTelemetry.getInstance().getTracer("test").spanBuilder("test");
|
||||
SpanBuilder span2 = NoopOpenTelemetry.getInstance().getTracer("test").spanBuilder("test");
|
||||
// No allocations
|
||||
assertThat(span1).isSameAs(span2);
|
||||
|
||||
// No crash
|
||||
span1.setParent(Context.current());
|
||||
span1.setNoParent();
|
||||
span1.addLink(SPAN_CONTEXT);
|
||||
span1.addLink(SPAN_CONTEXT, Attributes.empty());
|
||||
span1.setAttribute("key", "value");
|
||||
span1.setAttribute("key", 1L);
|
||||
span1.setAttribute("key", 1.0);
|
||||
span1.setAttribute("key", true);
|
||||
span1.setAttribute(AttributeKey.stringKey("key"), "value");
|
||||
span1.setSpanKind(SpanKind.CLIENT);
|
||||
span1.setStartTimestamp(1, TimeUnit.DAYS);
|
||||
|
||||
// No allocations
|
||||
assertThat(span1.startSpan()).isSameAs(Span.getInvalid());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import ru.vyarus.gradle.plugin.animalsniffer.info.SignatureInfoTask
|
||||
import ru.vyarus.gradle.plugin.animalsniffer.signature.BuildSignatureTask
|
||||
|
||||
plugins {
|
||||
id("otel.java-conventions")
|
||||
id("ru.vyarus.animalsniffer")
|
||||
}
|
||||
|
||||
description = "Build tool to generate the Animal Sniffer Android signature"
|
||||
otelJava.moduleName.set("io.opentelemetry.internal.animalsniffer")
|
||||
|
||||
val signatureJar = configurations.create("signatureJar") {
|
||||
isCanBeConsumed = false
|
||||
isCanBeResolved = false
|
||||
}
|
||||
val signatureJarClasspath = configurations.create("signatureJarClasspath") {
|
||||
isCanBeConsumed = false
|
||||
isCanBeResolved = true
|
||||
extendsFrom(signatureJar)
|
||||
}
|
||||
val generatedSignature = configurations.create("generatedSignature") {
|
||||
isCanBeConsumed = true
|
||||
isCanBeResolved = false
|
||||
}
|
||||
configurations.add(signatureJar)
|
||||
configurations.add(signatureJarClasspath)
|
||||
configurations.add(generatedSignature)
|
||||
|
||||
dependencies {
|
||||
signature("com.toasttab.android:gummy-bears-api-23:0.12.0@signature")
|
||||
signatureJar("com.android.tools:desugar_jdk_libs")
|
||||
}
|
||||
|
||||
val signatureSimpleName = "android.signature"
|
||||
val signatureBuilderTask = tasks.register("buildSignature", BuildSignatureTask::class.java) {
|
||||
files(signatureJarClasspath) // All the jar files here will be added to the signature file.
|
||||
signatures(configurations.signature) // We'll extend from the existing signatures added to this config.
|
||||
outputName = signatureSimpleName // Name for the generated signature file.
|
||||
}
|
||||
|
||||
// Exposing the "generatedSignature" consumable config to be used in other subprojects
|
||||
artifacts {
|
||||
add("generatedSignature", project.provider { File(signatureBuilderTask.get().outputs.files.singleFile, signatureSimpleName) }) {
|
||||
builtBy(signatureBuilderTask)
|
||||
}
|
||||
}
|
||||
|
||||
// Utility task to show what's in the signature file
|
||||
tasks.register("printSignature", SignatureInfoTask::class.java) {
|
||||
signature = signatureBuilderTask.get().outputFiles
|
||||
depth = 1
|
||||
}
|
|
@ -1,18 +1,7 @@
|
|||
# OpenTelemetry API
|
||||
|
||||
[![Javadocs][javadoc-image]][javadoc-url]
|
||||
#### API Misuse Logging
|
||||
|
||||
* The code in this module is the implementation of stable OpenTelemetry signals.
|
||||
* Semantic Conventions for OpenTelemetry are in the `opentelemetry-semconv` module.
|
||||
* The default implementation of the interfaces in this module is in the OpenTelemetry SDK module.
|
||||
* The interfaces in this directory can be implemented to create alternative
|
||||
implementations of the OpenTelemetry library.
|
||||
API misuse information is logged under logger named `io.opentelemetry.ApiUsageLogging`.
|
||||
|
||||
[javadoc-image]: https://www.javadoc.io/badge/io.opentelemetry/opentelemetry-api.svg
|
||||
[javadoc-url]: https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-api
|
||||
|
||||
---
|
||||
#### Running micro-benchmarks
|
||||
From the root of the repo run `./gradlew clean :api:jmh` to run all the benchmarks
|
||||
or run `./gradlew clean :api:jmh -PjmhIncludeSingleClass=<ClassNameHere>`
|
||||
to run a specific benchmark class.
|
||||
To access, enable `FINEST` level logs.
|
||||
|
|
|
@ -15,6 +15,13 @@ dependencies {
|
|||
|
||||
annotationProcessor("com.google.auto.value:auto-value")
|
||||
|
||||
testImplementation(project(":api:testing-internal"))
|
||||
|
||||
testImplementation("edu.berkeley.cs.jqf:jqf-fuzz")
|
||||
testImplementation("com.google.guava:guava-testlib")
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
// Configure environment variable for ConfigUtilTest
|
||||
environment("CONFIG_KEY", "environment")
|
||||
}
|
||||
|
|
|
@ -25,11 +25,30 @@ public class AttributesBenchmark {
|
|||
// pre-allocate the keys & values to remove one possible confounding factor
|
||||
private static final List<AttributeKey<String>> keys = new ArrayList<>(10);
|
||||
private static final List<String> values = new ArrayList<>(10);
|
||||
private static final List<Attributes> attributes = new ArrayList<>();
|
||||
|
||||
static {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
keys.add(AttributeKey.stringKey("key" + i));
|
||||
values.add("value" + i);
|
||||
AttributesBuilder builder = Attributes.builder();
|
||||
for (int j = 0; j <= i; j++) {
|
||||
builder.put(keys.get(j), values.get(j));
|
||||
}
|
||||
attributes.add(builder.build());
|
||||
}
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
@BenchmarkMode({Mode.AverageTime})
|
||||
@Fork(1)
|
||||
@Measurement(iterations = 15, time = 1)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
@Warmup(iterations = 5, time = 1)
|
||||
@SuppressWarnings("ReturnValueIgnored")
|
||||
public void computeHashCode() {
|
||||
for (Attributes attributes : attributes) {
|
||||
attributes.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.trace;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.openjdk.jmh.annotations.Benchmark;
|
||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||
import org.openjdk.jmh.annotations.Fork;
|
||||
import org.openjdk.jmh.annotations.Measurement;
|
||||
import org.openjdk.jmh.annotations.Mode;
|
||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||
import org.openjdk.jmh.annotations.Warmup;
|
||||
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@Fork(1)
|
||||
@Measurement(iterations = 15, time = 1)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
@Warmup(iterations = 5, time = 1)
|
||||
public class TraceStateBenchmark {
|
||||
|
||||
@Benchmark
|
||||
public TraceState oneItem() {
|
||||
TraceStateBuilder builder = TraceState.builder();
|
||||
builder.put("key1", "val");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public TraceState fiveItems() {
|
||||
TraceStateBuilder builder = TraceState.builder();
|
||||
builder.put("key1", "val");
|
||||
builder.put("key2", "val");
|
||||
builder.put("key3", "val");
|
||||
builder.put("key4", "val");
|
||||
builder.put("key5", "val");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public TraceState fiveItemsWithRemoval() {
|
||||
TraceStateBuilder builder = TraceState.builder();
|
||||
builder.put("key1", "val");
|
||||
builder.put("key2", "val");
|
||||
builder.put("key3", "val");
|
||||
builder.remove("key2");
|
||||
builder.remove("key3");
|
||||
builder.put("key2", "val");
|
||||
builder.put("key3", "val");
|
||||
builder.put("key4", "val");
|
||||
builder.put("key5", "val");
|
||||
return builder.build();
|
||||
}
|
||||
}
|
|
@ -46,4 +46,9 @@ final class DefaultOpenTelemetry implements OpenTelemetry {
|
|||
public ContextPropagators getPropagators() {
|
||||
return propagators;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DefaultOpenTelemetry{" + "propagators=" + propagators + "}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
|
||||
package io.opentelemetry.api;
|
||||
|
||||
import io.opentelemetry.api.internal.ConfigUtil;
|
||||
import io.opentelemetry.api.internal.GuardedBy;
|
||||
import io.opentelemetry.api.logs.LoggerProvider;
|
||||
import io.opentelemetry.api.metrics.Meter;
|
||||
import io.opentelemetry.api.metrics.MeterBuilder;
|
||||
import io.opentelemetry.api.metrics.MeterProvider;
|
||||
|
@ -15,6 +17,7 @@ import io.opentelemetry.api.trace.TracerProvider;
|
|||
import io.opentelemetry.context.propagation.ContextPropagators;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -27,19 +30,35 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* <p>If using the OpenTelemetry SDK, you may want to instantiate the {@link OpenTelemetry} to
|
||||
* provide configuration, for example of {@code Resource} or {@code Sampler}. See {@code
|
||||
* OpenTelemetrySdk} and {@code OpenTelemetrySdk.builder} for information on how to construct the
|
||||
* SDK {@link OpenTelemetry}.
|
||||
* SDK's {@link OpenTelemetry} implementation.
|
||||
*
|
||||
* <p>WARNING: Due to the inherent complications around initialization order involving this class
|
||||
* and its single global instance, we strongly recommend *not* using GlobalOpenTelemetry unless you
|
||||
* have a use-case that absolutely requires it. Please favor using instances of OpenTelemetry
|
||||
* wherever possible.
|
||||
*
|
||||
* <p>If you are using the OpenTelemetry javaagent, it is generally best to only call
|
||||
* GlobalOpenTelemetry.get() once, and then pass the resulting reference where you need to use it.
|
||||
*
|
||||
* @see TracerProvider
|
||||
* @see ContextPropagators
|
||||
*/
|
||||
// We intentionally assign to be use for error reporting.
|
||||
@SuppressWarnings("StaticAssignmentOfThrowable")
|
||||
public final class GlobalOpenTelemetry {
|
||||
|
||||
private static final String GLOBAL_AUTOCONFIGURE_ENABLED_PROPERTY =
|
||||
"otel.java.global-autoconfigure.enabled";
|
||||
|
||||
private static final Logger logger = Logger.getLogger(GlobalOpenTelemetry.class.getName());
|
||||
|
||||
private static final Object mutex = new Object();
|
||||
|
||||
@Nullable private static volatile ObfuscatedOpenTelemetry globalOpenTelemetry;
|
||||
@SuppressWarnings("NonFinalStaticField")
|
||||
@Nullable
|
||||
private static volatile ObfuscatedOpenTelemetry globalOpenTelemetry;
|
||||
|
||||
@SuppressWarnings("NonFinalStaticField")
|
||||
@GuardedBy("mutex")
|
||||
@Nullable
|
||||
private static Throwable setGlobalCaller;
|
||||
|
@ -98,6 +117,21 @@ public final class GlobalOpenTelemetry {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link OpenTelemetry} that should be the global instance.
|
||||
*
|
||||
* <p>This method calls the given {@code supplier} and calls {@link #set(OpenTelemetry)}, all
|
||||
* while holding the {@link GlobalOpenTelemetry} mutex.
|
||||
*
|
||||
* @since 1.52.0
|
||||
*/
|
||||
public static void set(Supplier<OpenTelemetry> supplier) {
|
||||
synchronized (mutex) {
|
||||
OpenTelemetry openTelemetry = supplier.get();
|
||||
set(openTelemetry);
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the globally registered {@link TracerProvider}. */
|
||||
public static TracerProvider getTracerProvider() {
|
||||
return get().getTracerProvider();
|
||||
|
@ -106,44 +140,45 @@ public final class GlobalOpenTelemetry {
|
|||
/**
|
||||
* Gets or creates a named tracer instance from the globally registered {@link TracerProvider}.
|
||||
*
|
||||
* <p>This is a shortcut method for {@code getTracerProvider().get(instrumentationName)}
|
||||
* <p>This is a shortcut method for {@code getTracerProvider().get(instrumentationScopeName)}
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @return a tracer instance.
|
||||
*/
|
||||
public static Tracer getTracer(String instrumentationName) {
|
||||
return get().getTracer(instrumentationName);
|
||||
public static Tracer getTracer(String instrumentationScopeName) {
|
||||
return get().getTracer(instrumentationScopeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets or creates a named and versioned tracer instance from the globally registered {@link
|
||||
* TracerProvider}.
|
||||
*
|
||||
* <p>This is a shortcut method for {@code getTracerProvider().get(instrumentationName,
|
||||
* instrumentationVersion)}
|
||||
* <p>This is a shortcut method for {@code getTracerProvider().get(instrumentationScopeName,
|
||||
* instrumentationScopeVersion)}
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
|
||||
* @param instrumentationVersion The version of the instrumentation library (e.g., "1.0.0").
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @param instrumentationScopeVersion The version of the instrumentation scope (e.g., "1.0.0").
|
||||
* @return a tracer instance.
|
||||
*/
|
||||
public static Tracer getTracer(String instrumentationName, String instrumentationVersion) {
|
||||
return get().getTracer(instrumentationName, instrumentationVersion);
|
||||
public static Tracer getTracer(
|
||||
String instrumentationScopeName, String instrumentationScopeVersion) {
|
||||
return get().getTracer(instrumentationScopeName, instrumentationScopeVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a TracerBuilder for a named {@link Tracer} instance.
|
||||
*
|
||||
* <p>This is a shortcut method for {@code get().tracerBuilder(instrumentationName)}
|
||||
* <p>This is a shortcut method for {@code get().tracerBuilder(instrumentationScopeName)}
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library.
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @return a TracerBuilder instance.
|
||||
* @since 1.4.0
|
||||
*/
|
||||
public static TracerBuilder tracerBuilder(String instrumentationName) {
|
||||
return get().tracerBuilder(instrumentationName);
|
||||
public static TracerBuilder tracerBuilder(String instrumentationScopeName) {
|
||||
return get().tracerBuilder(instrumentationScopeName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -158,29 +193,29 @@ public final class GlobalOpenTelemetry {
|
|||
/**
|
||||
* Gets or creates a named meter instance from the globally registered {@link MeterProvider}.
|
||||
*
|
||||
* <p>This is a shortcut method for {@code getMeterProvider().get(instrumentationName)}
|
||||
* <p>This is a shortcut method for {@code getMeterProvider().get(instrumentationScopeName)}
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @return a Meter instance.
|
||||
* @since 1.10.0
|
||||
*/
|
||||
public static Meter getMeter(String instrumentationName) {
|
||||
return get().getMeter(instrumentationName);
|
||||
public static Meter getMeter(String instrumentationScopeName) {
|
||||
return get().getMeter(instrumentationScopeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a MeterBuilder for a named {@link Meter} instance.
|
||||
*
|
||||
* <p>This is a shortcut method for {@code get().meterBuilder(instrumentationName)}
|
||||
* <p>This is a shortcut method for {@code get().meterBuilder(instrumentationScopeName)}
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library.
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @return a MeterBuilder instance.
|
||||
* @since 1.10.0
|
||||
*/
|
||||
public static MeterBuilder meterBuilder(String instrumentationName) {
|
||||
return get().meterBuilder(instrumentationName);
|
||||
public static MeterBuilder meterBuilder(String instrumentationScopeName) {
|
||||
return get().meterBuilder(instrumentationScopeName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -208,15 +243,29 @@ public final class GlobalOpenTelemetry {
|
|||
return null;
|
||||
}
|
||||
|
||||
// If autoconfigure module is present but global autoconfigure disabled log a warning and return
|
||||
boolean globalAutoconfigureEnabled =
|
||||
Boolean.parseBoolean(ConfigUtil.getString(GLOBAL_AUTOCONFIGURE_ENABLED_PROPERTY, "false"));
|
||||
if (!globalAutoconfigureEnabled) {
|
||||
logger.log(
|
||||
Level.INFO,
|
||||
"AutoConfiguredOpenTelemetrySdk found on classpath but automatic configuration is disabled."
|
||||
+ " To enable, run your JVM with -D"
|
||||
+ GLOBAL_AUTOCONFIGURE_ENABLED_PROPERTY
|
||||
+ "=true");
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
Method initialize = openTelemetrySdkAutoConfiguration.getMethod("initialize");
|
||||
Object autoConfiguredSdk = initialize.invoke(null);
|
||||
Method getOpenTelemetrySdk =
|
||||
openTelemetrySdkAutoConfiguration.getMethod("getOpenTelemetrySdk");
|
||||
return (OpenTelemetry) getOpenTelemetrySdk.invoke(autoConfiguredSdk);
|
||||
return new ObfuscatedOpenTelemetry(
|
||||
(OpenTelemetry) getOpenTelemetrySdk.invoke(autoConfiguredSdk));
|
||||
} catch (NoSuchMethodException | IllegalAccessException e) {
|
||||
throw new IllegalStateException(
|
||||
"OpenTelemetrySdkAutoConfiguration detected on classpath "
|
||||
"AutoConfiguredOpenTelemetrySdk detected on classpath "
|
||||
+ "but could not invoke initialize method. This is a bug in OpenTelemetry.",
|
||||
e);
|
||||
} catch (InvocationTargetException t) {
|
||||
|
@ -252,14 +301,19 @@ public final class GlobalOpenTelemetry {
|
|||
return delegate.getMeterProvider();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerProvider getLogsBridge() {
|
||||
return delegate.getLogsBridge();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContextPropagators getPropagators() {
|
||||
return delegate.getPropagators();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TracerBuilder tracerBuilder(String instrumentationName) {
|
||||
return delegate.tracerBuilder(instrumentationName);
|
||||
public TracerBuilder tracerBuilder(String instrumentationScopeName) {
|
||||
return delegate.tracerBuilder(instrumentationScopeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
package io.opentelemetry.api;
|
||||
|
||||
import io.opentelemetry.api.logs.LoggerProvider;
|
||||
import io.opentelemetry.api.metrics.Meter;
|
||||
import io.opentelemetry.api.metrics.MeterBuilder;
|
||||
import io.opentelemetry.api.metrics.MeterProvider;
|
||||
|
@ -46,37 +47,37 @@ public interface OpenTelemetry {
|
|||
* Gets or creates a named tracer instance from the {@link TracerProvider} for this {@link
|
||||
* OpenTelemetry}.
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @return a tracer instance.
|
||||
*/
|
||||
default Tracer getTracer(String instrumentationName) {
|
||||
return getTracerProvider().get(instrumentationName);
|
||||
default Tracer getTracer(String instrumentationScopeName) {
|
||||
return getTracerProvider().get(instrumentationScopeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets or creates a named and versioned tracer instance from the {@link TracerProvider} in this
|
||||
* {@link OpenTelemetry}.
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
|
||||
* @param instrumentationVersion The version of the instrumentation library (e.g., "1.0.0").
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @param instrumentationScopeVersion The version of the instrumentation scope (e.g., "1.0.0").
|
||||
* @return a tracer instance.
|
||||
*/
|
||||
default Tracer getTracer(String instrumentationName, String instrumentationVersion) {
|
||||
return getTracerProvider().get(instrumentationName, instrumentationVersion);
|
||||
default Tracer getTracer(String instrumentationScopeName, String instrumentationScopeVersion) {
|
||||
return getTracerProvider().get(instrumentationScopeName, instrumentationScopeVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link TracerBuilder} for a named {@link Tracer} instance.
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library.
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @return a TracerBuilder instance.
|
||||
* @since 1.4.0
|
||||
*/
|
||||
default TracerBuilder tracerBuilder(String instrumentationName) {
|
||||
return getTracerProvider().tracerBuilder(instrumentationName);
|
||||
default TracerBuilder tracerBuilder(String instrumentationScopeName) {
|
||||
return getTracerProvider().tracerBuilder(instrumentationScopeName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,25 +93,38 @@ public interface OpenTelemetry {
|
|||
* Gets or creates a named meter instance from the {@link MeterProvider} for this {@link
|
||||
* OpenTelemetry}.
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @return a Meter instance.
|
||||
* @since 1.10.0
|
||||
*/
|
||||
default Meter getMeter(String instrumentationName) {
|
||||
return getMeterProvider().get(instrumentationName);
|
||||
default Meter getMeter(String instrumentationScopeName) {
|
||||
return getMeterProvider().get(instrumentationScopeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link MeterBuilder} for a named {@link Tracer} instance.
|
||||
* Creates a {@link MeterBuilder} for a named {@link Meter} instance.
|
||||
*
|
||||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library.
|
||||
* @param instrumentationScopeName A name uniquely identifying the instrumentation scope, such as
|
||||
* the instrumentation library, package, or fully qualified class name. Must not be null.
|
||||
* @return a MeterBuilder instance.
|
||||
* @since 1.10.0
|
||||
*/
|
||||
default MeterBuilder meterBuilder(String instrumentationName) {
|
||||
return getMeterProvider().meterBuilder(instrumentationName);
|
||||
default MeterBuilder meterBuilder(String instrumentationScopeName) {
|
||||
return getMeterProvider().meterBuilder(instrumentationScopeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link LoggerProvider} for bridging logs into OpenTelemetry.
|
||||
*
|
||||
* <p>The OpenTelemetry logs bridge API exists to enable bridging logs from other log frameworks
|
||||
* (e.g. SLF4J, Log4j, JUL, Logback, etc) into OpenTelemetry and is <b>NOT</b> a replacement log
|
||||
* API.
|
||||
*
|
||||
* @since 1.27.0
|
||||
*/
|
||||
default LoggerProvider getLogsBridge() {
|
||||
return LoggerProvider.noop();
|
||||
}
|
||||
|
||||
/** Returns the {@link ContextPropagators} for this {@link OpenTelemetry}. */
|
||||
|
|
|
@ -99,4 +99,23 @@ public interface Baggage extends ImplicitContextKeyed {
|
|||
* be set to not use an implicit parent, so any parent assignment must be done manually.
|
||||
*/
|
||||
BaggageBuilder toBuilder();
|
||||
|
||||
/**
|
||||
* Returns the {@code BaggageEntry} associated with the given key.
|
||||
*
|
||||
* @param entryKey entry key to return the {@code BaggageEntry} for, or {@code null} if no {@code
|
||||
* Entry} with the given {@code entryKey} is in this {@code Baggage}.
|
||||
* @since 1.43.0
|
||||
*/
|
||||
@Nullable
|
||||
default BaggageEntry getEntry(String entryKey) {
|
||||
BaggageEntry[] result = new BaggageEntry[] {null};
|
||||
forEach(
|
||||
(key, entry) -> {
|
||||
if (entryKey.equals(key)) {
|
||||
result[0] = entry;
|
||||
}
|
||||
});
|
||||
return result[0];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,13 @@ final class ImmutableBaggage extends ImmutableKeyValuePairs<String, BaggageEntry
|
|||
return entry != null ? entry.getValue() : null;
|
||||
}
|
||||
|
||||
// Overrides the default implementation to provide a more performant implementation.
|
||||
@Nullable
|
||||
@Override
|
||||
public BaggageEntry getEntry(String entryKey) {
|
||||
return get(entryKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaggageBuilder toBuilder() {
|
||||
return new Builder(new ArrayList<>(data()));
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
package io.opentelemetry.api.baggage;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import io.opentelemetry.api.internal.ApiUsageLogger;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
@Immutable
|
||||
|
@ -24,6 +25,7 @@ abstract class ImmutableEntryMetadata implements BaggageEntryMetadata {
|
|||
*/
|
||||
static ImmutableEntryMetadata create(String metadata) {
|
||||
if (metadata == null) {
|
||||
ApiUsageLogger.log("metadata is null");
|
||||
return EMPTY;
|
||||
}
|
||||
return new AutoValue_ImmutableEntryMetadata(metadata);
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
* <p>Note that entries are independent of the tracing data that is propagated in the {@link
|
||||
* io.opentelemetry.context.Context}, such as trace ID.
|
||||
*/
|
||||
// TODO: Add code examples.
|
||||
@ParametersAreNonnullByDefault
|
||||
package io.opentelemetry.api.baggage;
|
||||
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.baggage.propagation;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* Note: This class is based on code from Apache Commons Codec. It is comprised of code from these
|
||||
* classes:
|
||||
*
|
||||
* <ul>
|
||||
* <li><a
|
||||
* href="https://github.com/apache/commons-codec/blob/482df6cabfb288acb6ab3e4a732fdb93aecfa7c2/src/main/java/org/apache/commons/codec/net/URLCodec.java">org.apache.commons.codec.net.URLCodec</a>
|
||||
* <li><a
|
||||
* href="https://github.com/apache/commons-codec/blob/482df6cabfb288acb6ab3e4a732fdb93aecfa7c2/src/main/java/org/apache/commons/codec/net/Utils.java">org.apache.commons.codec.net.Utils</a>
|
||||
* </ul>
|
||||
*
|
||||
* <p>Implements baggage-octet decoding in accordance with th <a
|
||||
* href="https://w3c.github.io/baggage/#definition">Baggage header content</a> specification. All
|
||||
* US-ASCII characters excluding CTLs, whitespace, DQUOTE, comma, semicolon and backslash are
|
||||
* encoded in `www-form-urlencoded` encoding scheme.
|
||||
*/
|
||||
class BaggageCodec {
|
||||
|
||||
private static final byte ESCAPE_CHAR = '%';
|
||||
private static final int RADIX = 16;
|
||||
|
||||
private BaggageCodec() {}
|
||||
|
||||
/**
|
||||
* Decodes an array of URL safe 7-bit characters into an array of original bytes. Escaped
|
||||
* characters are converted back to their original representation.
|
||||
*
|
||||
* @param bytes array of URL safe characters
|
||||
* @return array of original bytes
|
||||
*/
|
||||
private static byte[] decode(byte[] bytes) {
|
||||
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
|
||||
for (int i = 0; i < bytes.length; i++) {
|
||||
int b = bytes[i];
|
||||
if (b == ESCAPE_CHAR) {
|
||||
try {
|
||||
int u = digit16(bytes[++i]);
|
||||
int l = digit16(bytes[++i]);
|
||||
buffer.write((char) ((u << 4) + l));
|
||||
} catch (ArrayIndexOutOfBoundsException e) { // FIXME
|
||||
throw new IllegalArgumentException("Invalid URL encoding: ", e);
|
||||
}
|
||||
} else {
|
||||
buffer.write(b);
|
||||
}
|
||||
}
|
||||
return buffer.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes an array of URL safe 7-bit characters into an array of original bytes. Escaped
|
||||
* characters are converted back to their original representation.
|
||||
*
|
||||
* @param value string of URL safe characters
|
||||
* @param charset encoding of given string
|
||||
* @return decoded value
|
||||
*/
|
||||
static String decode(String value, Charset charset) {
|
||||
byte[] bytes = decode(value.getBytes(StandardCharsets.US_ASCII));
|
||||
return new String(bytes, charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the numeric value of the character {@code b} in radix 16.
|
||||
*
|
||||
* @param b The byte to be converted.
|
||||
* @return The numeric value represented by the character in radix 16.
|
||||
*/
|
||||
private static int digit16(byte b) {
|
||||
int i = Character.digit((char) b, RADIX);
|
||||
if (i == -1) {
|
||||
throw new IllegalArgumentException( // FIXME
|
||||
"Invalid URL encoding: not a valid digit (radix " + RADIX + "): " + b);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
|
@ -7,18 +7,16 @@ package io.opentelemetry.api.baggage.propagation;
|
|||
|
||||
import io.opentelemetry.api.baggage.BaggageBuilder;
|
||||
import io.opentelemetry.api.baggage.BaggageEntryMetadata;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Implements single-pass Baggage parsing in accordance with https://w3c.github.io/baggage/ Key /
|
||||
* value are restricted in accordance with https://www.ietf.org/rfc/rfc2616.txt
|
||||
* value are restricted in accordance with https://www.ietf.org/rfc/rfc2616.txt.
|
||||
*
|
||||
* <p>Note: following aspects are not specified in RFC: - some invalid elements (key or value) -
|
||||
* parser will include valid ones, disregard invalid - empty "value" is regarded as invalid - meta -
|
||||
* anything besides element terminator (comma)
|
||||
* anything besides element terminator (comma).
|
||||
*/
|
||||
class Parser {
|
||||
|
||||
|
@ -39,7 +37,7 @@ class Parser {
|
|||
|
||||
private boolean skipToNext;
|
||||
|
||||
public Parser(String baggageHeader) {
|
||||
Parser(String baggageHeader) {
|
||||
this.baggageHeader = baggageHeader;
|
||||
reset(0);
|
||||
}
|
||||
|
@ -64,6 +62,8 @@ class Parser {
|
|||
} else {
|
||||
skipToNext = true;
|
||||
}
|
||||
} else if (state == State.VALUE) {
|
||||
skipToNext = !value.tryNextChar(current, i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -146,11 +146,7 @@ class Parser {
|
|||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return URLDecoder.decode(value, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return null;
|
||||
}
|
||||
return BaggageCodec.decode(value, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,12 +10,14 @@ import static java.util.Collections.singletonList;
|
|||
import io.opentelemetry.api.baggage.Baggage;
|
||||
import io.opentelemetry.api.baggage.BaggageBuilder;
|
||||
import io.opentelemetry.api.baggage.BaggageEntry;
|
||||
import io.opentelemetry.api.internal.PercentEscaper;
|
||||
import io.opentelemetry.api.internal.StringUtils;
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.context.propagation.TextMapGetter;
|
||||
import io.opentelemetry.context.propagation.TextMapPropagator;
|
||||
import io.opentelemetry.context.propagation.TextMapSetter;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
@ -94,21 +96,34 @@ public final class W3CBaggagePropagator implements TextMapPropagator {
|
|||
return context;
|
||||
}
|
||||
|
||||
String baggageHeader = getter.get(carrier, FIELD);
|
||||
if (baggageHeader == null) {
|
||||
return context;
|
||||
}
|
||||
if (baggageHeader.isEmpty()) {
|
||||
return extractMulti(context, carrier, getter);
|
||||
}
|
||||
|
||||
private static <C> Context extractMulti(
|
||||
Context context, @Nullable C carrier, TextMapGetter<C> getter) {
|
||||
Iterator<String> baggageHeaders = getter.getAll(carrier, FIELD);
|
||||
if (baggageHeaders == null) {
|
||||
return context;
|
||||
}
|
||||
|
||||
boolean extracted = false;
|
||||
BaggageBuilder baggageBuilder = Baggage.builder();
|
||||
try {
|
||||
extractEntries(baggageHeader, baggageBuilder);
|
||||
} catch (RuntimeException e) {
|
||||
return context;
|
||||
|
||||
while (baggageHeaders.hasNext()) {
|
||||
String header = baggageHeaders.next();
|
||||
if (header.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
extractEntries(header, baggageBuilder);
|
||||
extracted = true;
|
||||
} catch (RuntimeException expected) {
|
||||
// invalid baggage header, continue
|
||||
}
|
||||
}
|
||||
return context.with(baggageBuilder.build());
|
||||
|
||||
return extracted ? context.with(baggageBuilder.build()) : context;
|
||||
}
|
||||
|
||||
private static void extractEntries(String baggageHeader, BaggageBuilder baggageBuilder) {
|
||||
|
@ -126,7 +141,7 @@ public final class W3CBaggagePropagator implements TextMapPropagator {
|
|||
* @return whether the name is valid.
|
||||
*/
|
||||
private static boolean isValidBaggageKey(String name) {
|
||||
return name != null && !name.isEmpty() && StringUtils.isPrintableString(name);
|
||||
return name != null && !name.trim().isEmpty() && StringUtils.isPrintableString(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,4 +153,9 @@ public final class W3CBaggagePropagator implements TextMapPropagator {
|
|||
private static boolean isValidBaggageValue(String value) {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "W3CBaggagePropagator";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class ArrayBackedAttributesBuilder implements AttributesBuilder {
|
||||
private final List<Object> data;
|
||||
|
@ -37,7 +38,7 @@ class ArrayBackedAttributesBuilder implements AttributesBuilder {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T> AttributesBuilder put(AttributeKey<T> key, T value) {
|
||||
public <T> AttributesBuilder put(AttributeKey<T> key, @Nullable T value) {
|
||||
if (key == null || key.getKey().isEmpty() || value == null) {
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,11 @@ public interface AttributeKey<T> {
|
|||
/** Returns the type of attribute for this key. Useful for building switch statements. */
|
||||
AttributeType getType();
|
||||
|
||||
// TODO (jack-berg): uncomment when extended attributes are promoted from incubator to API
|
||||
// default ExtendedAttributeKey<T> asExtendedAttributeKey() {
|
||||
// return InternalAttributeKeyImpl.toExtendedAttributeKey(this);
|
||||
// }
|
||||
|
||||
/** Returns a new AttributeKey for String valued attributes. */
|
||||
static AttributeKey<String> stringKey(String key) {
|
||||
return InternalAttributeKeyImpl.create(key, AttributeType.STRING);
|
||||
|
|
|
@ -117,6 +117,7 @@ public interface Attributes {
|
|||
* Returns a {@link Attributes} instance with five key-value pairs. Order of the keys is not
|
||||
* preserved. Duplicate keys will be removed.
|
||||
*/
|
||||
@SuppressWarnings("TooManyParameters")
|
||||
static <T, U, V, W, X> Attributes of(
|
||||
AttributeKey<T> key1,
|
||||
T value1,
|
||||
|
|
|
@ -16,7 +16,9 @@ import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
|
|||
import static io.opentelemetry.api.common.AttributeKey.stringKey;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/** A builder of {@link Attributes} supporting an arbitrary number of key-value pairs. */
|
||||
public interface AttributesBuilder {
|
||||
|
@ -34,18 +36,22 @@ public interface AttributesBuilder {
|
|||
// version.
|
||||
<T> AttributesBuilder put(AttributeKey<Long> key, int value);
|
||||
|
||||
/** Puts a {@link AttributeKey} with associated value into this. */
|
||||
<T> AttributesBuilder put(AttributeKey<T> key, T value);
|
||||
/**
|
||||
* Puts an {@link AttributeKey} with an associated value into this if the value is non-null.
|
||||
* Providing a null value does not remove or unset previously set values.
|
||||
*/
|
||||
<T> AttributesBuilder put(AttributeKey<T> key, @Nullable T value);
|
||||
|
||||
/**
|
||||
* Puts a String attribute into this.
|
||||
* Puts a String attribute into this if the value is non-null. Providing a null value does not
|
||||
* remove or unset previously set values.
|
||||
*
|
||||
* <p>Note: It is strongly recommended to use {@link #put(AttributeKey, Object)}, and pre-allocate
|
||||
* your keys, if possible.
|
||||
*
|
||||
* @return this Builder
|
||||
*/
|
||||
default AttributesBuilder put(String key, String value) {
|
||||
default AttributesBuilder put(String key, @Nullable String value) {
|
||||
return put(stringKey(key), value);
|
||||
}
|
||||
|
||||
|
@ -100,6 +106,19 @@ public interface AttributesBuilder {
|
|||
return put(stringArrayKey(key), Arrays.asList(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Puts a List attribute into this.
|
||||
*
|
||||
* @return this Builder
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
default <T> AttributesBuilder put(AttributeKey<List<T>> key, T... value) {
|
||||
if (value == null) {
|
||||
return this;
|
||||
}
|
||||
return put(key, Arrays.asList(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Puts a Long array attribute into this.
|
||||
*
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
/**
|
||||
* Key-value pair of {@link String} key and {@link Value} value.
|
||||
*
|
||||
* @see Value#of(KeyValue...)
|
||||
* @since 1.42.0
|
||||
*/
|
||||
public interface KeyValue {
|
||||
|
||||
/** Returns a {@link KeyValue} for the given {@code key} and {@code value}. */
|
||||
static KeyValue of(String key, Value<?> value) {
|
||||
return KeyValueImpl.create(key, value);
|
||||
}
|
||||
|
||||
/** Returns the key. */
|
||||
String getKey();
|
||||
|
||||
/** Returns the value. */
|
||||
Value<?> getValue();
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
|
||||
@AutoValue
|
||||
abstract class KeyValueImpl implements KeyValue {
|
||||
|
||||
KeyValueImpl() {}
|
||||
|
||||
static KeyValueImpl create(String key, Value<?> value) {
|
||||
return new AutoValue_KeyValueImpl(key, value);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import static java.util.stream.Collectors.joining;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
final class KeyValueList implements Value<List<KeyValue>> {
|
||||
|
||||
private final List<KeyValue> value;
|
||||
|
||||
private KeyValueList(List<KeyValue> value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
static Value<List<KeyValue>> create(KeyValue... value) {
|
||||
Objects.requireNonNull(value, "value must not be null");
|
||||
List<KeyValue> list = new ArrayList<>(value.length);
|
||||
list.addAll(Arrays.asList(value));
|
||||
return new KeyValueList(Collections.unmodifiableList(list));
|
||||
}
|
||||
|
||||
static Value<List<KeyValue>> createFromMap(Map<String, Value<?>> value) {
|
||||
Objects.requireNonNull(value, "value must not be null");
|
||||
KeyValue[] array =
|
||||
value.entrySet().stream()
|
||||
.map(entry -> KeyValue.of(entry.getKey(), entry.getValue()))
|
||||
.toArray(KeyValue[]::new);
|
||||
return create(array);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueType getType() {
|
||||
return ValueType.KEY_VALUE_LIST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyValue> getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
return value.stream()
|
||||
.map(item -> item.getKey() + "=" + item.getValue().asString())
|
||||
.collect(joining(", ", "[", "]"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "KeyValueList{" + asString() + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return value.hashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Value mirrors the proto <a
|
||||
* href="https://github.com/open-telemetry/opentelemetry-proto/blob/ac3242b03157295e4ee9e616af53b81517b06559/opentelemetry/proto/common/v1/common.proto#L28">AnyValue</a>
|
||||
* message type, and is used to model any type.
|
||||
*
|
||||
* <p>It can be used to represent:
|
||||
*
|
||||
* <ul>
|
||||
* <li>Primitive values via {@link #of(long)}, {@link #of(String)}, {@link #of(boolean)}, {@link
|
||||
* #of(double)}.
|
||||
* <li>String-keyed maps (i.e. associative arrays, dictionaries) via {@link #of(KeyValue...)},
|
||||
* {@link #of(Map)}. Note, because map values are type {@link Value}, maps can be nested
|
||||
* within other maps.
|
||||
* <li>Arrays (heterogeneous or homogenous) via {@link #of(Value[])}. Note, because array values
|
||||
* are type {@link Value}, arrays can contain primitives, complex types like maps or arrays,
|
||||
* or any combination.
|
||||
* <li>Raw bytes via {@link #of(byte[])}
|
||||
* </ul>
|
||||
*
|
||||
* <p>Currently, Value is only used as an argument for {@link
|
||||
* io.opentelemetry.api.logs.LogRecordBuilder#setBody(Value)}.
|
||||
*
|
||||
* @param <T> the type. See {@link #getValue()} for description of types.
|
||||
* @since 1.42.0
|
||||
*/
|
||||
public interface Value<T> {
|
||||
|
||||
/** Returns an {@link Value} for the {@link String} value. */
|
||||
static Value<String> of(String value) {
|
||||
return ValueString.create(value);
|
||||
}
|
||||
|
||||
/** Returns an {@link Value} for the {@code boolean} value. */
|
||||
static Value<Boolean> of(boolean value) {
|
||||
return ValueBoolean.create(value);
|
||||
}
|
||||
|
||||
/** Returns an {@link Value} for the {@code long} value. */
|
||||
static Value<Long> of(long value) {
|
||||
return ValueLong.create(value);
|
||||
}
|
||||
|
||||
/** Returns an {@link Value} for the {@code double} value. */
|
||||
static Value<Double> of(double value) {
|
||||
return ValueDouble.create(value);
|
||||
}
|
||||
|
||||
/** Returns an {@link Value} for the {@code byte[]} value. */
|
||||
static Value<ByteBuffer> of(byte[] value) {
|
||||
return ValueBytes.create(value);
|
||||
}
|
||||
|
||||
/** Returns an {@link Value} for the array of {@link Value} values. */
|
||||
static Value<List<Value<?>>> of(Value<?>... value) {
|
||||
return ValueArray.create(value);
|
||||
}
|
||||
|
||||
/** Returns an {@link Value} for the list of {@link Value} values. */
|
||||
static Value<List<Value<?>>> of(List<Value<?>> value) {
|
||||
return ValueArray.create(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an {@link Value} for the array of {@link KeyValue} values. {@link KeyValue#getKey()}
|
||||
* values should not repeat - duplicates may be dropped.
|
||||
*/
|
||||
static Value<List<KeyValue>> of(KeyValue... value) {
|
||||
return KeyValueList.create(value);
|
||||
}
|
||||
|
||||
/** Returns an {@link Value} for the {@link Map} of key, {@link Value}. */
|
||||
static Value<List<KeyValue>> of(Map<String, Value<?>> value) {
|
||||
return KeyValueList.createFromMap(value);
|
||||
}
|
||||
|
||||
/** Returns the type of this {@link Value}. Useful for building switch statements. */
|
||||
ValueType getType();
|
||||
|
||||
/**
|
||||
* Returns the value for this {@link Value}.
|
||||
*
|
||||
* <p>The return type varies by {@link #getType()} as described below:
|
||||
*
|
||||
* <ul>
|
||||
* <li>{@link ValueType#STRING} returns {@link String}
|
||||
* <li>{@link ValueType#BOOLEAN} returns {@code boolean}
|
||||
* <li>{@link ValueType#LONG} returns {@code long}
|
||||
* <li>{@link ValueType#DOUBLE} returns {@code double}
|
||||
* <li>{@link ValueType#ARRAY} returns {@link List} of {@link Value}
|
||||
* <li>{@link ValueType#KEY_VALUE_LIST} returns {@link List} of {@link KeyValue}
|
||||
* <li>{@link ValueType#BYTES} returns read only {@link ByteBuffer}. See {@link
|
||||
* ByteBuffer#asReadOnlyBuffer()}.
|
||||
* </ul>
|
||||
*/
|
||||
T getValue();
|
||||
|
||||
/**
|
||||
* Return a string encoding of this {@link Value}. This is intended to be a fallback serialized
|
||||
* representation in case there is no suitable encoding that can utilize {@link #getType()} /
|
||||
* {@link #getValue()} to serialize specific types.
|
||||
*
|
||||
* <p>WARNING: No guarantees are made about the encoding of this string response. It MAY change in
|
||||
* a future minor release. If you need a reliable string encoding, write your own serializer.
|
||||
*/
|
||||
// TODO(jack-berg): Should this be a JSON encoding?
|
||||
String asString();
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import static java.util.stream.Collectors.joining;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
final class ValueArray implements Value<List<Value<?>>> {
|
||||
|
||||
private final List<Value<?>> value;
|
||||
|
||||
private ValueArray(List<Value<?>> value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
static Value<List<Value<?>>> create(Value<?>... value) {
|
||||
Objects.requireNonNull(value, "value must not be null");
|
||||
List<Value<?>> list = new ArrayList<>(value.length);
|
||||
list.addAll(Arrays.asList(value));
|
||||
return new ValueArray(Collections.unmodifiableList(list));
|
||||
}
|
||||
|
||||
static Value<List<Value<?>>> create(List<Value<?>> value) {
|
||||
return new ValueArray(Collections.unmodifiableList(value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueType getType() {
|
||||
return ValueType.ARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Value<?>> getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
return value.stream().map(Value::asString).collect(joining(", ", "[", "]"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ValueArray{" + asString() + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return value.hashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
final class ValueBoolean implements Value<Boolean> {
|
||||
|
||||
private final boolean value;
|
||||
|
||||
private ValueBoolean(boolean value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
static Value<Boolean> create(boolean value) {
|
||||
return new ValueBoolean(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueType getType() {
|
||||
return ValueType.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ValueBoolean{" + asString() + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Boolean.hashCode(value);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import java.util.Objects;
|
||||
|
||||
final class ValueBytes implements Value<ByteBuffer> {
|
||||
|
||||
private final byte[] raw;
|
||||
|
||||
private ValueBytes(byte[] value) {
|
||||
this.raw = value;
|
||||
}
|
||||
|
||||
static Value<ByteBuffer> create(byte[] value) {
|
||||
Objects.requireNonNull(value, "value must not be null");
|
||||
return new ValueBytes(Arrays.copyOf(value, value.length));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueType getType() {
|
||||
return ValueType.BYTES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteBuffer getValue() {
|
||||
return ByteBuffer.wrap(raw).asReadOnlyBuffer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
return Base64.getEncoder().encodeToString(raw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ValueBytes{" + asString() + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
return (o instanceof ValueBytes) && Arrays.equals(this.raw, ((ValueBytes) o).raw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Arrays.hashCode(raw);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
final class ValueDouble implements Value<Double> {
|
||||
|
||||
private final double value;
|
||||
|
||||
private ValueDouble(double value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
static Value<Double> create(double value) {
|
||||
return new ValueDouble(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueType getType() {
|
||||
return ValueType.DOUBLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ValueDouble{" + asString() + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Double.hashCode(value);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
final class ValueLong implements Value<Long> {
|
||||
|
||||
private final long value;
|
||||
|
||||
private ValueLong(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
static Value<Long> create(long value) {
|
||||
return new ValueLong(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueType getType() {
|
||||
return ValueType.LONG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ValueLong{" + asString() + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Long.hashCode(value);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
final class ValueString implements Value<String> {
|
||||
|
||||
private final String value;
|
||||
|
||||
private ValueString(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
static Value<String> create(String value) {
|
||||
Objects.requireNonNull(value, "value must not be null");
|
||||
return new ValueString(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueType getType() {
|
||||
return ValueType.STRING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ValueString{" + value + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
return (o instanceof Value) && Objects.equals(this.value, ((Value<?>) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return value.hashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.common;
|
||||
|
||||
/**
|
||||
* AnyValue type options, mirroring <a
|
||||
* href="https://github.com/open-telemetry/opentelemetry-proto/blob/ac3242b03157295e4ee9e616af53b81517b06559/opentelemetry/proto/common/v1/common.proto#L31">AnyValue#value
|
||||
* options</a>.
|
||||
*
|
||||
* @since 1.42.0
|
||||
*/
|
||||
public enum ValueType {
|
||||
STRING,
|
||||
BOOLEAN,
|
||||
LONG,
|
||||
DOUBLE,
|
||||
ARRAY,
|
||||
KEY_VALUE_LIST,
|
||||
BYTES
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.internal;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Helper for API misuse logging.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*/
|
||||
public final class ApiUsageLogger {
|
||||
|
||||
private static final Logger API_USAGE_LOGGER = Logger.getLogger(ApiUsageLogger.class.getName());
|
||||
|
||||
/**
|
||||
* Log the {@code message} to the {@link #API_USAGE_LOGGER API Usage Logger}.
|
||||
*
|
||||
* <p>Log at {@link Level#FINEST} and include a stack trace.
|
||||
*/
|
||||
public static void log(String message) {
|
||||
log(message, Level.FINEST);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the {@code message} to the {@link #API_USAGE_LOGGER API Usage Logger}.
|
||||
*
|
||||
* <p>Log includes a stack trace.
|
||||
*/
|
||||
public static void log(String message, Level level) {
|
||||
if (API_USAGE_LOGGER.isLoggable(level)) {
|
||||
API_USAGE_LOGGER.log(level, message, new AssertionError());
|
||||
}
|
||||
}
|
||||
|
||||
private ApiUsageLogger() {}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.internal;
|
||||
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Configuration utilities.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*/
|
||||
public final class ConfigUtil {
|
||||
|
||||
private ConfigUtil() {}
|
||||
|
||||
/**
|
||||
* Returns a copy of system properties which is safe to iterate over.
|
||||
*
|
||||
* <p>In java 8 and android environments, iterating through system properties may trigger {@link
|
||||
* ConcurrentModificationException}. This method ensures callers can iterate safely without risk
|
||||
* of exception. See https://github.com/open-telemetry/opentelemetry-java/issues/6732 for details.
|
||||
*/
|
||||
public static Properties safeSystemProperties() {
|
||||
return (Properties) System.getProperties().clone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the system property or environment variable for the {@code key}.
|
||||
*
|
||||
* <p>Normalize the {@code key} using {@link #normalizePropertyKey(String)}. Match to system
|
||||
* property keys also normalized with {@link #normalizePropertyKey(String)}. Match to environment
|
||||
* variable keys normalized with {@link #normalizeEnvironmentVariableKey(String)}. System
|
||||
* properties take priority over environment variables.
|
||||
*
|
||||
* @param key the property key
|
||||
* @return the system property if not null, or the environment variable if not null, or {@code
|
||||
* defaultValue}
|
||||
*/
|
||||
public static String getString(String key, String defaultValue) {
|
||||
String normalizedKey = normalizePropertyKey(key);
|
||||
|
||||
String systemProperty =
|
||||
safeSystemProperties().entrySet().stream()
|
||||
.filter(entry -> normalizedKey.equals(normalizePropertyKey(entry.getKey().toString())))
|
||||
.map(entry -> entry.getValue().toString())
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (systemProperty != null) {
|
||||
return systemProperty;
|
||||
}
|
||||
return System.getenv().entrySet().stream()
|
||||
.filter(entry -> normalizedKey.equals(normalizeEnvironmentVariableKey(entry.getKey())))
|
||||
.map(Map.Entry::getValue)
|
||||
.findFirst()
|
||||
.orElse(defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize an environment variable key by converting to lower case and replacing "_" with ".".
|
||||
*/
|
||||
public static String normalizeEnvironmentVariableKey(String key) {
|
||||
return key.toLowerCase(Locale.ROOT).replace("_", ".");
|
||||
}
|
||||
|
||||
/** Normalize a property key by converting to lower case and replacing "-" with ".". */
|
||||
public static String normalizePropertyKey(String key) {
|
||||
return key.toLowerCase(Locale.ROOT).replace("-", ".");
|
||||
}
|
||||
|
||||
/** Returns defaultValue if value is null, otherwise value. This is an internal method. */
|
||||
public static <T> T defaultIfNull(@Nullable T value, T defaultValue) {
|
||||
return value == null ? defaultValue : value;
|
||||
}
|
||||
}
|
|
@ -87,6 +87,9 @@ import java.lang.annotation.Target;
|
|||
*
|
||||
* <p>This annotation is the same provided with Jetbrains annotations and used by Nullaway for
|
||||
* verifying nullness. We copy the annotation to avoid an external dependency.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
|
|
|
@ -37,6 +37,9 @@ import java.lang.annotation.Target;
|
|||
* members, so there is no reason to publish them and we avoid requiring end users to have to depend
|
||||
* on the annotations in their own build. See the original <a
|
||||
* href="https://github.com/open-telemetry/opentelemetry-java/issues/2897">issue</a> for more info.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*/
|
||||
@Target({ElementType.FIELD, ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
|
|
|
@ -24,11 +24,15 @@ import javax.annotation.concurrent.Immutable;
|
|||
* of being "empty", you'll need to remove them before calling the constructor, assuming you don't
|
||||
* want the "empty" keys to be kept in your collection.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*
|
||||
* @param <V> The type of the values contained in this.
|
||||
*/
|
||||
@Immutable
|
||||
public abstract class ImmutableKeyValuePairs<K, V> {
|
||||
private final Object[] data;
|
||||
private int hashcode;
|
||||
|
||||
/**
|
||||
* Stores the raw object data directly. Does not do any de-duping or sorting. If you use this
|
||||
|
@ -208,6 +212,12 @@ public abstract class ImmutableKeyValuePairs<K, V> {
|
|||
// Skip entries with null value, we do it here because we want them to overwrite and remove
|
||||
// entries with same key that we already added.
|
||||
if (value == null) {
|
||||
// When the value is null, there are two cases:
|
||||
// 1. next key is the same as the current one, it may cause ArrayIndexOutOfBoundsException,
|
||||
// so we reset the previous key to null to avoid this
|
||||
// 2. next key is different than the current one; In this case, whether the previous key is
|
||||
// null or not will have no impact.
|
||||
previousKey = null;
|
||||
continue;
|
||||
}
|
||||
previousKey = key;
|
||||
|
@ -238,9 +248,13 @@ public abstract class ImmutableKeyValuePairs<K, V> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result *= 1000003;
|
||||
result ^= Arrays.hashCode(data);
|
||||
int result = hashcode;
|
||||
if (result == 0) {
|
||||
result = 1;
|
||||
result *= 1000003;
|
||||
result ^= Arrays.hashCode(data);
|
||||
hashcode = result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -260,4 +274,13 @@ public abstract class ImmutableKeyValuePairs<K, V> {
|
|||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the backing data array for these attributes. This is only exposed for internal use by
|
||||
* opentelemetry authors. The contents of the array MUST NOT be modified.
|
||||
*/
|
||||
@SuppressWarnings("AvoidObjectArrays")
|
||||
public Object[] getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,8 @@ public abstract class ImmutableSpanContext implements SpanContext {
|
|||
* @param traceFlags the trace flags of the {@code SpanContext}.
|
||||
* @param traceState the trace state for the {@code SpanContext}.
|
||||
* @param remote the remote flag for the {@code SpanContext}.
|
||||
* @param skipIdValidation pass true to skip validation of trace ID and span ID as an optimization
|
||||
* in cases where they are known to have been already validated.
|
||||
* @return a new {@code SpanContext} with the given identifiers and options.
|
||||
*/
|
||||
public static SpanContext create(
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.internal;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* Incubating utilities.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*/
|
||||
public class IncubatingUtil {
|
||||
private IncubatingUtil() {}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T incubatingApiIfAvailable(T stableApi, String incubatingClassName) {
|
||||
try {
|
||||
Class<?> incubatingClass = Class.forName(incubatingClassName);
|
||||
Method getInstance = incubatingClass.getDeclaredMethod("getNoop");
|
||||
return (T) getInstance.invoke(null);
|
||||
} catch (Exception e) {
|
||||
return stableApi;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.internal;
|
||||
|
||||
import io.opentelemetry.context.Context;
|
||||
import io.opentelemetry.context.ContextKey;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
|
||||
* any time.
|
||||
*/
|
||||
public final class InstrumentationUtil {
|
||||
private static final ContextKey<Boolean> SUPPRESS_INSTRUMENTATION_KEY =
|
||||
ContextKey.named("suppress_instrumentation");
|
||||
|
||||
private InstrumentationUtil() {}
|
||||
|
||||
/**
|
||||
* Adds a Context boolean key that will allow to identify HTTP calls coming from OTel exporters.
|
||||
* The key later be checked by an automatic instrumentation to avoid tracing OTel exporter's
|
||||
* calls.
|
||||
*/
|
||||
public static void suppressInstrumentation(Runnable runnable) {
|
||||
Context.current().with(SUPPRESS_INSTRUMENTATION_KEY, true).wrap(runnable).run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an automatic instrumentation should be suppressed with the provided Context.
|
||||
*
|
||||
* @return TRUE to suppress the automatic instrumentation, FALSE to continue with the
|
||||
* instrumentation.
|
||||
*/
|
||||
public static boolean shouldSuppressInstrumentation(Context context) {
|
||||
return Objects.equals(context.get(SUPPRESS_INSTRUMENTATION_KEY), true);
|
||||
}
|
||||
}
|
|
@ -8,6 +8,10 @@ package io.opentelemetry.api.internal;
|
|||
import java.util.Arrays;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/**
|
||||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
|
||||
* any time.
|
||||
*/
|
||||
@Immutable
|
||||
public final class OtelEncodingUtils {
|
||||
static final int LONG_BYTES = Long.SIZE / Byte.SIZE;
|
||||
|
@ -85,12 +89,17 @@ public final class OtelEncodingUtils {
|
|||
/** Returns the {@code byte[]} decoded from the given hex {@link CharSequence}. */
|
||||
public static byte[] bytesFromBase16(CharSequence value, int length) {
|
||||
byte[] result = new byte[length / 2];
|
||||
for (int i = 0; i < length; i += 2) {
|
||||
result[i / 2] = byteFromBase16(value.charAt(i), value.charAt(i + 1));
|
||||
}
|
||||
bytesFromBase16(value, length, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Fills {@code bytes} with bytes decoded from the given hex {@link CharSequence}. */
|
||||
public static void bytesFromBase16(CharSequence value, int length, byte[] bytes) {
|
||||
for (int i = 0; i < length; i += 2) {
|
||||
bytes[i / 2] = byteFromBase16(value.charAt(i), value.charAt(i + 1));
|
||||
}
|
||||
}
|
||||
|
||||
/** Fills {@code dest} with the hex encoding of {@code bytes}. */
|
||||
public static void bytesToBase16(byte[] bytes, char[] dest, int length) {
|
||||
for (int i = 0; i < length; i++) {
|
||||
|
|
|
@ -18,9 +18,8 @@
|
|||
* the License.
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.baggage.propagation;
|
||||
package io.opentelemetry.api.internal;
|
||||
|
||||
import io.opentelemetry.api.internal.TemporaryBuffers;
|
||||
import javax.annotation.CheckForNull;
|
||||
|
||||
/**
|
||||
|
@ -59,10 +58,13 @@ import javax.annotation.CheckForNull;
|
|||
* <p><b>Note:</b> This escaper produces <a
|
||||
* href="https://url.spec.whatwg.org/#percent-encode">uppercase</a> hexadecimal sequences.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*
|
||||
* @author David Beaumont
|
||||
* @since 15.0
|
||||
*/
|
||||
final class PercentEscaper {
|
||||
public final class PercentEscaper {
|
||||
|
||||
/** The amount of padding (chars) to use when growing the escape buffer. */
|
||||
private static final int DEST_PAD = 32;
|
||||
|
@ -86,7 +88,7 @@ final class PercentEscaper {
|
|||
private static final boolean[] safeOctets = createSafeOctets(SAFE_CHARS);
|
||||
|
||||
/** The default {@link PercentEscaper} which will *not* replace spaces with plus signs. */
|
||||
static PercentEscaper create() {
|
||||
public static PercentEscaper create() {
|
||||
return new PercentEscaper();
|
||||
}
|
||||
|
||||
|
@ -109,7 +111,7 @@ final class PercentEscaper {
|
|||
}
|
||||
|
||||
/** Escape the provided String, using percent-style URL Encoding. */
|
||||
String escape(String s) {
|
||||
public String escape(String s) {
|
||||
int slen = s.length();
|
||||
for (int index = 0; index < slen; index++) {
|
||||
char c = s.charAt(index);
|
|
@ -31,7 +31,12 @@ import java.util.NoSuchElementException;
|
|||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/** A read-only view of an array of key-value pairs. */
|
||||
/**
|
||||
* A read-only view of an array of key-value pairs.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public final class ReadOnlyArrayMap<K, V> extends AbstractMap<K, V> {
|
||||
|
||||
|
|
|
@ -7,7 +7,12 @@ package io.opentelemetry.api.internal;
|
|||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/** General internal utility methods. */
|
||||
/**
|
||||
* General internal utility methods.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*/
|
||||
@Immutable
|
||||
public final class Utils {
|
||||
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.logs;
|
||||
|
||||
import io.opentelemetry.api.common.AttributeKey;
|
||||
import io.opentelemetry.api.common.Value;
|
||||
import io.opentelemetry.context.Context;
|
||||
import java.time.Instant;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class DefaultLogger implements Logger {
|
||||
|
||||
private static final Logger INSTANCE = new DefaultLogger();
|
||||
private static final LogRecordBuilder NOOP_LOG_RECORD_BUILDER = new NoopLogRecordBuilder();
|
||||
|
||||
private DefaultLogger() {}
|
||||
|
||||
static Logger getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder logRecordBuilder() {
|
||||
return NOOP_LOG_RECORD_BUILDER;
|
||||
}
|
||||
|
||||
private static final class NoopLogRecordBuilder implements LogRecordBuilder {
|
||||
|
||||
private NoopLogRecordBuilder() {}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setTimestamp(long timestamp, TimeUnit unit) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setTimestamp(Instant instant) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setObservedTimestamp(long timestamp, TimeUnit unit) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setObservedTimestamp(Instant instant) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setContext(Context context) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setSeverity(Severity severity) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setSeverityText(String severityText) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setBody(String body) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogRecordBuilder setBody(Value<?> body) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> LogRecordBuilder setAttribute(AttributeKey<T> key, @Nullable T value) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void emit() {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.logs;
|
||||
|
||||
class DefaultLoggerProvider implements LoggerProvider {
|
||||
|
||||
private static final LoggerProvider INSTANCE = new DefaultLoggerProvider();
|
||||
private static final LoggerBuilder NOOP_BUILDER = new NoopLoggerBuilder();
|
||||
|
||||
private DefaultLoggerProvider() {}
|
||||
|
||||
static LoggerProvider getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerBuilder loggerBuilder(String instrumentationScopeName) {
|
||||
return NOOP_BUILDER;
|
||||
}
|
||||
|
||||
private static class NoopLoggerBuilder implements LoggerBuilder {
|
||||
|
||||
@Override
|
||||
public LoggerBuilder setSchemaUrl(String schemaUrl) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoggerBuilder setInstrumentationVersion(String instrumentationVersion) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Logger build() {
|
||||
return DefaultLogger.getInstance();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,215 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.logs;
|
||||
|
||||
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
|
||||
import static io.opentelemetry.api.common.AttributeKey.doubleKey;
|
||||
import static io.opentelemetry.api.common.AttributeKey.longKey;
|
||||
import static io.opentelemetry.api.common.AttributeKey.stringKey;
|
||||
|
||||
import io.opentelemetry.api.common.AttributeKey;
|
||||
import io.opentelemetry.api.common.Attributes;
|
||||
import io.opentelemetry.api.common.Value;
|
||||
import io.opentelemetry.context.Context;
|
||||
import java.time.Instant;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Used to construct and emit log records from a {@link Logger}.
|
||||
*
|
||||
* <p>Obtain a {@link Logger#logRecordBuilder()}, add properties using the setters, and emit the log
|
||||
* record by calling {@link #emit()}.
|
||||
*
|
||||
* @since 1.27.0
|
||||
*/
|
||||
public interface LogRecordBuilder {
|
||||
|
||||
/**
|
||||
* Set the epoch {@code timestamp}, using the timestamp and unit.
|
||||
*
|
||||
* <p>The {@code timestamp} is the time at which the log record occurred. If unset, it will be set
|
||||
* to the current time when {@link #emit()} is called.
|
||||
*/
|
||||
LogRecordBuilder setTimestamp(long timestamp, TimeUnit unit);
|
||||
|
||||
/**
|
||||
* Set the epoch {@code timestamp}, using the instant.
|
||||
*
|
||||
* <p>The {@code timestamp} is the time at which the log record occurred. If unset, it will be set
|
||||
* to the current time when {@link #emit()} is called.
|
||||
*/
|
||||
LogRecordBuilder setTimestamp(Instant instant);
|
||||
|
||||
/**
|
||||
* Set the epoch {@code observedTimestamp}, using the timestamp and unit.
|
||||
*
|
||||
* <p>The {@code observedTimestamp} is the time at which the log record was observed. If unset, it
|
||||
* will be set to the {@code timestamp}. {@code observedTimestamp} may be different from {@code
|
||||
* timestamp} if logs are being processed asynchronously (e.g. from a file or on a different
|
||||
* thread).
|
||||
*/
|
||||
LogRecordBuilder setObservedTimestamp(long timestamp, TimeUnit unit);
|
||||
|
||||
/**
|
||||
* Set the {@code observedTimestamp}, using the instant.
|
||||
*
|
||||
* <p>The {@code observedTimestamp} is the time at which the log record was observed. If unset, it
|
||||
* will be set to the {@code timestamp}. {@code observedTimestamp} may be different from {@code
|
||||
* timestamp} if logs are being processed asynchronously (e.g. from a file or on a different
|
||||
* thread).
|
||||
*/
|
||||
LogRecordBuilder setObservedTimestamp(Instant instant);
|
||||
|
||||
/** Set the context. */
|
||||
LogRecordBuilder setContext(Context context);
|
||||
|
||||
/** Set the severity. */
|
||||
LogRecordBuilder setSeverity(Severity severity);
|
||||
|
||||
/** Set the severity text. */
|
||||
LogRecordBuilder setSeverityText(String severityText);
|
||||
|
||||
/**
|
||||
* Set the body string.
|
||||
*
|
||||
* <p>Shorthand for calling {@link #setBody(Value)} with {@link Value#of(String)}.
|
||||
*/
|
||||
LogRecordBuilder setBody(String body);
|
||||
|
||||
/**
|
||||
* Set the body {@link Value}.
|
||||
*
|
||||
* @since 1.42.0
|
||||
*/
|
||||
default LogRecordBuilder setBody(Value<?> body) {
|
||||
setBody(body.asString());
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets attributes. If the {@link LogRecordBuilder} previously contained a mapping for any of the
|
||||
* keys, the old values are replaced by the specified values.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
default LogRecordBuilder setAllAttributes(Attributes attributes) {
|
||||
if (attributes == null || attributes.isEmpty()) {
|
||||
return this;
|
||||
}
|
||||
attributes.forEach(
|
||||
(attributeKey, value) -> setAttribute((AttributeKey<Object>) attributeKey, value));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an attribute on the {@code LogRecord}. If the {@code LogRecord} previously contained a
|
||||
* mapping for the key, the old value is replaced by the specified value.
|
||||
*
|
||||
* <p>Note: Providing a null value is a no-op and will not remove previously set values.
|
||||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
*/
|
||||
<T> LogRecordBuilder setAttribute(AttributeKey<T> key, @Nullable T value);
|
||||
|
||||
/**
|
||||
* Sets a String attribute on the {@code LogRecord}. If the {@code LogRecord} previously contained
|
||||
* a mapping for the key, the old value is replaced by the specified value.
|
||||
*
|
||||
* <p>Note: Providing a null value is a no-op and will not remove previously set values.
|
||||
*
|
||||
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
|
||||
* pre-allocate your keys, if possible.
|
||||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @since 1.48.0
|
||||
*/
|
||||
default LogRecordBuilder setAttribute(String key, @Nullable String value) {
|
||||
return setAttribute(stringKey(key), value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a Long attribute on the {@code LogRecord}. If the {@code LogRecord} previously contained a
|
||||
* mapping for the key, the old value is replaced by the specified value.
|
||||
*
|
||||
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
|
||||
* pre-allocate your keys, if possible.
|
||||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @since 1.48.0
|
||||
*/
|
||||
default LogRecordBuilder setAttribute(String key, long value) {
|
||||
return setAttribute(longKey(key), value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a Double attribute on the {@code LogRecord}. If the {@code LogRecord} previously contained
|
||||
* a mapping for the key, the old value is replaced by the specified value.
|
||||
*
|
||||
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
|
||||
* pre-allocate your keys, if possible.
|
||||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @since 1.48.0
|
||||
*/
|
||||
default LogRecordBuilder setAttribute(String key, double value) {
|
||||
return setAttribute(doubleKey(key), value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a Boolean attribute on the {@code LogRecord}. If the {@code LogRecord} previously
|
||||
* contained a mapping for the key, the old value is replaced by the specified value.
|
||||
*
|
||||
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
|
||||
* pre-allocate your keys, if possible.
|
||||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @since 1.48.0
|
||||
*/
|
||||
default LogRecordBuilder setAttribute(String key, boolean value) {
|
||||
return setAttribute(booleanKey(key), value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an Integer attribute on the {@code LogRecord}. If the {@code LogRecord} previously
|
||||
* contained a mapping for the key, the old value is replaced by the specified value.
|
||||
*
|
||||
* <p>Note: It is strongly recommended to use {@link #setAttribute(AttributeKey, Object)}, and
|
||||
* pre-allocate your keys, if possible.
|
||||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @since 1.48.0
|
||||
*/
|
||||
default LogRecordBuilder setAttribute(String key, int value) {
|
||||
return setAttribute(key, (long) value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the event name, which identifies the class / type of the Event.
|
||||
*
|
||||
* <p>This name should uniquely identify the event structure (both attributes and body). A log
|
||||
* record with a non-empty event name is an Event.
|
||||
*
|
||||
* @since 1.50.0
|
||||
*/
|
||||
default LogRecordBuilder setEventName(String eventName) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Emit the log record. */
|
||||
void emit();
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.logs;
|
||||
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/**
|
||||
* A {@link Logger} is the entry point into a log pipeline.
|
||||
*
|
||||
* <p>Obtain a {@link #logRecordBuilder()}, add properties using the setters, and emit it via {@link
|
||||
* LogRecordBuilder#emit()}.
|
||||
*
|
||||
* <p>The OpenTelemetry logs bridge API exists to enable bridging logs from other log frameworks
|
||||
* (e.g. SLF4J, Log4j, JUL, Logback, etc) into OpenTelemetry and is <b>NOT</b> a replacement log
|
||||
* API.
|
||||
*
|
||||
* @since 1.27.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface Logger {
|
||||
|
||||
/**
|
||||
* Return a {@link LogRecordBuilder} to emit a log record.
|
||||
*
|
||||
* <p><b>IMPORTANT:</b> this should be used to write appenders to bridge logs from logging
|
||||
* frameworks (e.g. SLF4J, Log4j, JUL, Logback, etc). It is <b>NOT</b> a replacement for an
|
||||
* application logging framework, and should not be used by application developers.
|
||||
*
|
||||
* <p>Build the log record using the {@link LogRecordBuilder} setters, and emit via {@link
|
||||
* LogRecordBuilder#emit()}.
|
||||
*/
|
||||
LogRecordBuilder logRecordBuilder();
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.api.logs;
|
||||
|
||||
/**
|
||||
* Builder class for creating {@link Logger} instances.
|
||||
*
|
||||
* <p>{@link Logger}s are identified by their scope name, version, and schema URL. These identifying
|
||||
* fields, along with attributes, combine to form the instrumentation scope, which is attached to
|
||||
* all log records produced by the {@link Logger}.
|
||||
*
|
||||
* @since 1.27.0
|
||||
*/
|
||||
public interface LoggerBuilder {
|
||||
|
||||
/**
|
||||
* Set the scope schema URL of the resulting {@link Logger}. Schema URL is part of {@link Logger}
|
||||
* identity.
|
||||
*
|
||||
* @param schemaUrl The schema URL.
|
||||
* @return this
|
||||
*/
|
||||
LoggerBuilder setSchemaUrl(String schemaUrl);
|
||||
|
||||
/**
|
||||
* Sets the instrumentation scope version of the resulting {@link Logger}. Version is part of
|
||||
* {@link Logger} identity.
|
||||
*
|
||||
* @param instrumentationScopeVersion The instrumentation scope version.
|
||||
* @return this
|
||||
*/
|
||||
LoggerBuilder setInstrumentationVersion(String instrumentationScopeVersion);
|
||||
|
||||
/**
|
||||
* Gets or creates a {@link Logger} instance.
|
||||
*
|
||||
* @return a {@link Logger} instance configured with the provided options.
|
||||
*/
|
||||
Logger build();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue