Skip to content

Commit

Permalink
[config] add another config file 'application.yml' for graal, remove …
Browse files Browse the repository at this point in the history
…useless code.
  • Loading branch information
yswdqz committed Sep 27, 2023
1 parent 3c4233f commit c8ba19b
Show file tree
Hide file tree
Showing 9 changed files with 587 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<fileSet>
<directory>${project.basedir}/../../oap-server/server-starter/src/main/resources</directory>
<includes>
<include>application.yml</include>
<include>component-libraries.yml</include>
<include>gateways.yml</include>
<include>service-apdex-threshold.yml</include>
Expand Down Expand Up @@ -120,4 +119,11 @@
<outputDirectory/>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.basedir}/../graal-server-starter/src/main/resources/application.yml</source>
<outputDirectory>config</outputDirectory>
<fileMode>0644</fileMode>
</file>
</files>
</assembly>
22 changes: 0 additions & 22 deletions graal/dist-material/bin/exportEnv.sh

This file was deleted.

2 changes: 2 additions & 0 deletions graal/dist-material/bin/oapService-native-jar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ if [ ! -d "${OAP_LOG_DIR}" ]; then
mkdir -p "${OAP_LOG_DIR}"
fi

export SW_CONFIG_PATHS=${OAP_HOME}/config

_RUNJAVA=${JAVA_HOME}/bin/java
[ -z "$JAVA_HOME" ] && _RUNJAVA=java

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class EnvoyMetricReceiverProviderGraal extends EnvoyMetricReceiverProvider {
@Override
public String name() {
return "default-graalvm";
return "graalvm";
}

@Override
Expand Down
1 change: 0 additions & 1 deletion graal/graal-server-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
<execution>
<id>generate</id>
<goals>
<goal>envoy-generate</goal>
<goal>oal-generate</goal>
</goals>
</execution>
Expand Down
574 changes: 574 additions & 0 deletions graal/graal-server-starter/src/main/resources/application.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class LogAnalyzerModuleProviderGraal extends LogAnalyzerModuleProvider {
@Override
public String name() {
return "default-graalvm";
return "graalvm";
}

@Override
Expand Down

This file was deleted.

13 changes: 2 additions & 11 deletions oap-server/server-starter/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ log-analyzer:
default:
lalFiles: ${SW_LOG_LAL_FILES:envoy-als,mesh-dp,mysql-slowsql,pgsql-slowsql,redis-slowsql,k8s-service,default}
malFiles: ${SW_LOG_MAL_FILES:""}
default-graalvm:
lalFiles: ${SW_LOG_LAL_FILES:envoy-als,mesh-dp,mysql-slowsql,pgsql-slowsql,redis-slowsql,k8s-service,default}
malFiles: ${SW_LOG_MAL_FILES:""}

event-analyzer:
selector: ${SW_EVENT_ANALYZER:default}
Expand Down Expand Up @@ -322,12 +319,6 @@ envoy-metric:
# Be careful, when using environment variables to pass this configuration, use single quotes(`''`) to avoid it being evaluated by the shell.
k8sServiceNameRule: ${K8S_SERVICE_NAME_RULE:"${pod.metadata.labels.(service.istio.io/canonical-name)}"}
istioServiceNameRule: ${ISTIO_SERVICE_NAME_RULE:"${serviceEntry.metadata.name}"}
default-graalvm:
acceptMetricsService: ${SW_ENVOY_METRIC_SERVICE:true}
alsHTTPAnalysis: ${SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS:""}
alsTCPAnalysis: ${SW_ENVOY_METRIC_ALS_TCP_ANALYSIS:""}
k8sServiceNameRule: ${K8S_SERVICE_NAME_RULE:"${pod.metadata.labels.(service.istio.io/canonical-name)}"}
istioServiceNameRule: ${ISTIO_SERVICE_NAME_RULE:"${serviceEntry.metadata.name}"}

kafka-fetcher:
selector: ${SW_KAFKA_FETCHER:-}
Expand Down Expand Up @@ -440,7 +431,7 @@ promql:
restMaxThreads: ${SW_PROMQL_REST_MAX_THREADS:200}
restIdleTimeOut: ${SW_PROMQL_REST_IDLE_TIMEOUT:30000}
restAcceptQueueSize: ${SW_PROMQL_REST_QUEUE_SIZE:0}

#This module is for LogQL API.
logql:
selector: ${SW_LOGQL:default}
Expand Down Expand Up @@ -584,4 +575,4 @@ ai-pipeline:
selector: ${SW_AI_PIPELINE:default}
default:
uriRecognitionServerAddr: ${SW_AI_PIPELINE_URI_RECOGNITION_SERVER_ADDR:}
uriRecognitionServerPort: ${SW_AI_PIPELINE_URI_RECOGNITION_SERVER_PORT:17128}
uriRecognitionServerPort: ${SW_AI_PIPELINE_URI_RECOGNITION_SERVER_PORT:17128}

0 comments on commit c8ba19b

Please sign in to comment.