Commit Graph

52 Commits

Author SHA1 Message Date
Yousuk Seung c03cd744b2
[WRR] Prefer application_utilization to cpu_utilization (#33355)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-06-07 17:38:29 -07:00
Yousuk Seung 8b02295e58
[xDS] Accept cpu_utilization over 100% (#32954)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-05-02 03:25:17 +00:00
Yash Tibrewal bdd1ac4d1d
[GcpObservability C++] De-experimentalize API (#32715)
This PR aims to de-experimentalize the APIs for GCP Observability. 

We would have ideally wanted public feedback before declaring the APIs
stable, but we need stable APIs for GA.

Changes made after API review with @markdroth @veblush, @ctiller and the
entire Core/C++ team -
* The old experimental APIs `grpc::experimental::GcpObservabilityInit`
and `grpc::experimental::GcpObservabilityClose` are now deprecated and
will be deleted after v.1.55 release.
* The new API gets rid of the Close method and follows the RAII idiom
with a single `grpc::GcpObservability::Init()` call that returns an
`GcpObservability` object, the lifetime of which controls when
observability data is flushed.
* The `GcpObservability` class could in the future add more methods. For
example, a debug method that shows the current configuration.
* Document that GcpObservability initialization and flushing (on
`GcpObservability` destruction) are blocking calls.
* Document that gRPC is still usable if GcpObservability initialization
failed. (Added a test to prove the same).
* Since we don't have a good way to flush stats and tracing with
OpenCensus, the examples required users to sleep for 25 seconds. This
sleep is now part of `GcpObservability` destruction.

Additional Implementation details -
* `GcpObservability::Init` is now marked with `GRPC_MUST_USE_RESULT` to
make sure that the results are used. We ideally want users to store it,
but this is better than nothing.
* Added a note on GCP Observability lifetime guarantees.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-04-05 21:45:21 +00:00
Yousuk Seung c02b3e695c
xDS: Include orca named_metrics in LRS load reports (#32690)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-03-28 12:04:01 -07:00
Yousuk Seung 16c03db9ac
Revert "Revert "WRR: Support EPS" (#32723)" (#32725)
This reverts commit 7bd9267f32.




<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-03-27 16:49:50 -07:00
Esun Kim 7bd9267f32
Revert "WRR: Support EPS" (#32723)
Reverts grpc/grpc#32657
2023-03-27 11:53:17 -07:00
Yousuk Seung 4429066516
WRR: Support EPS (#32657)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-03-24 16:23:51 -07:00
Yash Tibrewal 97ba987132
GCP Observability: Docs on Init (#32573)
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-03-09 12:27:21 -08:00
Yash Tibrewal bf23bb2fa7
Gcp Observability Logging: Batching and Graceful close (#32436)
This PR adds batching support for GCP Observability logging. So instead
of the naive creating a new RPC to cloud logging for each logging event,
we now batch the log events to meet one of the following requirements -
* Batch size of 1000
* Batch memory consumption of 1MB
* A timeout period of 1sec after which we flush the accumulated batch
irrespective of the size.

There can also be cases where for some reason the RPCs fail or the batch
just accumulates to a very large size(100000 entries or 10MB in size).
In such cases, we just log the events with gpr_log instead of just
continuing to accumulate.

Additionally, `GcpObservabilityClose()` has been added to gracefully
shut off logging where we block till all the currently logged events are
flushed. (We might be able to gracefully shut off stats and tracing in
the future too.)

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2023-02-22 22:32:44 -08:00
Yousuk Seung b98f527260
Revert "Revert "Revert "Revert "server: introduce ServerMetricRecorde… (#32301)
* Revert "Revert "Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)" (#32293)"

This reverts commit 1f960697c5.

* Do not create CallMetricRecorder if call is null.
2023-02-06 12:00:39 -08:00
Craig Tiller 1f960697c5
Revert "Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)" (#32293)
This reverts commit 4475e74c6a.
2023-02-03 13:18:23 -08:00
Yousuk Seung 4475e74c6a
Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)" (#32279)
* Revert "Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)"

This reverts commit deb1e25543.

* Fix by caching call metric recording stuff in async request

PR #32106 caused msan errors in some tests while de-referencing the
server object where async calls are active after the server is
destroyed. Instead cache the ServerMetricRecorder pointer.

* copyright headers fixed

* clang fixes.
2023-02-03 11:49:32 -08:00
Xuan Wang deb1e25543
Revert "server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)" (#32272)
This reverts commit c7f641da0d.
2023-02-02 09:58:29 -08:00
Yousuk Seung c7f641da0d
server: introduce ServerMetricRecorder API and move per-call reporting from a C++ interceptor to a C-core filter (#32106)
* backend metric sampling

* Comments addressed.

* More comments addressed.

* Pushing changes left behind locally.

* Removed empty lines

* Update OrcaService to use ServerMetricRecorder (no named metrics yet)

* Comments addressed.

* More comments addressed

* More comments addressed.

* Comments fixed

* Comments addressed.

* Test fixed

* make seq returned always up-to-date

* skip atomic load when not cached

* Fixed ABSL_GUARDED_BY

* Comments addressed except client_lb_end2end_test

* test updated

* Comments addressed

* BUILD fix.

* BackendMetricDataState moved to a separate header

* comments addressed

* Fixed clang and buildifier errors

* More sanity check errors fixed.

* Fixed xds tests

* Ran generate_projects.sh

* Comments addressed

* comments addressed.

* generate project

* Build fixed

* generate project

* sanity check errors fixed

* test fixed

* Backup poller period override moved to main()

* Also move cfstream override

* Clang fixes, sanitize

* generate_projects.sh

* portable print format fix

* Removed outdated comment
2023-02-01 14:54:57 -08:00
Mark D. Roth b0d7131ab3
WRR: plumb qps in backend metric data (#31903)
* plumb qps in backend metric data

* pull in updated orca proto

* gen_upb_api

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2023-01-09 10:07:58 -08:00
Yijie Ma f99b8b5bc4
Convert c-style comments to C++-style comments (#31923)
* baseline

* fix clang-tidy

* manually revert these files

* manually fixup at eof

* revert 2 more files

* change check_deprecated_grpc++.py

* change end2end_defs.include template

* fix check_include_guards.py

* untrack tools/distrib/python/convert_cstyle_comments_to_cpp.py

not yet ready to be submitted

* fix

yapf check_include_guards.py
remove a space...

* fix version.cc.template

* fix version_info.h.template
2022-12-22 23:01:53 -08:00
Cheng-Yu Chung e9b287997a
Remove `include/grpcpp/impl/codegen/sync.h` (#31545)
* Remove `include/grpcpp/impl/codegen/sync.h`

* Fix sanity tests
2022-11-22 13:45:53 -05:00
Cheng-Yu Chung 0fbc4a715c
Remove `include/grpcpp/impl/codegen/service_type.h` (#31282) 2022-10-17 16:26:03 -04:00
Yash Tibrewal 727ae8c885
GcpObservability: Add experimental public target (#31339)
* GcpObservability: Add experimental public target

* Yapf and IWYU
2022-10-17 12:43:45 -07:00
Cheng-Yu Chung ad04dc3766
Remove `include/grpcpp/impl/codegen/slice.h` (#31283) 2022-10-17 14:19:27 -04:00
Cheng-Yu Chung d699b574a8
Remove `include/grpcpp/impl/codegen/server_callback.h` (#31279) 2022-10-12 15:37:14 -04:00
Cheng-Yu Chung a1cb2f3d6f
Remove `include/grpcpp/impl/codegen/server_callback.h` (#31280) 2022-10-12 14:34:18 -04:00
Cheng-Yu Chung a192f155b9
Remove `include/grpcpp/impl/codegen/config.h` (#31061)
* Remove `include/grpcpp/impl/codegen/config.h`

* Update
2022-10-06 13:14:16 -04:00
Nicolas Noble 667691c499
server: per-rpc backend metric reporting (#29621)
Users can now report per-rpc metrics from servers to clients.
2022-05-20 15:54:30 -07:00
Mark D. Roth 60c56f7d01
Second attempt: implement ORCA RPC service for OOB backend metric reporting (#29352)
* Revert "Revert "ORCA: implement ORCA RPC service for OOB backend metric reporting (#29215)" (#29351)"

This reverts commit 71b355624f.

* move ORCA service to its own BUILD rule
2022-04-08 11:12:18 -07:00
Mark D. Roth 71b355624f
Revert "ORCA: implement ORCA RPC service for OOB backend metric reporting (#29215)" (#29351)
This reverts commit 6d6380de58.
2022-04-07 16:15:49 -07:00
Mark D. Roth 6d6380de58
ORCA: implement ORCA RPC service for OOB backend metric reporting (#29215)
* ORCA: implement ORCA RPC service for OOB backend metric reporting

* fix unused parameter error

* gen_upb_api

* add missing build deps

* increase test timing fudge factor

* add missing copyright header

* buildifier

* don't register as a generic service

* report interval defaults to min interval

* don't regenerate the response proto unless something changed

* use INTERNAL for proto parsing failure

* use absl::Duration in public API
2022-04-07 07:58:58 -07:00
AJ Heller 85189b24bb
Reintroduce: Avoid fully qualifying namespaces (and add check) (#28917)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-18 16:18:54 -08:00
AJ Heller e72a5fe5dd
Revert "Avoid fully qualifying namespaces (and add check) (#28901)" (#28916)
This reverts commit fc7314c701.
2022-02-17 17:56:19 -08:00
AJ Heller fc7314c701
Avoid fully qualifying namespaces (and add check) (#28901)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-17 16:23:25 -08:00
Lidi Zheng b457f43227
Implement C++ Admin Interface API (#25753)
* Implement C++ Admin Interface API

* Address reviewer's requests

* Remove static asserts for raw pointers

* Make sanity tests happy

* Windows: pacify conflict between ifndef and macros

* Disable admin services test on iOS

* Make iOS happy by:

* Letting grpcpp_admin conditionally depend on grpcpp_csds

* Fix an unexpected side-effect of dependency update
2021-03-23 09:53:12 -07:00
Karthik Ravi Shankar 4f6e13519c Move channel plugin from grpc_impl to grpc
Reverts: https://github.com/grpc/grpc/pull/18375
2020-10-07 12:08:14 -07:00
Karthik Ravi Shankar e549843885 Move remaining classes to grpc from grpc_impl 2020-10-06 13:15:51 -07:00
Karthik Ravi Shankar 3253bb32e7
Merge pull request #23471 from karthikravis/proto-server
Move ProtoServerReflectionPlugin from grpc_impl to grpc namespace
2020-07-16 14:14:41 -07:00
Karthik Ravi Shankar f9fac8a6b7 Move ProtoServerReflectionPlugin from grpc_impl to grpc namespace
Reverts: https://github.com/grpc/grpc/pull/18600
2020-07-13 14:57:01 -07:00
Karthik Ravi Shankar 69f8d308cb Move LoadReportingServiceServerBuilderOption from ::grpc_impl to ::grpc
Reverts: https://github.com/grpc/grpc/pull/18419/files
2020-07-13 14:50:33 -07:00
Esun Kim 165ee5007a Replaced grpc::string with std::string 2020-06-29 17:56:36 -07:00
Karthik Ravi Shankar 9b312aa25b
Merge pull request #18600 from karthikravis/grpc_namespace_proto_server
Move ProtoServerReflectionPlugin from grpc to grpc_impl namespace
2019-04-03 15:33:04 -07:00
Karthik Ravi Shankar c4b7423ad0 Fix errors due to rebase 2019-04-01 18:40:40 -07:00
Karthik Ravi Shankar 150935aeef Merge branch 'master' into grpc_namespace_server_load_reporting 2019-04-01 13:50:30 -07:00
Karthik Ravi Shankar 8e092b45fa Move ProtoServerReflectionPlugin from grpc to grpc_impl namespace 2019-04-01 13:32:40 -07:00
Karthik Ravi Shankar 87c98ad3fb
Merge pull request #18379 from grpc/grpc_namespace_server_initializer
Move ServerInitializer to grpc_impl namespace from grpc
2019-04-01 12:48:28 -07:00
Karthik Ravi Shankar fc50caf725 Fix clang format issues 2019-03-27 15:03:20 -07:00
Karthik Ravi Shankar 577ddfb1a1 Move ServerInitializer to grpc_impl namespace from grpc 2019-03-27 12:28:35 -07:00
Karthik Ravi Shankar b2b1e57337 Fix errors from test scripts. 2019-03-25 15:55:06 -07:00
Karthik Ravi Shankar 850d02d67d Move channelz_service_plugin from grpc to grpc_impl namespace 2019-03-25 15:55:06 -07:00
Karthik Ravi Shankar e9593285a8 Move LoadReportingServiceServerBuilderOption from grpc to grpc_impl 2019-03-18 13:20:42 -07:00
ncteisen 18a9d7d57c reviewer feedback 2018-07-20 09:29:05 -07:00
ncteisen b47214952b reviewer feedback 2018-07-19 15:19:43 -07:00
ncteisen 6104e4f33b Move ChannelzServicePlugin to public, experimental 2018-07-19 14:59:10 -07:00