tracing: Configure tracer from v2 proto configuration#4518
tracing: Configure tracer from v2 proto configuration#4518mattklein123 merged 4 commits intoenvoyproxy:masterfrom
Conversation
ffe6c4b to
079a3c5
Compare
There was a problem hiding this comment.
Wondering whether this field should be changed to BoolValue wrapper? The default is currently false, but in the future we may want to change that to true as 128bit ids are becoming more common.
There was a problem hiding this comment.
It might not worth, changing bool to BoolValue is a backward incompatible change so you'll need to follow deprecation process, changing default to true is another breaking change I guess?
There was a problem hiding this comment.
Agree - so will leave for now and wait for it to be raised as an issue.
There was a problem hiding this comment.
Can you factor out this to Server::Configuration and let the interface have createEmptyProto as well, just like other extensions? This will make extension interface stable and easier for #4475.
Signed-off-by: Gary Brown <gary@brownuk.com>
Signed-off-by: Gary Brown <gary@brownuk.com>
079a3c5 to
2a8658e
Compare
|
@lizan Fix applied - not sure why the ipv6_tests failed - do you have permissions to rerun? |
| Server::Instance& server) override; | ||
|
|
||
| ProtobufTypes::MessagePtr createEmptyConfigProto() override { | ||
| return ProtobufTypes::MessagePtr{new envoy::config::trace::v2::DynamicOtConfig()}; |
| Tracing::DriverPtr lightstep_driver{new LightStepDriver{ | ||
| json_config, server.clusterManager(), server.stats(), server.threadLocal(), server.runtime(), | ||
| std::move(opts), Common::Ot::OpenTracingDriver::PropagationMode::TracerNative}}; | ||
| Tracing::DriverPtr lightstep_driver{ |
There was a problem hiding this comment.
Sorry missed that.
| Server::Instance& server) override; | ||
|
|
||
| ProtobufTypes::MessagePtr createEmptyConfigProto() override { | ||
| return ProtobufTypes::MessagePtr{new envoy::config::trace::v2::LightstepConfig()}; |
There was a problem hiding this comment.
It might not worth, changing bool to BoolValue is a backward incompatible change so you'll need to follow deprecation process, changing default to true is another breaking change I guess?
| dynamic_cast<const envoy::config::trace::v2::DynamicOtConfig&>(*config_ptr); | ||
|
|
||
| const std::string library = dynaot_config.library(); | ||
| Json::ObjectSharedPtr json_config = MessageUtil::getJsonObjectFromMessage(dynaot_config.config()); |
There was a problem hiding this comment.
use MessageUtil::getJsonStringFromMessage
Signed-off-by: Gary Brown <gary@brownuk.com>
|
@lizan Test failed due to "No space left on device" |
| Tracing::DriverPtr lightstep_driver{new LightStepDriver{ | ||
| json_config, server.clusterManager(), server.stats(), server.threadLocal(), server.runtime(), | ||
| std::move(opts), Common::Ot::OpenTracingDriver::PropagationMode::TracerNative}}; | ||
| Tracing::DriverPtr lightstep_driver{ |
| Server::Instance& server) override; | ||
|
|
||
| ProtobufTypes::MessagePtr createEmptyConfigProto() override { | ||
| return ProtobufTypes::MessagePtr{std::make_unique<envoy::config::trace::v2::LightstepConfig>()}; |
There was a problem hiding this comment.
I think you can just return std::make_unique<...>(); without wrapping into MessagePtr
Signed-off-by: Gary Brown <gary@brownuk.com>
|
@lizan hopefully all sorted now. |
mattklein123
left a comment
There was a problem hiding this comment.
Nice, thanks for cleaning this up.
Signed-off-by: Gary Brown <gary@brownuk.com> Signed-off-by: Aaltan Ahmad <aa@stripe.com>
Description:
Use v2 proto config to configure the tracer.
Risk Level: medium
Testing:
Updated the unit tests to use yaml and the v2 proto model.
Fixes #3459