未验证 提交 28806998 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Make OAL controlled by the receivers. (#4767)

* Split the official_analysis.oal into different parts

* Add Envoy OAL define.

* Fix license.
上级 49ed4788
......@@ -48,22 +48,15 @@
<includes>
<include>application.yml</include>
<include>component-libraries.yml</include>
<include>official_analysis.oal</include>
<include>gateways.yml</include>
<include>service-apdex-threshold.yml</include>
<include>oal/core.oal</include>
<include>oal/java-agent.oal</include>
<include>oal/dotnet-agent.oal</include>
<include>oal/envoy.oal</include>
</includes>
<outputDirectory>/config</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/../oap-server/server-starter-es7/target/skywalking-oap-assembly/skywalking-oap/config</directory>
<outputDirectory>/config</outputDirectory>
<includes>
<include>*.yml</include>
<include>*.xml</include>
<include>*.properties</include>
<include>*.oal</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../oap-server/server-starter-es7/target/skywalking-oap-assembly/skywalking-oap/libs</directory>
<outputDirectory>/oap-libs</outputDirectory>
......
......@@ -48,22 +48,15 @@
<includes>
<include>application.yml</include>
<include>component-libraries.yml</include>
<include>official_analysis.oal</include>
<include>gateways.yml</include>
<include>service-apdex-threshold.yml</include>
<include>oal/core.oal</include>
<include>oal/java-agent.oal</include>
<include>oal/dotnet-agent.oal</include>
<include>oal/envoy.oal</include>
</includes>
<outputDirectory>/config</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/../oap-server/server-starter/target/skywalking-oap-assembly/skywalking-oap/config</directory>
<outputDirectory>/config</outputDirectory>
<includes>
<include>*.yml</include>
<include>*.xml</include>
<include>*.properties</include>
<include>*.oal</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../oap-server/server-starter/target/skywalking-oap-assembly/skywalking-oap/libs</directory>
<outputDirectory>/oap-libs</outputDirectory>
......
......@@ -107,7 +107,7 @@ and private plugin developer should read this.
- If you want to build a new probe or plugin in any language, please read [Component library definition and extension](Component-library-settings.md) document.
- [Storage extension development guide](storage-extention.md). Help potential contributors to build a new
storage implementor besides the official.
- Customize analysis by oal script. OAL scripts locate in `config/official_analysis.oal`. You could change it and reboot the OAP server. Read
- Customize analysis by oal script. OAL scripts locate in `config/oal/*.oal`. You could change it and reboot the OAP server. Read
[Observability Analysis Language Introduction](../concepts-and-designs/oal.md) if you need to learn about OAL script.
- [Source and scope extension for new metrics](source-extension.md). If you want to analysis a new metrics, which SkyWalking
haven't provide. You need to
......
# Official OAL script
First, read [OAL introduction](../concepts-and-designs/oal.md).
Find OAL script at the `/config/official_analysis.oal` of SkyWalking dist, since 6.3.
Find OAL script at the `/config/oal/*.oal` of SkyWalking dist, since 8.0.0.
You could change it(such as adding filter condition, or add new metrics) and reboot the OAP server, then it will affect.
All metrics named in this script could be used in alarm and UI query.
......
......@@ -71,7 +71,7 @@ extend type Query {
}
```
Metrics are defined in the [official_analysis.oal](../../../oap-server/server-bootstrap/src/main/resources/official_analysis.oal).
Metrics are defined in the `config/oal/*.oal` files.
### Aggregation
Aggregation query means the metrics data need a secondary aggregation in query stage, which makes the query
......
......@@ -240,9 +240,12 @@
<exclude>log4j2.xml</exclude>
<exclude>alarm-settings.yml</exclude>
<exclude>component-libraries.yml</exclude>
<exclude>official_analysis.oal</exclude>
<exclude>gateways.yml</exclude>
<exclude>service-apdex-threshold.yml</exclude>
<exclude>oal/core.oal</exclude>
<exclude>oal/java-agent.oal</exclude>
<exclude>oal/dotnet-agent.oal</exclude>
<exclude>oal/envoy.oal</exclude>
</excludes>
</configuration>
</plugin>
......
......@@ -192,6 +192,7 @@ istio-telemetry:
envoy-metric:
selector: ${SW_ENVOY_METRIC:default}
default:
acceptMetricsService: ${SW_ENVOY_METRIC_SERVICE:true}
alsHTTPAnalysis: ${SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS:""}
prometheus-fetcher:
......
......@@ -37,7 +37,6 @@ service_relation_server_resp_time = from(ServiceRelation.latency).filter(detectP
service_relation_client_percentile = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.CLIENT).percentile(10); // Multiple values including p50, p75, p90, p95, p99
service_relation_server_percentile = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.SERVER).percentile(10); // Multiple values including p50, p75, p90, p95, p99
// Service Instance relation scope metrics for topology
service_instance_relation_client_cpm = from(ServiceInstanceRelation.*).filter(detectPoint == DetectPoint.CLIENT).cpm();
service_instance_relation_server_cpm = from(ServiceInstanceRelation.*).filter(detectPoint == DetectPoint.SERVER).cpm();
......@@ -63,38 +62,11 @@ endpoint_percentile = from(Endpoint.latency).percentile(10); // Multiple values
endpoint_relation_cpm = from(EndpointRelation.*).filter(detectPoint == DetectPoint.SERVER).cpm();
endpoint_relation_resp_time = from(EndpointRelation.rpcLatency).filter(detectPoint == DetectPoint.SERVER).longAvg();
// JVM instance metrics
instance_jvm_cpu = from(ServiceInstanceJVMCPU.usePercent).doubleAvg();
instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == true).longAvg();
instance_jvm_memory_noheap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == false).longAvg();
instance_jvm_memory_heap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == true).longAvg();
instance_jvm_memory_noheap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == false).longAvg();
instance_jvm_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.OLD).sum();
instance_jvm_young_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.OLD).sum();
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);
// CLR instance metrics
instance_clr_cpu = from(ServiceInstanceCLRCPU.usePercent).doubleAvg();
instance_clr_gen0_collect_count = from(ServiceInstanceCLRGC.gen0CollectCount).sum();
instance_clr_gen1_collect_count = from(ServiceInstanceCLRGC.gen1CollectCount).sum();
instance_clr_gen2_collect_count = from(ServiceInstanceCLRGC.gen2CollectCount).sum();
instance_clr_heap_memory = from(ServiceInstanceCLRGC.heapMemory).longAvg();
instance_clr_available_completion_port_threads = from(ServiceInstanceCLRThread.availableCompletionPortThreads).max();
instance_clr_available_worker_threads = from(ServiceInstanceCLRThread.availableWorkerThreads).max();
instance_clr_max_completion_port_threads = from(ServiceInstanceCLRThread.maxCompletionPortThreads).max();
instance_clr_max_worker_threads = from(ServiceInstanceCLRThread.maxWorkerThreads).max();
// Envoy instance metrics
envoy_heap_memory_max_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.memory_heap_size").maxDouble();
envoy_total_connections_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.total_connections").maxDouble();
envoy_parent_connections_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.parent_connections").maxDouble();
// Disable unnecessary hard core stream, targeting @Stream#name
/////////
// disable(segment);
......
/*
* 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.
*
*/
// CLR instance metrics
instance_clr_cpu = from(ServiceInstanceCLRCPU.usePercent).doubleAvg();
instance_clr_gen0_collect_count = from(ServiceInstanceCLRGC.gen0CollectCount).sum();
instance_clr_gen1_collect_count = from(ServiceInstanceCLRGC.gen1CollectCount).sum();
instance_clr_gen2_collect_count = from(ServiceInstanceCLRGC.gen2CollectCount).sum();
instance_clr_heap_memory = from(ServiceInstanceCLRGC.heapMemory).longAvg();
instance_clr_available_completion_port_threads = from(ServiceInstanceCLRThread.availableCompletionPortThreads).max();
instance_clr_available_worker_threads = from(ServiceInstanceCLRThread.availableWorkerThreads).max();
instance_clr_max_completion_port_threads = from(ServiceInstanceCLRThread.maxCompletionPortThreads).max();
instance_clr_max_worker_threads = from(ServiceInstanceCLRThread.maxWorkerThreads).max();
\ No newline at end of file
/*
* 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.
*
*/
// Envoy instance metrics
envoy_heap_memory_max_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.memory_heap_size").maxDouble();
envoy_total_connections_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.total_connections").maxDouble();
envoy_parent_connections_used = from(EnvoyInstanceMetric.value).filter(metricName == "server.parent_connections").maxDouble();
\ No newline at end of file
/*
* 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.
*
*/
// JVM instance metrics
instance_jvm_cpu = from(ServiceInstanceJVMCPU.usePercent).doubleAvg();
instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == true).longAvg();
instance_jvm_memory_noheap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == false).longAvg();
instance_jvm_memory_heap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == true).longAvg();
instance_jvm_memory_noheap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == false).longAvg();
instance_jvm_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.OLD).sum();
instance_jvm_young_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.NEW).sum();
instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.OLD).sum();
\ No newline at end of file
......@@ -17,17 +17,13 @@
package org.apache.skywalking.oap.server.core.oal.rt;
public class OfficialOALDefine extends OALDefine {
public class CoreOALDefine extends OALDefine {
public static final CoreOALDefine INSTANCE = new CoreOALDefine();
public static final OfficialOALDefine INSTANCE = new OfficialOALDefine();
private OfficialOALDefine() {
private CoreOALDefine() {
super(
"official_analysis.oal",
"org.apache.skywalking.oap.server.core.source",
"org.apache.skywalking.oal.rt.official.metrics",
"org.apache.skywalking.oal.rt.official.metrics.builder",
"org.apache.skywalking.oal.rt.official.dispatcher"
"oal/core.oal",
"org.apache.skywalking.oap.server.core.source"
);
}
}
......@@ -31,16 +31,13 @@ import static java.util.Objects.requireNonNull;
@ToString
@EqualsAndHashCode
public abstract class OALDefine {
OALDefine(final String configFile,
final String sourcePackage,
final String dynamicMetricsClassPackage,
final String dynamicMetricsBuilderClassPackage, final String dynamicDispatcherClassPackage) {
protected OALDefine(final String configFile,
final String sourcePackage) {
this.configFile = requireNonNull(configFile);
this.sourcePackage = appendPoint(requireNonNull(sourcePackage));
this.dynamicMetricsClassPackage = appendPoint(requireNonNull(dynamicMetricsClassPackage));
this.dynamicMetricsBuilderClassPackage = appendPoint(requireNonNull(dynamicMetricsBuilderClassPackage));
this.dynamicDispatcherClassPackage = appendPoint(requireNonNull(dynamicDispatcherClassPackage));
this.dynamicMetricsClassPackage = appendPoint(sourcePackage + ".oal.rt.metrics");
this.dynamicMetricsBuilderClassPackage = appendPoint(sourcePackage + ".oal.rt.metrics.builder");
this.dynamicDispatcherClassPackage = appendPoint(sourcePackage + ".oal.rt.dispatcher");
}
private final String configFile;
......
......@@ -20,17 +20,22 @@ package org.apache.skywalking.oap.query.graphql.resolver;
import com.coxautodev.graphql.tools.GraphQLQueryResolver;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.analysis.metrics.DataTable;
import org.apache.skywalking.oap.server.core.query.AggregationQueryService;
import org.apache.skywalking.oap.server.core.query.MetricsMetadataQueryService;
import org.apache.skywalking.oap.server.core.query.MetricsQueryService;
import org.apache.skywalking.oap.server.core.query.PointOfTime;
import org.apache.skywalking.oap.server.core.query.TopNRecordsQueryService;
import org.apache.skywalking.oap.server.core.query.enumeration.MetricsType;
import org.apache.skywalking.oap.server.core.query.input.Duration;
import org.apache.skywalking.oap.server.core.query.input.MetricsCondition;
import org.apache.skywalking.oap.server.core.query.input.TopNCondition;
import org.apache.skywalking.oap.server.core.query.type.HeatMap;
import org.apache.skywalking.oap.server.core.query.type.KVInt;
import org.apache.skywalking.oap.server.core.query.type.MetricsValues;
import org.apache.skywalking.oap.server.core.query.type.SelectedRecord;
import org.apache.skywalking.oap.server.library.module.ModuleManager;
......@@ -98,6 +103,9 @@ public class MetricsQuery implements GraphQLQueryResolver {
* Read metrics single value in the duration of required metrics
*/
public int readMetricsValue(MetricsCondition condition, Duration duration) throws IOException {
if (MetricsType.UNKNOWN.equals(typeOfMetrics(condition.getName()))) {
return 0;
}
return getMetricsQueryService().readMetricsValue(condition, duration);
}
......@@ -105,6 +113,18 @@ public class MetricsQuery implements GraphQLQueryResolver {
* Read time-series values in the duration of required metrics
*/
public MetricsValues readMetricsValues(MetricsCondition condition, Duration duration) throws IOException {
if (MetricsType.UNKNOWN.equals(typeOfMetrics(condition.getName()))) {
final List<PointOfTime> pointOfTimes = duration.assembleDurationPoints();
MetricsValues values = new MetricsValues();
pointOfTimes.forEach(pointOfTime -> {
String id = pointOfTime.id(condition.getEntity().buildId());
final KVInt kvInt = new KVInt();
kvInt.setId(id);
kvInt.setValue(0);
values.getValues().addKVInt(kvInt);
});
return values;
}
return getMetricsQueryService().readMetricsValues(condition, duration);
}
......@@ -112,6 +132,9 @@ public class MetricsQuery implements GraphQLQueryResolver {
* Read entity list of required metrics and parent entity type.
*/
public List<SelectedRecord> sortMetrics(TopNCondition condition, Duration duration) throws IOException {
if (MetricsType.UNKNOWN.equals(typeOfMetrics(condition.getName()))) {
return Collections.emptyList();
}
return getQueryService().sortMetrics(condition, duration);
}
......@@ -123,6 +146,24 @@ public class MetricsQuery implements GraphQLQueryResolver {
public List<MetricsValues> readLabeledMetricsValues(MetricsCondition condition,
List<String> labels,
Duration duration) throws IOException {
if (MetricsType.UNKNOWN.equals(typeOfMetrics(condition.getName()))) {
final List<PointOfTime> pointOfTimes = duration.assembleDurationPoints();
List<MetricsValues> labeledValues = new ArrayList<>(labels.size());
labels.forEach(label -> {
MetricsValues values = new MetricsValues();
pointOfTimes.forEach(pointOfTime -> {
String id = pointOfTime.id(condition.getEntity().buildId());
final KVInt kvInt = new KVInt();
kvInt.setId(id);
kvInt.setValue(0);
values.getValues().addKVInt(kvInt);
});
values.setLabel(label);
labeledValues.add(values);
});
return labeledValues;
}
return getMetricsQueryService().readLabeledMetricsValues(condition, labels, duration);
}
......@@ -139,6 +180,18 @@ public class MetricsQuery implements GraphQLQueryResolver {
* </pre>
*/
public HeatMap readHeatMap(MetricsCondition condition, Duration duration) throws IOException {
if (MetricsType.UNKNOWN.equals(typeOfMetrics(condition.getName()))) {
DataTable emptyData = new DataTable();
emptyData.put("0", 0L);
final String rawdata = emptyData.toStorageData();
final HeatMap heatMap = new HeatMap();
final List<PointOfTime> pointOfTimes = duration.assembleDurationPoints();
pointOfTimes.forEach(pointOfTime -> {
String id = pointOfTime.id(condition.getEntity().buildId());
heatMap.buildColumn(id, rawdata, 0);
});
return heatMap;
}
return getMetricsQueryService().readHeatMap(condition, duration);
}
......@@ -146,6 +199,9 @@ public class MetricsQuery implements GraphQLQueryResolver {
* Read the sampled records.
*/
public List<SelectedRecord> readSampledRecords(TopNCondition condition, Duration duration) throws IOException {
if (MetricsType.UNKNOWN.equals(typeOfMetrics(condition.getName()))) {
return Collections.emptyList();
}
return getTopNRecordsQueryService().readSampledRecords(condition, duration);
}
}
......@@ -23,9 +23,12 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import lombok.Getter;
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
public class EnvoyMetricReceiverConfig extends ModuleConfig {
@Getter
private boolean acceptMetricsService = false;
private String alsHTTPAnalysis;
public List<String> getAlsHTTPAnalysis() {
......
......@@ -18,7 +18,9 @@
package org.apache.skywalking.oap.server.receiver.envoy;
import org.apache.skywalking.aop.server.receiver.mesh.MeshReceiverModule;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService;
import org.apache.skywalking.oap.server.core.server.GRPCHandlerRegister;
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
import org.apache.skywalking.oap.server.library.module.ModuleDefine;
......@@ -60,7 +62,14 @@ public class EnvoyMetricReceiverProvider extends ModuleProvider {
GRPCHandlerRegister service = getManager().find(SharingServerModule.NAME)
.provider()
.getService(GRPCHandlerRegister.class);
service.addHandler(new MetricServiceGRPCHandler(getManager()));
if (config.isAcceptMetricsService()) {
getManager().find(CoreModule.NAME)
.provider()
.getService(OALEngineLoaderService.class)
.load(EnvoyOALDefine.INSTANCE);
service.addHandler(new MetricServiceGRPCHandler(getManager()));
}
service.addHandler(new AccessLogServiceGRPCHandler(getManager(), config));
}
......@@ -74,7 +83,8 @@ public class EnvoyMetricReceiverProvider extends ModuleProvider {
return new String[] {
TelemetryModule.NAME,
CoreModule.NAME,
SharingServerModule.NAME
SharingServerModule.NAME,
MeshReceiverModule.NAME
};
}
}
/*
* 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.receiver.envoy;
import org.apache.skywalking.oap.server.core.oal.rt.OALDefine;
/**
* Envoy OAl script includes the metrics related to Envoy only.
*/
public class EnvoyOALDefine extends OALDefine {
public static final EnvoyOALDefine INSTANCE = new EnvoyOALDefine();
private EnvoyOALDefine() {
super(
"oal/envoy.oal",
"org.apache.skywalking.oap.server.core.source"
);
}
}
\ No newline at end of file
......@@ -20,7 +20,6 @@ package org.apache.skywalking.oap.server.receiver.clr.provider;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService;
import org.apache.skywalking.oap.server.core.oal.rt.OfficialOALDefine;
import org.apache.skywalking.oap.server.core.server.GRPCHandlerRegister;
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
import org.apache.skywalking.oap.server.library.module.ModuleDefine;
......@@ -62,7 +61,7 @@ public class CLRModuleProvider extends ModuleProvider {
getManager().find(CoreModule.NAME)
.provider()
.getService(OALEngineLoaderService.class)
.load(OfficialOALDefine.INSTANCE);
.load(CLROALDefine.INSTANCE);
GRPCHandlerRegister grpcHandlerRegister = getManager().find(SharingServerModule.NAME)
.provider()
......
/*
* 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.receiver.clr.provider;
import org.apache.skywalking.oap.server.core.oal.rt.OALDefine;
/**
* CLR OAL script includes the metrics related to dot net CLR only.
*/
public class CLROALDefine extends OALDefine {
public static final CLROALDefine INSTANCE = new CLROALDefine();
private CLROALDefine() {
super(
"oal/dotnet-agent.oal",
"org.apache.skywalking.oap.server.core.source"
);
}
}
\ No newline at end of file
......@@ -20,8 +20,6 @@ package org.apache.skywalking.oap.server.receiver.istio.telemetry.provider;
import org.apache.skywalking.aop.server.receiver.mesh.MeshReceiverModule;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService;
import org.apache.skywalking.oap.server.core.oal.rt.OfficialOALDefine;
import org.apache.skywalking.oap.server.core.server.GRPCHandlerRegister;
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
import org.apache.skywalking.oap.server.library.module.ModuleDefine;
......@@ -54,12 +52,6 @@ public class IstioTelemetryReceiverProvider extends ModuleProvider {
@Override
public void start() throws ServiceNotProvidedException, ModuleStartException {
// load official analysis
getManager().find(CoreModule.NAME)
.provider()
.getService(OALEngineLoaderService.class)
.load(OfficialOALDefine.INSTANCE);
GRPCHandlerRegister service = getManager().find(SharingServerModule.NAME)
.provider()
.getService(GRPCHandlerRegister.class);
......
......@@ -20,7 +20,6 @@ package org.apache.skywalking.oap.server.receiver.jvm.provider;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService;
import org.apache.skywalking.oap.server.core.oal.rt.OfficialOALDefine;
import org.apache.skywalking.oap.server.core.server.GRPCHandlerRegister;
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
import org.apache.skywalking.oap.server.library.module.ModuleDefine;
......@@ -57,7 +56,7 @@ public class JVMModuleProvider extends ModuleProvider {
getManager().find(CoreModule.NAME)
.provider()
.getService(OALEngineLoaderService.class)
.load(OfficialOALDefine.INSTANCE);
.load(JVMOALDefine.INSTANCE);
GRPCHandlerRegister grpcHandlerRegister = getManager().find(SharingServerModule.NAME)
.provider()
......
/*
* 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.receiver.jvm.provider;
import org.apache.skywalking.oap.server.core.oal.rt.OALDefine;
/**
* JVM OAl script includes the metrics related to JVM only.
*/
public class JVMOALDefine extends OALDefine {
public static final JVMOALDefine INSTANCE = new JVMOALDefine();
private JVMOALDefine() {
super(
"oal/java-agent.oal",
"org.apache.skywalking.oap.server.core.source"
);
}
}
......@@ -20,7 +20,7 @@ package org.apache.skywalking.aop.server.receiver.mesh;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService;
import org.apache.skywalking.oap.server.core.oal.rt.OfficialOALDefine;
import org.apache.skywalking.oap.server.core.oal.rt.CoreOALDefine;
import org.apache.skywalking.oap.server.core.server.GRPCHandlerRegister;
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
import org.apache.skywalking.oap.server.library.module.ModuleDefine;
......@@ -62,7 +62,7 @@ public class MeshReceiverProvider extends ModuleProvider {
getManager().find(CoreModule.NAME)
.provider()
.getService(OALEngineLoaderService.class)
.load(OfficialOALDefine.INSTANCE);
.load(CoreOALDefine.INSTANCE);
TelemetryDataDispatcher.init(getManager());
GRPCHandlerRegister service = getManager().find(SharingServerModule.NAME)
......
......@@ -38,7 +38,7 @@ import org.apache.skywalking.oap.server.core.analysis.IDManager;
import org.apache.skywalking.oap.server.core.analysis.NodeType;
import org.apache.skywalking.oap.server.core.analysis.TimeBucket;
import org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService;
import org.apache.skywalking.oap.server.core.oal.rt.OfficialOALDefine;
import org.apache.skywalking.oap.server.core.oal.rt.CoreOALDefine;
import org.apache.skywalking.oap.server.core.source.GCPhrase;
import org.apache.skywalking.oap.server.core.source.MemoryPoolType;
import org.apache.skywalking.oap.server.core.source.ServiceInstanceJVMCPU;
......@@ -117,7 +117,7 @@ public class So11yReceiverModuleProvider extends ModuleProvider {
getManager().find(CoreModule.NAME)
.provider()
.getService(OALEngineLoaderService.class)
.load(OfficialOALDefine.INSTANCE);
.load(CoreOALDefine.INSTANCE);
sourceReceiver = getManager().find(CoreModule.NAME).provider().getService(SourceReceiver.class);
MetricsCollector collector = getManager().find(TelemetryModule.NAME)
......
......@@ -22,7 +22,7 @@ import org.apache.skywalking.oap.server.configuration.api.ConfigurationModule;
import org.apache.skywalking.oap.server.configuration.api.DynamicConfigurationService;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService;
import org.apache.skywalking.oap.server.core.oal.rt.OfficialOALDefine;
import org.apache.skywalking.oap.server.core.oal.rt.CoreOALDefine;
import org.apache.skywalking.oap.server.core.server.GRPCHandlerRegister;
import org.apache.skywalking.oap.server.core.server.JettyHandlerRegister;
import org.apache.skywalking.oap.server.library.module.ModuleConfig;
......@@ -88,7 +88,7 @@ public class TraceModuleProvider extends ModuleProvider {
getManager().find(CoreModule.NAME)
.provider()
.getService(OALEngineLoaderService.class)
.load(OfficialOALDefine.INSTANCE);
.load(CoreOALDefine.INSTANCE);
DynamicConfigurationService dynamicConfigurationService = getManager().find(ConfigurationModule.NAME)
.provider()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册