Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/data-genertor' into data-genertor
Browse files Browse the repository at this point in the history
  • Loading branch information
hanahmily committed Mar 17, 2024
2 parents f15c336 + 8d4d58e commit 8f04e9c
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/skywalking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ jobs:
submodules: true
- name: Filter OAP
id: filter-oap
# The GHA version is pinned by infra
uses: tj-actions/changed-files@v35.9.2
# The GHA version is pinned by infra (2024-03-17)
uses: tj-actions/changed-files@v43.0.0
with:
files_ignore: |
**/*.{md,txt}
Expand All @@ -139,13 +139,13 @@ jobs:
component-libraries.yml
- name: Filter POM
id: filter-pom
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v43.0.0
with:
files: |
**/pom.xml
- name: Filter UI
id: filter-ui
uses: tj-actions/changed-files@v35.9.2
uses: tj-actions/changed-files@v43.0.0
with:
files: |
skywalking-ui
Expand Down
10 changes: 10 additions & 0 deletions apm-webapp/src/main/assembly/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,22 @@
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingFile>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout>
<pattern>%m%n</pattern>
</PatternLayout>
<MarkerFilter marker="Console" onMatch="ACCEPT" onMismatch="DENY"/>
</Console>
</Appenders>
<Loggers>
<logger name="org.apache.zookeeper" level="INFO"/>
<logger name="io.grpc.netty" level="INFO"/>
<Logger name="org.apache.skywalking.oap.server.webapp.ApplicationStartUp" level="INFO" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Root level="info">
<AppenderRef ref="RollingFile"/>
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
import static org.yaml.snakeyaml.env.EnvScalarConstructor.ENV_FORMAT;
import static org.yaml.snakeyaml.env.EnvScalarConstructor.ENV_TAG;
import java.util.Collections;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.TypeDescription;
import org.yaml.snakeyaml.Yaml;
Expand All @@ -32,8 +35,10 @@
import com.linecorp.armeria.server.file.HttpFile;
import com.linecorp.armeria.server.healthcheck.HealthCheckService;

@Slf4j
public class ApplicationStartUp {
public static void main(String[] args) throws Exception {
final Marker startedMarker = MarkerFactory.getMarker("Console");
final Yaml yaml = new Yaml(
new EnvScalarConstructor(
new TypeDescription(Configuration.class),
Expand Down Expand Up @@ -79,5 +84,9 @@ public static void main(String[] args) throws Exception {
.build()
.start()
.join();

log.info(startedMarker, "SkyWalking Booster UI is now running. " +
"OAP service at {} and Booster UI at http://localhost:{}",
String.join(", ", oapServices), port);
}
}
2 changes: 1 addition & 1 deletion dist-material/bin/oapService.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ done
OAP_OPTIONS=" -Doap.logDir=${OAP_LOG_DIR}"

eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} ${OAP_OPTIONS} -classpath $CLASSPATH org.apache.skywalking.oap.server.starter.OAPServerStartUp \
2>${OAP_LOG_DIR}/oap.log 1> /dev/null"
2>${OAP_LOG_DIR}/oap.log"
4 changes: 2 additions & 2 deletions dist-material/bin/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ PRGDIR=`dirname "$PRG"`
OAP_EXE=oapService.sh
WEBAPP_EXE=webappService.sh

"$PRGDIR"/"$OAP_EXE" &
"$PRGDIR"/"$OAP_EXE" 1> /dev/null &

"$PRGDIR"/"$WEBAPP_EXE" &
"$PRGDIR"/"$WEBAPP_EXE" 1> /dev/null &
2 changes: 1 addition & 1 deletion dist-material/bin/webappService.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ _RUNJAVA=${JAVA_HOME}/bin/java

eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} -cp ${JAR_PATH}/skywalking-webapp.jar:$JAR_PATH \
org.apache.skywalking.oap.server.webapp.ApplicationStartUp \
2>${WEBAPP_LOG_DIR}/webapp-console.log 1> /dev/null"
2>${WEBAPP_LOG_DIR}/webapp-console.log"

10 changes: 10 additions & 0 deletions dist-material/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,22 @@
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingFile>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout>
<pattern>%m%n</pattern>
</PatternLayout>
<MarkerFilter marker="Console" onMatch="ACCEPT" onMismatch="DENY"/>
</Console>
</Appenders>
<Loggers>
<logger name="org.apache.zookeeper" level="INFO"/>
<logger name="io.grpc.netty" level="INFO"/>
<Logger name="org.apache.skywalking.oap.server.library.server.grpc.GRPCServer" level="INFO" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Root level="info">
<AppenderRef ref="RollingFile"/>
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
1 change: 1 addition & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
- PULSAR -> K8S_SERVICE
- VIRTUAL_MQ -> PULSAR
* Add Golang as a supported language for Kafka.
* Support displaying the port services listen to from OAP and UI during server start.
* Refactor data-generator to support generating metrics.

#### UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import org.apache.skywalking.oap.server.library.server.Server;
import org.apache.skywalking.oap.server.library.server.ServerException;
import org.apache.skywalking.oap.server.library.server.grpc.ssl.DynamicSslContext;
Expand All @@ -51,6 +53,7 @@ public class GRPCServer implements Server {
private String trustedCAsFile;
private DynamicSslContext sslContext;
private int threadPoolSize;
private static final Marker SERVER_START_MARKER = MarkerFactory.getMarker("Console");

public GRPCServer(String host, int port) {
this.host = host;
Expand Down Expand Up @@ -105,7 +108,7 @@ public void initialize() {
sslContext = DynamicSslContext.forServer(privateKeyFile, certChainFile, trustedCAsFile);
nettyServerBuilder.sslContext(sslContext);
}
log.info("Server started, host {} listening on {}", host, port);
log.info(SERVER_START_MARKER, "Server started, host {} listening on {}", host, port);
}

static class CustomRejectedExecutionHandler implements RejectedExecutionHandler {
Expand Down

0 comments on commit 8f04e9c

Please sign in to comment.