Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build OpenTelemetry C++ SDK and exporter into DLL #1932
Build OpenTelemetry C++ SDK and exporter into DLL #1932
Changes from 47 commits
dbd818d
468c189
011d96e
435e88b
27d8a5c
52ab127
db962d0
3178916
01c8dd2
1572f17
f8ee55a
16b2011
d61520d
1ad93bd
0af8403
aa09118
767a4f1
d14227f
9295d6b
86bb52c
321359d
e79a554
5c3c5e5
1c54eb6
1fc1467
eebe85b
6cda6e5
44ca55a
91bfd07
20cceb7
fcb7f22
d1cab2c
7f1cfd7
b3c4029
1a8d6eb
bcc3909
86ea207
4b1c991
9312aef
2260a1b
8bd4fab
36e1ece
e98815f
594f289
ecddf7c
f6ab0fc
059e2e6
c23051f
bacc3b6
e4965a9
0b858a6
5ecbf16
bca6227
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am convinced this part can be simplified.
Once OPENTELEMETRY_BUILD_DDL is defined, the build uses a DDL.
The user code should not have to define OPENTELEMETRY_BUILD_IMPORT_DDL.
Instead, the makefiles in opentelemetry-cpp should know when a file that belong to the DDL is compiled (EXPORT) or when a file that does not belong to the DDL is compiled (IMPORT).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user mode can also built with the exiting static library which is default, so we need a new macro to guard referencing the DLL, so we don't break any existing users' instrumentation code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying one more time with code, to make my suggestion more clear.
The choice between import and export is driven by which file is compiled, not by the user code.
In CMakeList.txt:
In macro.h:
And then, when compiling every file that is part of the DLL:
File
sdk/src/trace/CMakeLists.txt
This totally avoids user to add
OPENTELEMETRY_BUILD_IMPORT_DLL
.