Skip to content

Commit

Permalink
debug logs
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <[email protected]>
  • Loading branch information
eirsep committed Jan 24, 2024
1 parent 5e01cfa commit afffec0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 0 additions & 4 deletions alerting/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,5 @@ run {
useCluster testClusters.integTest
}

// Only apply jacoco test coverage if we are running a local single node cluster
if (!usingRemoteCluster && !usingMultiNode) {
apply from: '../build-tools/opensearchplugin-coverage.gradle'
}

apply from: '../build-tools/pkgbuild.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ object DocumentLevelMonitorRunner : MonitorRunner() {
.preference(Preference.PRIMARY_FIRST.type())

if (DOC_LEVEL_MONITOR_FETCH_ONLY_QUERY_FIELDS_ENABLED.get(monitorCtx.settings) && fieldsToFetch.isNotEmpty()) {
logger.error("PERF_DEBUG: Query field names: ${fieldsToFetch.joinToString() }}")
request.source().fetchSource(false)
for (field in fieldsToFetch) {
request.source().fetchField(field)
Expand All @@ -698,6 +699,7 @@ object DocumentLevelMonitorRunner : MonitorRunner() {
if (response.status() !== RestStatus.OK) {
throw IOException("Failed to search shard: $shard")
}
logger.error("Monitor ${monitorCtx.client} PERF_DEBUG: Percolate query time taken = ")
return response.hits
}

Expand Down Expand Up @@ -758,7 +760,10 @@ object DocumentLevelMonitorRunner : MonitorRunner() {
return hits.map { hit ->
val sourceMap = if (hit.hasSource()) {
hit.sourceAsMap
} else constructSourceMapFromFieldsInHit(hit)
} else {
logger.error("PERF_DEBUG:Building percolate query source docs from relevant fields only")
constructSourceMapFromFieldsInHit(hit)
}

transformDocumentFieldNames(
sourceMap,
Expand Down

0 comments on commit afffec0

Please sign in to comment.