[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.

-->
This commit is contained in:
Yousuk Seung 2023-11-09 14:35:21 -08:00 committed by GitHub
parent a2128da294
commit e1cb290ef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -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_;