[APM] Add multi-shard search test case#80792
[APM] Add multi-shard search test case#80792elasticsearchmachine merged 6 commits intoelastic:feature/apm-integrationfrom
Conversation
Adds a test case that creates and populates a couple of multi-shard indices and executes a search against them.
|
Pinging @elastic/es-distributed (Team:Distributed) |
| for (SpanData capturedSpan : capturedSpans) { | ||
| logger.info("--> captured span [{}]", capturedSpan); | ||
| final String spanName = capturedSpan.getName(); | ||
| if (spanName.equals(SearchAction.NAME)) { | ||
| gotSearchSpan = true; | ||
| } | ||
| if (spanName.equals(SearchTransportService.QUERY_CAN_MATCH_NODE_NAME)) { | ||
| gotCanMatchSpan = true; | ||
| } | ||
| } |
There was a problem hiding this comment.
NIT: This could be simplified to: APMTracer.CAPTURING_SPAN_EXPORTER.findSpanByName(..) once https://github.com/elastic/elasticsearch/pull/80758/files is merged
| .execute() | ||
| .actionGet(10, TimeUnit.SECONDS); | ||
|
|
||
| assertBusy(() -> { |
There was a problem hiding this comment.
Should we have all the spans captured by the time the search is complete?
There was a problem hiding this comment.
Ah yes you're right, we're only using the BatchSpanProcessor for pushing them over the wire. (I extracted this PR from a branch in which I'm using the BatchSpanProcessor for everything).
There was a problem hiding this comment.
No, the
APMTraceruses aBatchSpanProcessorwhich queues and asynchronously exports spans.
Sorry for the noise, I just saw the flushes() so it should be flushed at the time the test completes.
Adds a test case that creates and populates a couple of multi-shard
indices and executes a search against them.