You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wankai123 (via GitHub)" <gi...@apache.org> on 2025/07/16 03:10:28 UTC

[PR] Add log and flag for Endpoint direct topN query. [skywalking]

wankai123 opened a new pull request, #13371:
URL: https://github.com/apache/skywalking/pull/13371

   If you want to optimize the Endpoint topN query config, enabling this log is a good way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add log and flag for Endpoint direct topN query. [skywalking]

Posted by "wankai123 (via GitHub)" <gi...@apache.org>.
wankai123 closed pull request #13371: Add log and flag for Endpoint direct topN query.
URL: https://github.com/apache/skywalking/pull/13371


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add log and flag for Endpoint direct topN query. [skywalking]

Posted by "wankai123 (via GitHub)" <gi...@apache.org>.
wankai123 commented on code in PR #13371:
URL: https://github.com/apache/skywalking/pull/13371#discussion_r2209119201


##########
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBAggregationQueryDAO.java:
##########
@@ -139,6 +142,11 @@ List<SelectedRecord> serverSideTopN(boolean isColdStage, TopNCondition condition
 
     List<SelectedRecord> directMetricsTopN(boolean isColdStage, TopNCondition condition, MetadataRegistry.Schema schema, String valueColumnName, MetadataRegistry.ColumnSpec valueColumnSpec,
                                            TimestampRange timestampRange, List<KeyValue> additionalConditions) throws IOException {
+        if (getClient().getConfig().getGlobal().isLogEndpointDirectTopNQuery()
+            && condition.getScope().equals(Scope.Endpoint)) {
+            log.info("Endpoint direct TopN query, TopNCondition: {}, AdditionalConditions: {}, TimestampRange: {}",
+            condition, additionalConditions, timestampRange);

Review Comment:
   not require these



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add log for Endpoint direct topN query. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #13371:
URL: https://github.com/apache/skywalking/pull/13371


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add log and flag for Endpoint direct topN query. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #13371:
URL: https://github.com/apache/skywalking/pull/13371#issuecomment-3077020460

   Let's put this input debug mode only.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add log and flag for Endpoint direct topN query. [skywalking]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13371:
URL: https://github.com/apache/skywalking/pull/13371#discussion_r2209117305


##########
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBAggregationQueryDAO.java:
##########
@@ -139,6 +142,11 @@ List<SelectedRecord> serverSideTopN(boolean isColdStage, TopNCondition condition
 
     List<SelectedRecord> directMetricsTopN(boolean isColdStage, TopNCondition condition, MetadataRegistry.Schema schema, String valueColumnName, MetadataRegistry.ColumnSpec valueColumnSpec,
                                            TimestampRange timestampRange, List<KeyValue> additionalConditions) throws IOException {
+        if (getClient().getConfig().getGlobal().isLogEndpointDirectTopNQuery()
+            && condition.getScope().equals(Scope.Endpoint)) {
+            log.info("Endpoint direct TopN query, TopNCondition: {}, AdditionalConditions: {}, TimestampRange: {}",
+            condition, additionalConditions, timestampRange);

Review Comment:
   Logging query conditions and parameters may expose sensitive information. Consider using debug level logging or sanitizing the logged data to prevent potential information disclosure.
   ```suggestion
               log.info("Endpoint direct TopN query, TopNCondition: {}, AdditionalConditions count: {}, TimestampRange: {}",
               condition.getScope(), additionalConditions.size(), timestampRange.getStart() + " to " + timestampRange.getEnd());
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org