Commit 179e4b0
[SDK] Fix BatchSpanProcessorOptions and BatchLogRecordProcessorOptions to restore C++20 aggregate initialization support (#3780)
* Initial plan
* Fix BatchSpanProcessorOptions to restore C++20 aggregate initialization support
- Remove user-defined constructor that prevented C++20 designated initializers
- Add inline helper functions in batch_span_processor_options_env namespace
- Use default member initializers calling the helper functions
- Update tests with corrected default values (2048 for max_queue_size, 30000ms for export_timeout)
- Add test for aggregate initialization and C++20 designated initializers
Co-authored-by: lalitb <[email protected]>
* Update PR progress
Co-authored-by: lalitb <[email protected]>
* Remove accidentally committed CodeQL build artifacts and update .gitignore
Co-authored-by: lalitb <[email protected]>
* Fix C++14 compatibility: remove inline variables from header
Move constants inside inline functions to avoid using inline variables
which are a C++17 feature not available in C++14.
Co-authored-by: lalitb <[email protected]>
* Fix Windows DLL compatibility: move helper functions to .cc files
- Move env helper function implementations from header to .cc files
- Declare helper functions with OPENTELEMETRY_EXPORT in header
- Apply the same pattern to BatchLogRecordProcessorOptions
- Add comprehensive documentation to both options structs
- Fix "to to" typo in BatchSpanProcessorOptions documentation
This fixes the Windows single DLL build issue by avoiding inline
functions in header files that are called from default member
initializers.
Co-authored-by: lalitb <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: lalitb <[email protected]>1 parent 17ffe4e commit 179e4b0
File tree
6 files changed
+218
-63
lines changed- sdk
- include/opentelemetry/sdk
- logs
- trace
- src
- logs
- trace
- test/trace
6 files changed
+218
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
Lines changed: 46 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
18 | 39 | | |
19 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
20 | 56 | | |
21 | 57 | | |
22 | 58 | | |
23 | | - | |
24 | 59 | | |
25 | | - | |
| 60 | + | |
26 | 61 | | |
27 | 62 | | |
28 | | - | |
| 63 | + | |
29 | 64 | | |
30 | 65 | | |
31 | | - | |
| 66 | + | |
| 67 | + | |
32 | 68 | | |
33 | 69 | | |
34 | | - | |
35 | | - | |
| 70 | + | |
| 71 | + | |
36 | 72 | | |
37 | 73 | | |
38 | | - | |
| 74 | + | |
| 75 | + | |
39 | 76 | | |
40 | 77 | | |
41 | 78 | | |
42 | 79 | | |
43 | 80 | | |
44 | | - | |
| 81 | + | |
| 82 | + | |
45 | 83 | | |
46 | 84 | | |
47 | 85 | | |
| |||
Lines changed: 52 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
17 | 39 | | |
18 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
19 | 63 | | |
20 | 64 | | |
21 | 65 | | |
22 | | - | |
23 | 66 | | |
24 | 67 | | |
25 | 68 | | |
26 | 69 | | |
27 | | - | |
| 70 | + | |
28 | 71 | | |
29 | 72 | | |
30 | | - | |
| 73 | + | |
| 74 | + | |
31 | 75 | | |
32 | 76 | | |
33 | | - | |
34 | | - | |
| 77 | + | |
| 78 | + | |
35 | 79 | | |
36 | 80 | | |
37 | | - | |
| 81 | + | |
| 82 | + | |
38 | 83 | | |
39 | 84 | | |
40 | 85 | | |
41 | 86 | | |
42 | 87 | | |
43 | | - | |
| 88 | + | |
44 | 89 | | |
45 | 90 | | |
46 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| |||
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| |||
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
0 commit comments