-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
dubbo tracing support #17601
Comments
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
Hi, I'm trying to add a filter of dubbo, like the Router do, for learning purpose. Currently only want to read from config and log something. So, I created a filter, I want to read config using the DubboFilters::FilterFactoryCb LalalaFilterConfig::createFilterFactoryFromProtoTyped(
[[maybe_unused]] const envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager::Tracing& proto,
[[maybe_unused]] const std::string& stat_prefix,
Server::Configuration::FactoryContext& context) {
// log proto...
return [&context](DubboFilters::FilterChainFactoryCallbacks& callbacks) -> void {
callbacks.addFilter(std::make_shared<Lalala>(context.clusterManager()));
};
}
Is there some docs about this? Or there already some other filters, codes that did things like this, that I can imitate? P.S.: I tried config type using protobuf ========== I solved myself 💌. I missed dubbo_filters:
- name: envoy.filters.dubbo.router
- name: lalala
config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing
provider:
name: envoy.tracers.skywalking
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v3.SkyWalkingConfig
grpc_service:
envoy_grpc:
cluster_name: skywalking-oap
timeout: 0.250s
client_config:
service_name: lalala-sidecar It built and run. I can read config settings in my filter factory. |
Hi @wbpcode , If I want to achieve tracing for dubbo_proxy, for the filter's config, I can just reuse the Did I get it wrong? |
I think it'ok to reuse the exist |
Hi @wbpcode ,
envoy/source/extensions/filters/network/http_connection_manager/config.cc Lines 190 to 195 in 5313fa4
I want to use the factory to create tracer implementation object like the http connection manager do. It uses singleton mechanism. Should I import this in dubbo proxy, to reuse the singleton http_tracer_manager instance, or to imitate it, give a DubboFilters::FilterFactoryCb LalalaFilterConfig::createFilterFactoryFromProtoTyped(
const envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager::
Tracing& proto,
const std::string&, Server::Configuration::FactoryContext& context) {
Tracing::HttpTracerSharedPtr tracer = nullptr;
if (proto.has_provider()) {
Utility::Singletons singletons = Utility::createSingletons(context);
tracer = singletons.dubbo_tracer_manager_->getOrCreateHttpTracer(&proto.provider());
}
return [&context, tracer](DubboFilters::FilterChainFactoryCallbacks& callbacks) -> void {
callbacks.addFilter(std::make_shared<Lalala>(context.clusterManager(), tracer));
};
}
SINGLETON_MANAGER_REGISTRATION(dubbo_tracer_manager);
Utility::Singletons Utility::createSingletons(Server::Configuration::FactoryContext& context) {
auto dubbo_tracer_manager = context.singletonManager().getTyped<Tracing::HttpTracerManagerImpl>(
SINGLETON_MANAGER_REGISTERED_NAME(dubbo_tracer_manager), [&context] {
return std::make_shared<Tracing::HttpTracerManagerImpl>(
std::make_unique<Tracing::TracerFactoryContextImpl>(
context.getServerFactoryContext(), context.messageValidationVisitor()));
});
return {dubbo_tracer_manager};
} If import and reuse, the trade off is initialized some other object like the Need some suggestion. Thanks. |
Signed-off-by: lizhen <[email protected]>
Basically, this could be achieved by the new generic proxy-based dubbo proxy. So, I will close it. If someone still want this, ping me to reopen it or create a new issue. |
has Dubbo trace supported now? |
cc @cwww3 sorry, but I won't add new feature to IMO, it's recommend to use the new |
After #16049 is completed, tracers can be used by various proxies, not just limited to HTTP. In envoy, now it is possible to trace dubbo/thrift streams as well as HTTP requests.
Dubbo Proxy would be a good start.
The text was updated successfully, but these errors were encountered: