The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Yash Tibrewal 36e534d2a3 [Examples] Remove grpcpp_admin dependency (#38196) 3 days ago
..
codelab [clang-format] Remove custom clang-format rules for include ordering (#37820) 2 months ago
ostream [clang-format] Remove custom clang-format rules for include ordering (#37820) 2 months ago
BUILD [Examples] Remove grpcpp_admin dependency (#38196) 3 days ago
CMakeLists.txt [Build] Bumped the minimum version of cmake (#37702) 2 months ago
Makefile [OTel] Generate pkg-config file for grpcpp_otel_plugin (#36686) 6 months ago
README.md [OTel C++] Add CMake build support (#36063) 9 months ago
greeter_callback_client.cc [OTel] Set prometheus exporter option to populate otel scope (#38170) 1 week ago
greeter_callback_server.cc [OTel] Set prometheus exporter option to populate otel scope (#38170) 1 week ago
util.cc [Examples] Remove grpcpp_admin dependency (#38196) 3 days ago
util.h [CSM] Use xds-enabled server and xds credentials in examples (#38192) 3 days ago

README.md

gRPC C++ OpenTelemetry Example

The opentelemetry example builds on the Hello World Example and changes the gRPC client and server to show a sample way of configuring the gRPC OpenTelemetry plugin with a prometheus exporter.

For more information on the gRPC OpenTelemetry plugin, please refer to - * A66: OpenTelemetry Metrics

  • https://opentelemetry.io/

Running the example

To run the server -

$ tools/bazel run examples/cpp/otel:greeter_callback_server

To run the client -

$ tools/bazel run examples/cpp/otel:greeter_callback_client

The client continuously sends an RPC to the server every second.

To make sure that the server and client metrics are being exported properly, in a separate terminal, run the following -

$ curl localhost:9464/metrics
$ curl localhost:9465/metrics

NOTE: If the prometheus endpoint configured is overridden, please update the target in the above curl command.

CMake Instructions

The following libraries need to be installed before building the example with CMake -

  • absl
  • protobuf
  • prometheus-cpp
  • opentelemetry-cpp (with the options -DWITH_ABSEIL=ON -DWITH_PROMETHEUS=ON)
  • grpc (with the option -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON)

You can find a complete set of instructions for building gRPC and running the Hello World app in the C++ Quick Start.