aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYousuk Seung <ysseung@google.com>2023-11-09 14:35:21 -0800
committerGitHub <noreply@github.com>2023-11-09 14:35:21 -0800
commite1cb290ef8e9caff69bf4f968433ffa35fdc2b2e (patch)
tree12641cbf42b78828b42ec13bd66f9ae04e3dc1a7
parenta2128da29418e77b340563ad1d94216df01c25c5 (diff)
downloadgrpc-grpc-e1cb290ef8e9caff69bf4f968433ffa35fdc2b2e.tar.gz
[tracing] Add member getters to HttpAnnotation (#34592) (#34905)
So that users can process annotations other than calling ToString(). <!-- 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. -->
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h
index 1bfea72c12..b008e57135 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h
@@ -119,6 +119,15 @@ class HttpAnnotation : public CallTracerAnnotationInterface::Annotation {
std::string ToString() const override;
+ Type http_type() const { return type_; }
+ Timestamp time() const { return time_; }
+ absl::optional<chttp2::TransportFlowControl::Stats> transport_stats() const {
+ return transport_stats_;
+ }
+ absl::optional<chttp2::StreamFlowControl::Stats> stream_stats() const {
+ return stream_stats_;
+ }
+
private:
const Type type_;
const Timestamp time_;