-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Metrics for the size of the header field #8717
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
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.
Looks like you missed workflow update headers.
I think all of the commands are covered by I would double check.
Look here for all of the places where header is referenced.
Maybe also inspect the header in the CreateSchedule and UpdateSchedule` APIs in the action to start a workflow.
| operation string, | ||
| ) error { | ||
| config := shard.GetConfig() | ||
| logger := shard.GetLogger() | ||
| throttledLogger := shard.GetThrottledLogger() | ||
| namespaceName := namespaceEntry.Name().String() | ||
|
|
||
| metricsHandler := interceptor.GetMetricsHandlerFromContext(ctx, logger).WithTags(metrics.CommandTypeTag(operation)) | ||
| metrics.HeaderSize.With(metricsHandler).Record(int64(workflowHeaderSize)) |
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.
Why emit this both on the history and frontend?
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.
I tried to emit this one close to where the payload/memo sizes are being enforced (right after this). Also I don't think this is emitted for start workflow execution requests specifically in the frontend.
1861fcb to
86d7d30
Compare
What changed?
Start to track the size of the header field in the requests
Why?
There are few reasons to start tracking the header size. First, it helps to picture the size of the request used by header field. Second, unlike payload and memo fields, we currently do not enforce the size of the header size. Better visibility into its size will determine at what level we would need to set up the enforcement.
How did you test it?
samples-go/ctxpropagationand checked that the header size metric is populated in PrometheusPotential risks
No