18 Commits

Author SHA1 Message Date
Craig Tiller
339906443b [clang-format] Match include file ordering to internal clang-format (#40905)
gRPC is currently getting formatted with two different clang-format implementations, and due to some weirdness they have different include file orderings. This change introduces clang-format configuration to ensure that the two systems align - it's *highly* expected that this will need some maintenance going forward as the two systems evolve.

Closes #40905

PiperOrigin-RevId: 819606209
2025-10-15 00:24:11 -07:00
Yash Tibrewal
a863830385 [OTel C++] Use gRPC's trace-bin TextMapPropagator in example (#39740)
Closes #39740

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39740 from yashykt:FixTracingExample 3df40d756dee6765d6a11bcbc88ce7deab30a52a
PiperOrigin-RevId: 767219292
2025-06-04 11:23:11 -07:00
Yash Tibrewal
95a1de4935 [examples] Initialize logging (#39095)
Closes #39095

PiperOrigin-RevId: 741352357
2025-03-27 18:49:43 -07:00
Yash Tibrewal
b2d091655c OTel C++: Modify example to add tracing (#38990)
Closes #38990

PiperOrigin-RevId: 738137082
2025-03-18 14:07:13 -07:00
Esun Kim
dc65036957 [C++] Transition to C++17 (CMake) (#38335)
CMake needs following two changes which were missed part from https://github.com/grpc/grpc/pull/37919 to make CMake use C++17.
- **Explicitly require C++17 for gRPC targets using `cxx_std_17`**: This ensures that gRPC build targets are built with the correct C++17 support.
- **Enforce C++17 for all CMake invocations using `CMAKE_CXX_STANDARD=17`**: This is necessary due to Abseil's API changes depending on the C++ standard used. (e.g. Abseil's `absl::string_view` is implemented differently depending on the C++ standard. Before C++17, it's a distinct type. From C++17 onwards, it's simply an alias for `std::string_view`.) To maintain consistency and avoid build errors, all CMake builds (except particular build tests targetting C++20 or C++23) are now configured to use C++17.

The requirement of C++17 for building gRPC should be documented in the release notes and build instructions.

Closes #38335

PiperOrigin-RevId: 712926964
2025-01-07 08:48:11 -08:00
Yash Tibrewal
36e534d2a3 [Examples] Remove grpcpp_admin dependency (#38196)
Closes #38196

PiperOrigin-RevId: 700394472
2024-11-26 10:55:19 -08:00
Yash Tibrewal
989fed6181 [CSM] Use xds-enabled server and xds credentials in examples (#38192)
Closes #38192

PiperOrigin-RevId: 700135745
2024-11-25 16:35:24 -08:00
Yash Tibrewal
c333d60fcd [OTel] Set prometheus exporter option to populate otel scope (#38170)
Fix #38169

Closes #38170

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38170 from yashykt:OpenTelMetricsOptions 8ea4ed82ede26552eb6d9381a621dad01bb8e0d7
PiperOrigin-RevId: 698849889
2024-11-21 11:17:44 -08:00
Craig Tiller
dbb5164ac7 [clang-format] Remove custom clang-format rules for include ordering (#37820)
Closes #37820

PiperOrigin-RevId: 682352913
2024-10-04 09:44:20 -07:00
Yash Tibrewal
74e640341d [CSM O11y] Example logs (#37823)
Closes #37823

PiperOrigin-RevId: 681149244
2024-10-01 13:44:53 -07:00
Esun Kim
a49d450a54 [Build] Bumped the minimum version of cmake (#37702)
Per https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md, the minimum version of cmake to support is 3.16 so let's change our cmake builds' requirements accordingly.

Closes #37702

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37702 from veblush:cmake316 bb4ed1a1be5e9374980c922aac3dc1ccd27d1266
PiperOrigin-RevId: 680639191
2024-09-30 10:55:14 -07:00
Yash Tibrewal
530bb89826 [OTel] Remove unnecessary comment from codelab (#37403)
Closes #37403

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37403 from yashykt:OTelCodelab bd282f445991d7df8cedbc789ed01e3e8bc51c23
PiperOrigin-RevId: 659738193
2024-08-05 17:35:46 -07:00
Yash Tibrewal
3e704c7552 [codelab] Add a codelab for gRPC C++ OTel plugin (#37318)
Closes #37318

PiperOrigin-RevId: 658586660
2024-08-01 17:04:28 -07:00
Yash Tibrewal
d110960d56 [CSM O11y] Add example without Stateful Session Affinity (#36806)
Fork the existing CSM example and just keep the observability parts.

Closes #36806

PiperOrigin-RevId: 640580476
2024-06-05 11:01:42 -07:00
Yash Tibrewal
ac303a09f6 [OTel] Generate pkg-config file for grpcpp_otel_plugin (#36686)
Public Changes -
* Add a pkgconfig installer for `grpcpp_otel_plugin`

Example Changes -
* Add example of how to use the pkgconfig for `grpcpp_otel_plugin` with the existing OpenTelemetry example.
* Add another OpenTelemetry example that uses OTel's OStream exporter. This makes it easier to test the pkgconfig file for `grpcpp_otel_plugin` since the OStream exporter does not require any additional dependencies, as opposed to the Prometheus exporter.

Test changes -
* Modify `run_distrib_test_cmake_pkgconfig.sh` test to install opentelemetry and build the example with the OStream exporter.

Closes #36686

PiperOrigin-RevId: 636965475
2024-05-24 10:41:11 -07:00
Yash Tibrewal
2fb9e99f47 [OTel] Add latency view to example (#36601)
Closes #36601

PiperOrigin-RevId: 633373861
2024-05-13 16:59:48 -07:00
Yash Tibrewal
3032b5c48d [OTel C++] Add CMake build support (#36063)
Changes -
* Add CMake build support to `grpcpp_otel_plugin`. Currently, we are only supporting the `find_package CONFIG` method for depending on `opentelemetry-cpp`.
* Since, `grpcpp_otel_plugin` is an extension of gRPC, it will not be built by default. To enable building of this target, a new CMake option `gRPC_BUILD_GRPCPP_OTEL_PLUGIN` is being added.
* Also add `CMakeLists.txt` to the otel example.

The `otel_plugin_test` can also be built through cmake but, for the CI to work, there are some additional changes. Those will be made in an upcoming PR.

Closes #36063

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36063 from yashykt:OTelCMakeSupport 3bc783823b17ed282ae9b6b7bf8a26cedaae30f9
PiperOrigin-RevId: 613734473
2024-03-07 16:12:10 -08:00
Yash Tibrewal
3ebccf55cd [otel] Add gRPC OpenTelemetry example (#35793)
Closes #35793

PiperOrigin-RevId: 604371764
2024-02-05 11:05:44 -08:00