-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accesslog: implement TCP gRPC access logger (#7941)
Description: Initial implementation for TCP gRPC access logger. Risk Level: Low (extension only) Testing: integration test Docs Changes: Added Release Notes: Added Signed-off-by: Lizan Zhou <lizan@tetrate.io>
- Loading branch information
Showing
26 changed files
with
564 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "extensions/access_loggers/grpc/config_utils.h" | ||
|
||
#include "envoy/singleton/manager.h" | ||
|
||
namespace Envoy { | ||
namespace Extensions { | ||
namespace AccessLoggers { | ||
namespace GrpcCommon { | ||
|
||
// Singleton registration via macro defined in envoy/singleton/manager.h | ||
SINGLETON_MANAGER_REGISTRATION(grpc_access_logger_cache); | ||
|
||
std::shared_ptr<GrpcCommon::GrpcAccessLoggerCache> | ||
getGrpcAccessLoggerCacheSingleton(Server::Configuration::FactoryContext& context) { | ||
return context.singletonManager().getTyped<GrpcCommon::GrpcAccessLoggerCache>( | ||
SINGLETON_MANAGER_REGISTERED_NAME(grpc_access_logger_cache), [&context] { | ||
return std::make_shared<GrpcCommon::GrpcAccessLoggerCacheImpl>( | ||
context.clusterManager().grpcAsyncClientManager(), context.scope(), | ||
context.threadLocal(), context.localInfo()); | ||
}); | ||
} | ||
} // namespace GrpcCommon | ||
} // namespace AccessLoggers | ||
} // namespace Extensions | ||
} // namespace Envoy |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#pragma once | ||
|
||
#include "envoy/server/filter_config.h" | ||
|
||
#include "extensions/access_loggers/grpc/grpc_access_log_impl.h" | ||
|
||
namespace Envoy { | ||
namespace Extensions { | ||
namespace AccessLoggers { | ||
namespace GrpcCommon { | ||
|
||
GrpcAccessLoggerCacheSharedPtr | ||
getGrpcAccessLoggerCacheSingleton(Server::Configuration::FactoryContext& context); | ||
|
||
} // namespace GrpcCommon | ||
} // namespace AccessLoggers | ||
} // namespace Extensions | ||
} // namespace Envoy |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.