-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support collecting gRPC core metrics #625
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
If the stats are always collected in C/C++ code, then there seems to be no benefits to make it an optional feature. |
If so, |
You can depend on GRPCIO_SYS_USE_PKG_CONFIG to decide whether implement the feature. By the way, there should be also standard way to expose metrics like open census and |
Do you mean functions in stats become no-op when
open census and channelz are included in |
Maybe you should use a feature name open census and channelz should be the standard ways as they are public APIs. |
Also add some improvements Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
How about moving c changes, for example, exposing a header, to tikv/grpc instead? So that users can choose to patch grpc or just ignore unknown symbols. |
Not sure if this is what you mean, but please take a look. |
Can we merge it? |
I think it's ready. I am fine with the current implementation and the implementation suggested by jay in the previous comment #625 (comment). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Does it help collecting metrics? grpc/grpc#35348 And you need to update your branch before getting it merged. |
Collect gRPC core metrics:
Details: https://github.com/grpc/grpc/blob/v1.56.0/src/core/lib/debug/stats_data.yaml
This PR add a new cc file called
grpc_wrap_stats.cc
and generates bindingsinto a new file called
binding_stats.rs
.Collecting metrics needs to include headers under in
grpc/src/
.I think it's better to be an optional feature and codes are in separated files.