mirror of https://github.com/grpc/grpc.git
[CSM] Add a server selector based on channel args (#34312)
I've added channel args to `CreateNewServerCallTracer` on the `ServerCallTracerFactory`. The motivation is for CSM Observability where the OTel plugin will be configured to only do stats on servers which are xDS enabled, so I plan to check this via channel args. In the future, with the new scopes for metrics, I think I'll be able to change this to only check once per server or server connection instead of per call. <!-- 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. -->pull/34375/head
parent
d589caa679
commit
c145b7910e
18 changed files with 107 additions and 12 deletions
@ -0,0 +1,24 @@ |
||||
//
|
||||
// Copyright 2023 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#ifndef GRPC_SRC_CORE_EXT_XDS_XDS_ENABLED_SERVER_H |
||||
#define GRPC_SRC_CORE_EXT_XDS_XDS_ENABLED_SERVER_H |
||||
|
||||
// EXPERIMENTAL. Bool-valued channel arg used as an indicator that a server is
|
||||
// xds enabled.
|
||||
#define GRPC_ARG_XDS_ENABLED_SERVER "grpc.experimental.xds_enabled_server" |
||||
|
||||
#endif // GRPC_SRC_CORE_EXT_XDS_XDS_ENABLED_SERVER_H
|
Loading…
Reference in new issue