-
Notifications
You must be signed in to change notification settings - Fork 103
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
yarpc.Config: Option to disable observability middleware #1421
Conversation
Codecov Report
@@ Coverage Diff @@
## _start_-disableMetrics-part_1.0 #1421 +/- ##
===================================================================
- Coverage 90.69% 90.45% -0.25%
===================================================================
Files 209 209
Lines 10344 10249 -95
===================================================================
- Hits 9382 9271 -111
- Misses 638 645 +7
- Partials 324 333 +9
Continue to review full report at Codecov.
|
|
||
// DisableAutoObservabilityMiddleware is used to stop the dispatcher from | ||
// automatically attaching observability middleware to all inbounds and | ||
// outbounds. It is the assumption that if if this option is disabled the |
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.
nit: it is assumed
// outbounds. It is the assumption that if if this option is disabled the | ||
// observability middleware is being inserted in the Inbound/Outbound | ||
// Middleware. | ||
DisableAutoObservabilityMiddleware bool |
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.
Can we drop Auto
? I think it's a bit verbose
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.
Could get away with ExcludeObservabilityMiddleware
// outbounds. It is the assumption that if if this option is disabled the | ||
// observability middleware is being inserted in the Inbound/Outbound | ||
// Middleware. | ||
DisableAutoObservabilityMiddleware bool |
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.
Could get away with ExcludeObservabilityMiddleware
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.
+1 to @kriskowal's suggestion
e077c0e
to
a4bd8a6
Compare
Summary: In order to allow some users to customize how they attach
observability middleware (e.g. users that want to log stats with shard
key). This PR adds the ability to not add the built in observability
middleware on the dispatcher. By default it's currently always added.
This will allow users to input their own middleware for observability
explicitly. Since it would be a breaking change to remove it silently,
this needs to be an new option that explicitly disables the middleware..