You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/12/29 13:07:06 UTC

[GitHub] [skywalking] wu-sheng commented on a diff in pull request #10218: Fix `time_bucket` of `ServiceTraffic` not set correctly in `slowSql`

wu-sheng commented on code in PR #10218:
URL: https://github.com/apache/skywalking/pull/10218#discussion_r1058942479


##########
oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/dsl/spec/extractor/ExtractorSpec.java:
##########
@@ -267,14 +267,8 @@ public void slowSql(@DelegatesTo(SlowSqlSpec.class) final Closure<?> cl) {
         DatabaseSlowStatementBuilder builder = new DatabaseSlowStatementBuilder(namingControl);
         builder.setLayer(Layer.nameOf(log.getLayer()));
 
-        long timeBucket = TimeBucket.getTimeBucket(log.getTimestamp(), DownSampling.Minute);
         builder.setServiceName(log.getService());
 
-        ServiceMeta serviceMeta = new ServiceMeta();
-        String serviceName = namingControl.formatServiceName(log.getService());
-        serviceMeta.setName(serviceName);
-        serviceMeta.setLayer(builder.getLayer());
-        serviceMeta.setTimeBucket(builder.getTimeBucket());

Review Comment:
   At here, `builder.getTimeBucket()` is always not initialized. Then the time bucket of ServiceTraffic is always wrong. OAP just fixed this due to this service's traffic also being generated through MAL, which provides the correct timestamp.



-- 
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