-
Notifications
You must be signed in to change notification settings - Fork 4
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
GRPC Agent #203
GRPC Agent #203
Conversation
santigimeno
commented
Oct 28, 2024
6346451
to
5364e4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff.
void InitGrpcAgent(Local<Object> exports, | ||
Local<Value> unused, | ||
Local<Context> context, | ||
void* priv) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: left alignment.
const ProfileType& type, | ||
ProfileOptions& options); // NOLINT(runtime/references) | ||
|
||
// ErrorType do_start_prof(const grpcagent::CommandRequest& req, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be removed, or was it for something we'll need in the future?
The static `GrpcClient` namespace exposes multiple methods implementing part of the NSolidService rpc's. - The `MakeChannel()` methods, which accepts `OtlpGrpcClientOptions` as a param, which allows creating a gRPC channel. - The `MakeClientContext()` method which ºsets up a gRPC client context with metadata: `nsolid-agent-id: agent_id` and `nsolid-saas-token: token`. - The `MakeNSolidServiceStub` method which creates a stub for the N|Solid service to facilitate communication with the N|Solid Console. - The `DelegateAsyncExport()` methods which perform all the unary rpc calls defined in `NSolidService`.
It implements the bi-directional `Command` rpc using the gRPC Callback API by inheriting from `grpc::ClientBidiReactor<grpcagent::CommandResponse,grpcagent::CommandRequest>`. Also add `nsolid_grpc_agent` as a "debuggable` native module.
It implements the gRPC Client Streaming `ExportAsset` rpc using the gRPC Callback API by inheriting from `grpc::ClientWriteReactor<grpcagent::Asset>`.
9c02817
to
a657715
Compare
This implementation, in principle, implements exactly the same functionality the `ZmqAgent` provides. Expanded the `ProfileOptionsBase` to add `google::protobuf::Struct metadata_pb`, so the metadata can be stored as a protobuf struct.
They implement the asset collection API's mirroring the bindings in the `ZmqAgent`.
For now the integration looks like this: The `NSOLID_GRPC` env variable needs to be set to enable the agent. Its value can be interpreted in 2 different ways: - If a SaaS token is provided (via NSOLID_SAAS for example), its value has no meaning but "enable gRPC Agent". - Otoh, if no SaaS token is provided, its contents are parsed as the endpoint the `gRPCAgent` should connect to.
a657715
to
dbf23fa
Compare
It should be a valid URL otherwise, `opentelemetry-cpp` `URLParser` will throw. Also fixed handling of `grpc` configuration via package.json.
dbf23fa
to
4b4e5d4
Compare
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
The static `GrpcClient` namespace exposes multiple methods implementing part of the NSolidService rpc's. - The `MakeChannel()` methods, which accepts `OtlpGrpcClientOptions` as a param, which allows creating a gRPC channel. - The `MakeClientContext()` method which ºsets up a gRPC client context with metadata: `nsolid-agent-id: agent_id` and `nsolid-saas-token: token`. - The `MakeNSolidServiceStub` method which creates a stub for the N|Solid service to facilitate communication with the N|Solid Console. - The `DelegateAsyncExport()` methods which perform all the unary rpc calls defined in `NSolidService`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It implements the bi-directional `Command` rpc using the gRPC Callback API by inheriting from `grpc::ClientBidiReactor<grpcagent::CommandResponse,grpcagent::CommandRequest>`. Also add `nsolid_grpc_agent` as a "debuggable` native module. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It implements the gRPC Client Streaming `ExportAsset` rpc using the gRPC Callback API by inheriting from `grpc::ClientWriteReactor<grpcagent::Asset>`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
This implementation, in principle, implements exactly the same functionality the `ZmqAgent` provides. Expanded the `ProfileOptionsBase` to add `google::protobuf::Struct metadata_pb`, so the metadata can be stored as a protobuf struct. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
They implement the asset collection API's mirroring the bindings in the `ZmqAgent`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
For now the integration looks like this: The `NSOLID_GRPC` env variable needs to be set to enable the agent. Its value can be interpreted in 2 different ways: - If a SaaS token is provided (via NSOLID_SAAS for example), its value has no meaning but "enable gRPC Agent". - Otoh, if no SaaS token is provided, its contents are parsed as the endpoint the `gRPCAgent` should connect to. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
The static `GrpcClient` namespace exposes multiple methods implementing part of the NSolidService rpc's. - The `MakeChannel()` methods, which accepts `OtlpGrpcClientOptions` as a param, which allows creating a gRPC channel. - The `MakeClientContext()` method which ºsets up a gRPC client context with metadata: `nsolid-agent-id: agent_id` and `nsolid-saas-token: token`. - The `MakeNSolidServiceStub` method which creates a stub for the N|Solid service to facilitate communication with the N|Solid Console. - The `DelegateAsyncExport()` methods which perform all the unary rpc calls defined in `NSolidService`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It implements the bi-directional `Command` rpc using the gRPC Callback API by inheriting from `grpc::ClientBidiReactor<grpcagent::CommandResponse,grpcagent::CommandRequest>`. Also add `nsolid_grpc_agent` as a "debuggable` native module. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It implements the gRPC Client Streaming `ExportAsset` rpc using the gRPC Callback API by inheriting from `grpc::ClientWriteReactor<grpcagent::Asset>`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
This implementation, in principle, implements exactly the same functionality the `ZmqAgent` provides. Expanded the `ProfileOptionsBase` to add `google::protobuf::Struct metadata_pb`, so the metadata can be stored as a protobuf struct. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
They implement the asset collection API's mirroring the bindings in the `ZmqAgent`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
For now the integration looks like this: The `NSOLID_GRPC` env variable needs to be set to enable the agent. Its value can be interpreted in 2 different ways: - If a SaaS token is provided (via NSOLID_SAAS for example), its value has no meaning but "enable gRPC Agent". - Otoh, if no SaaS token is provided, its contents are parsed as the endpoint the `gRPCAgent` should connect to. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It should be a valid URL otherwise, `opentelemetry-cpp` `URLParser` will throw. Also fixed handling of `grpc` configuration via package.json. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
The static `GrpcClient` namespace exposes multiple methods implementing part of the NSolidService rpc's. - The `MakeChannel()` methods, which accepts `OtlpGrpcClientOptions` as a param, which allows creating a gRPC channel. - The `MakeClientContext()` method which ºsets up a gRPC client context with metadata: `nsolid-agent-id: agent_id` and `nsolid-saas-token: token`. - The `MakeNSolidServiceStub` method which creates a stub for the N|Solid service to facilitate communication with the N|Solid Console. - The `DelegateAsyncExport()` methods which perform all the unary rpc calls defined in `NSolidService`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It implements the bi-directional `Command` rpc using the gRPC Callback API by inheriting from `grpc::ClientBidiReactor<grpcagent::CommandResponse,grpcagent::CommandRequest>`. Also add `nsolid_grpc_agent` as a "debuggable` native module. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It implements the gRPC Client Streaming `ExportAsset` rpc using the gRPC Callback API by inheriting from `grpc::ClientWriteReactor<grpcagent::Asset>`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
This implementation, in principle, implements exactly the same functionality the `ZmqAgent` provides. Expanded the `ProfileOptionsBase` to add `google::protobuf::Struct metadata_pb`, so the metadata can be stored as a protobuf struct. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
They implement the asset collection API's mirroring the bindings in the `ZmqAgent`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
For now the integration looks like this: The `NSOLID_GRPC` env variable needs to be set to enable the agent. Its value can be interpreted in 2 different ways: - If a SaaS token is provided (via NSOLID_SAAS for example), its value has no meaning but "enable gRPC Agent". - Otoh, if no SaaS token is provided, its contents are parsed as the endpoint the `gRPCAgent` should connect to. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It should be a valid URL otherwise, `opentelemetry-cpp` `URLParser` will throw. Also fixed handling of `grpc` configuration via package.json. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
The static `GrpcClient` namespace exposes multiple methods implementing part of the NSolidService rpc's. - The `MakeChannel()` methods, which accepts `OtlpGrpcClientOptions` as a param, which allows creating a gRPC channel. - The `MakeClientContext()` method which ºsets up a gRPC client context with metadata: `nsolid-agent-id: agent_id` and `nsolid-saas-token: token`. - The `MakeNSolidServiceStub` method which creates a stub for the N|Solid service to facilitate communication with the N|Solid Console. - The `DelegateAsyncExport()` methods which perform all the unary rpc calls defined in `NSolidService`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It implements the bi-directional `Command` rpc using the gRPC Callback API by inheriting from `grpc::ClientBidiReactor<grpcagent::CommandResponse,grpcagent::CommandRequest>`. Also add `nsolid_grpc_agent` as a "debuggable` native module. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It implements the gRPC Client Streaming `ExportAsset` rpc using the gRPC Callback API by inheriting from `grpc::ClientWriteReactor<grpcagent::Asset>`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
This implementation, in principle, implements exactly the same functionality the `ZmqAgent` provides. Expanded the `ProfileOptionsBase` to add `google::protobuf::Struct metadata_pb`, so the metadata can be stored as a protobuf struct. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
They implement the asset collection API's mirroring the bindings in the `ZmqAgent`. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
For now the integration looks like this: The `NSOLID_GRPC` env variable needs to be set to enable the agent. Its value can be interpreted in 2 different ways: - If a SaaS token is provided (via NSOLID_SAAS for example), its value has no meaning but "enable gRPC Agent". - Otoh, if no SaaS token is provided, its contents are parsed as the endpoint the `gRPCAgent` should connect to. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
It should be a valid URL otherwise, `opentelemetry-cpp` `URLParser` will throw. Also fixed handling of `grpc` configuration via package.json. PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #203 Reviewed-By: Trevor Norris <[email protected]>