nodesource / nsolid

N|Solid Runtime
Other
61 stars 4 forks source link

deps,agents: add basic gRPC support to OTLPAgent #133

Closed santigimeno closed 6 months ago

santigimeno commented 6 months ago
deps: add grpc@1.52.0

The consumer should add the `grpc++` target (the C++ gRPC library) as a
dependency to add gRPC support.
A couple of other useful targets have been created, the most relevant for now
being `grpc_cpp_plugin` which creates the plugin to be used by `protoc` to
create the OTLP gRPC headers with the protobuf definitions.
deps: update opentelemetry-cpp to 1.15.0

While doing it, the updater script `update-opentelemetry-cpp.sh` has
been updated so it builds the `grpc_cpp_plugin` to be used by `protoc`
to also generate the OTLP gRPC headers with the protobuf definitions.
agents: add initial gRPC support in OTLPAgent

To be clear, support hasn't been added just yet to the agent itself, but
the needed modifications so it can be easily done:
- Added `grpc++` as a direct dependency to `opentelemetry-cpp`.
- Added needed source files to our `protobuf` dependency.
- Basic modifications to `OTLPAgent` and `OTLPMetrics` so they can
  support any kind of `OTLP` exporter, some helper code and some actual
  code that works but remains commented until we decide the best way to
  add gRPC support (configuration, etc.).