-
Notifications
You must be signed in to change notification settings - Fork 3.9k
inprocess: Support tracing message sizes guarded by flag #11629
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
Conversation
@@ -212,6 +215,7 @@ public ServerStreamTracer newServerStreamTracer(String fullMethodName, Metadata | |||
|
|||
@Before | |||
public void setUp() { | |||
System.setProperty(GRPC_EXPERIMENTAL_SUPPORT_TRACING_MESSAGE_SIZES, "true"); |
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.
You should do this in the specific test, not here which is the setup step for every test. We need to have 2 tests one that sets the property and one that doesn't. The test that does setProperty should have a try - finally block to System.clearProperty in the finally block as well.
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.
Since we would expect to have this flag for ~1 week and we want to get this in quickly (vs the larger revert), I suggest not testing at all with GRPC_EXPERIMENTAL_SUPPORT_TRACING_MESSAGE_SIZES=true (just use the default, whatever it is).
inprocess/src/main/java/io/grpc/inprocess/InProcessTransport.java
Outdated
Show resolved
Hide resolved
We shouldn't do this every message.
What does that mean? You mean we should move it to somewhere else? Perhaps
to a place where constants are defined?
…On Tue, 22 Oct 2024 at 8:19 PM, Eric Anderson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In inprocess/src/main/java/io/grpc/inprocess/InProcessTransport.java
<#11629 (comment)>:
> @@ -358,6 +358,13 @@ private static int metadataSize(Metadata metadata) {
return (int) size;
}
+ /**
+ * Returns true if env var is set.
+ */
+ static boolean isEnabledSupportTracingMessageSizes() {
+ return GrpcUtil.getFlag("GRPC_EXPERIMENTAL_SUPPORT_TRACING_MESSAGE_SIZES", false);
We shouldn't do this every message.
—
Reply to this email directly, view it on GitHub
<#11629 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANRG3B6XM6IKQYRKNTFRBRTZ4ZQWXAVCNFSM6AAAAABQMLV5L6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGOBVGQ2TKOJXGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Add it as a field to the transport. |
No description provided.