Skip to content

Commit

Permalink
Polish & Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
taeyeon-Kim committed Apr 23, 2023
1 parent 234d725 commit 755bb3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can override any configuration values with `-D` option.
To change the http(default 8080) and grpc(default 8080) ports used by Collector, you can change the settings below.
- `-Darmeria.port`: http, grpc uses 8080 by default

To change the default value of 10MB for the max message size of gRPC in Collector, change the setting below.
To change the the max message size of gRPC in Collector, change the setting below.
- `-Darmeria.max-message-size`: 10MB by default
- Supports `B`, `KB`, `MB`, `GB`, and `TB` units.

Expand Down Expand Up @@ -178,10 +178,10 @@ packages=com.navercorp

- Setting up the agent via `-javaagent:path/to/scavenger-agent.jar`
- Specify the config file via `-Dscavenger.configuration=path/to/scavenger.conf`
- To change the default value of 10MB for the max message size of gRPC in agent, change the setting below.
- To change the max message size of gRPC in agent, change the setting below.
- `-Dscavenger.max-message-size`
- Supports `B`, `KB`, `MB`, `GB`, and `TB` units.
> **We recommend tuning your codeBase configuration before changing `scavenger.max-message-size`.**
> **We recommend tuning your codeBase configuration for minimizing tracing ranges before changing `scavenger.max-message-size`.**

```bash
export JAVA_OPTS="$JAVA_OPTS -Dscavenger.configuration=$CATALINA_BASE/conf/scavenger.conf"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ private ManagedChannel createChannel(int maxMessageSize) {

private int maxMessageSize() {
String mexMessageSize = System.getProperty(MAX_MESSAGE_SIZE_CONFIG);
if (mexMessageSize == null) {
return DEFAULT_MAX_MESSAGE_SIZE;
}

Matcher matcher = DATA_SIZE_PATTERN.matcher(mexMessageSize);
if (!matcher.matches()) {
log.log(Level.WARNING, "[scavenger] 'scavenger.max-message-size' is not a valid data size. use the default value of 10MB");
Expand Down

0 comments on commit 755bb3d

Please sign in to comment.