Support conditional use of Abseil's string_view and optional, for Envoy.#7
Merged
Merged
Conversation
cataphract
pushed a commit
to cataphract/dd-trace-cpp
that referenced
this pull request
Mar 28, 2024
* chmod the built .so (not sure if it matters) * avoid use of ngx_core_conf_t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
envoyproxy/envoy#23958 revealed that Envoy's linter doesn't like
std::string_vieworstd::optional, preferring the Abseilabsl::*versions instead.For
std::string_view, there is aNOLINTexception, but forstd::optionalthere is not.This pull request adds a level of indirection for each of string view and optional, namely
src/datadog/{string_view,optional}.h, which define the type and type templatedatadog::tracing::StringViewanddatadog::tracing::Optional, respectively.The default behavior, when the
DD_USE_ABSEIL_FOR_ENVOYpreprocessor macro is not defined, is for the Datadog-specific types to be aliases for thestdtypes.In Bazel builds, such as Envoy's,
DD_USE_ABSEIL_FOR_ENVOYis defined. This make the Datadog-specific types aliases for theabsltypes.