-
Notifications
You must be signed in to change notification settings - Fork 1
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
make default maxSpans for zipkin endpoint configurable #19
Conversation
08563c0
to
1731db9
Compare
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.
LGTM modulo a request for a test, docs and adding a validation check.
@@ -34,7 +34,7 @@ public class ZipkinServiceTest { | |||
@BeforeEach | |||
public void setup() throws IOException { | |||
MockitoAnnotations.openMocks(this); | |||
zipkinService = spy(new ZipkinService(searcher)); | |||
zipkinService = spy(new ZipkinService(searcher, 20000)); |
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 think it'd be good to add a test of the max behavior before upstreaming. Now that it's configureable, it'd probably be easier to construct a test case with a service object that has a really small max.
@@ -50,6 +50,7 @@ queryConfig: | |||
serverAddress: ${ASTRA_QUERY_SERVER_ADDRESS:-localhost} | |||
requestTimeoutMs: ${ASTRA_QUERY_REQUEST_TIMEOUT_MS:-5000} | |||
defaultQueryTimeoutMs: ${ASTRA_QUERY_DEFAULT_QUERY_TIMEOUT_MS:-3000} | |||
zipkinDefaultMaxSpans: ${ASTRA_QUERY_ZIPKIN_DEFAULT_MAX_SPANS:-20000} |
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.
Also, adding docs for zipkinDefaultMaxSpans
hereish: https://github.com/airbnb/kaldb/blob/airbnb-main/docs/topics/Config-options.md?plain=1#L315 would be good.
.withAnnotatedService( | ||
new ZipkinService( | ||
astraDistributedQueryService, | ||
astraConfig.getQueryConfig().getZipkinDefaultMaxSpans())) |
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 think it'd be good to add a precondition for the zipkinDefaultMaxSpans value. Maybe add another checkArgument call for it in ValidateAstraConfig.validateQueryConfig
?
c69374f
to
0b8a9d8
Compare
685631d
to
a14240d
Compare
set reasonable default so checks pass
ae420f7
to
4660563
Compare
Summary
This makes the default
maxSpans
for the zipkin API configurable and sets the default to 20k which is what it is hardcoded as right now.To note: the param
maxSpans
does exist, but the grafana zipkin plugin does not support using that. So it makes sense for us to configure this default at the stack level as well.Requirements