Should configuration macro be named OPENTELEMETRY_XXX instead of just XXX ? #3084
Labels
bug
Something isn't working
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
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:
And here we can see we have a mix of "namespaced" macros (ie
OPENTELEMETRY_ABI_VERSION_NO
) and "non-namespaced" ones (ieENABLE_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 ofOPENTELEMTRY_
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
The text was updated successfully, but these errors were encountered: