Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
2b85ba10
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
2b85ba10
编写于
4月 05, 2021
作者:
wu-sheng
提交者:
GitHub
4月 05, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix `disable` statement not working (#6687)
上级
d7beac5b
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
74 addition
and
17 deletion
+74
-17
CHANGES.md
CHANGES.md
+3
-2
docs/en/concepts-and-designs/oal.md
docs/en/concepts-and-designs/oal.md
+2
-0
oap-server/server-bootstrap/src/main/resources/oal/core.oal
oap-server/server-bootstrap/src/main/resources/oal/core.oal
+0
-11
oap-server/server-bootstrap/src/main/resources/oal/disable.oal
...erver/server-bootstrap/src/main/resources/oal/disable.oal
+31
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleProvider.java
...apache/skywalking/oap/server/core/CoreModuleProvider.java
+8
-4
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/oal/rt/DisableOALDefine.java
...e/skywalking/oap/server/core/oal/rt/DisableOALDefine.java
+30
-0
未找到文件。
CHANGES.md
浏览文件 @
2b85ba10
...
...
@@ -69,8 +69,9 @@ Release Notes.
*
Add function
`retagByK8sMeta`
and opt type
`K8sRetagType.Pod2Service`
in MAL for k8s to relate pods and services.
*
Make the flushing metrics operation concurrent.
*
Fix ALS K8SServiceRegistry didn't remove the correct entry.
*
Using "service.istio.io/canonical-name" to replace "app" label to resolve Envoy ALS service name
*
Append the root slash(/) to getIndex and getTemplate requests in ES client
*
Using "service.istio.io/canonical-name" to replace "app" label to resolve Envoy ALS service name.
*
Append the root slash(/) to getIndex and getTemplate requests in ES client.
*
Fix
`disable`
statement not working. This bug exists since 8.0.0.
#### UI
*
Update selector scroller to show in all pages.
...
...
docs/en/concepts-and-designs/oal.md
浏览文件 @
2b85ba10
...
...
@@ -101,6 +101,8 @@ Some of the aggregation and metrics are defined through core hard codes. Example
This
`disable`
statement is designed to render them inactive.
By default, none of them are disabled.
**NOTICE**
, all disable statements should be in
`oal/disable.oal`
script file.
## Examples
```
// Calculate p99 of both Endpoint1 and Endpoint2
...
...
oap-server/server-bootstrap/src/main/resources/oal/core.oal
浏览文件 @
2b85ba10
...
...
@@ -68,14 +68,3 @@ database_access_resp_time = from(DatabaseAccess.latency).longAvg();
database_access_sla = from(DatabaseAccess.*).percent(status == true);
database_access_cpm = from(DatabaseAccess.*).cpm();
database_access_percentile = from(DatabaseAccess.latency).percentile(10);
// Disable unnecessary hard core stream, targeting @Stream#name
/////////
// disable(segment);
// disable(endpoint_relation_server_side);
// disable(top_n_database_statement);
// disable(zipkin_span);
// disable(jaeger_span);
// disable(profile_task);
// disable(profile_task_log);
// disable(profile_task_segment_snapshot);
oap-server/server-bootstrap/src/main/resources/oal/disable.oal
0 → 100644
浏览文件 @
2b85ba10
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
///////////////////////////////////////////////////////////////
//
// Disable unnecessary hard core stream, targeting @Stream#name
//
///////////////////////////////////////////////////////////////
// disable(segment);
// disable(endpoint_relation_server_side);
// disable(top_n_database_statement);
// disable(zipkin_span);
// disable(jaeger_span);
// disable(profile_task);
// disable(profile_task_log);
// disable(profile_task_segment_snapshot);
\ No newline at end of file
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleProvider.java
浏览文件 @
2b85ba10
...
...
@@ -50,6 +50,7 @@ import org.apache.skywalking.oap.server.core.config.group.EndpointNameGrouping;
import
org.apache.skywalking.oap.server.core.config.group.EndpointNameGroupingRuleWatcher
;
import
org.apache.skywalking.oap.server.core.management.ui.template.UITemplateInitializer
;
import
org.apache.skywalking.oap.server.core.management.ui.template.UITemplateManagementService
;
import
org.apache.skywalking.oap.server.core.oal.rt.DisableOALDefine
;
import
org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService
;
import
org.apache.skywalking.oap.server.core.profile.ProfileTaskMutationService
;
import
org.apache.skywalking.oap.server.core.query.AggregationQueryService
;
...
...
@@ -118,6 +119,7 @@ public class CoreModuleProvider extends ModuleProvider {
private
final
SourceReceiverImpl
receiver
;
private
ApdexThresholdConfig
apdexThresholdConfig
;
private
EndpointNameGroupingRuleWatcher
endpointNameGroupingRuleWatcher
;
private
OALEngineLoaderService
oalEngineLoaderService
;
public
CoreModuleProvider
()
{
super
();
...
...
@@ -161,8 +163,6 @@ public class CoreModuleProvider extends ModuleProvider {
throw
new
ModuleStartException
(
e
.
getMessage
(),
e
);
}
StreamAnnotationListener
streamAnnotationListener
=
new
StreamAnnotationListener
(
getManager
());
AnnotationScan
scopeScan
=
new
AnnotationScan
();
scopeScan
.
registerListener
(
new
DefaultScopeDefine
.
Listener
());
try
{
...
...
@@ -264,9 +264,10 @@ public class CoreModuleProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
CommandService
.
class
,
new
CommandService
(
getManager
()));
// add oal engine loader service implementations
this
.
registerServiceImplementation
(
OALEngineLoaderService
.
class
,
new
OALEngineLoaderService
(
getManager
()));
oalEngineLoaderService
=
new
OALEngineLoaderService
(
getManager
());
this
.
registerServiceImplementation
(
OALEngineLoaderService
.
class
,
oalEngineLoaderService
);
annotationScan
.
registerListener
(
streamAnnotationListener
);
annotationScan
.
registerListener
(
new
StreamAnnotationListener
(
getManager
())
);
if
(
moduleConfig
.
isGRPCSslEnabled
())
{
this
.
remoteClientManager
=
new
RemoteClientManager
(
getManager
(),
moduleConfig
.
getRemoteTimeout
(),
...
...
@@ -293,6 +294,9 @@ public class CoreModuleProvider extends ModuleProvider {
grpcServer
.
addHandler
(
new
HealthCheckServiceHandler
());
remoteClientManager
.
start
();
// Disable OAL script has higher priority
oalEngineLoaderService
.
load
(
DisableOALDefine
.
INSTANCE
);
try
{
receiver
.
scan
();
annotationScan
.
scan
();
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/oal/rt/DisableOALDefine.java
0 → 100644
浏览文件 @
2b85ba10
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.oal.rt
;
public
class
DisableOALDefine
extends
OALDefine
{
public
static
final
DisableOALDefine
INSTANCE
=
new
DisableOALDefine
();
private
DisableOALDefine
()
{
super
(
"oal/disable.oal"
,
"org.apache.skywalking.oap.server.core.source"
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录