-
Notifications
You must be signed in to change notification settings - Fork 501
Description
Hi,
In the context of a build using CMake (I definitely don't know about the other build systems), we end up with some macros being defined to build both opentelemetry itself and proprietary code depending on opentelemetry. For example at the end of the CMake build, we have in a generated CMake flags file (most likely a CMake implementation detail), something like this:
./sdk/src/common/CMakeFiles/opentelemetry_common.dir/flags.make:5:CXX_DEFINES = -DENABLE_ASYNC_EXPORT -DENABLE_OTLP_COMPRESSION_PREVIEW -DOPENTELEMETRY_ABI_VERSION_NO=1 -DOPENTELEMETRY_STL_VERSION=2017
And here we can see we have a mix of "namespaced" macros (ie OPENTELEMETRY_ABI_VERSION_NO
) and "non-namespaced" ones (ie ENABLE_ASYNC_EXPORT
).
In our company we got today a pull request of someone adding explicitly the -DENABLE_ASYNC_EXPORT
compilation flag in our internal build system (which isn't CMake), and I argued that this macro name is far too generic, it should have some kind of OPENTELEMTRY_
prefix, to "namespace" it, and make it avoid any collision with any other open source or proprietary code.
Would you accept a pull request adding this prefix to these macros (and maybe more if we find more) ? Are these macros part of the "public API" ? I hope not :D
Thanks,
Romain