5 sky walking config file walkthrough
吴晟 Wu Sheng edited this page 2017-08-14 16:53:41 +08:00

What is sky-walking.config file?

sky-walking.config file is an important config file for sky-walking agent. The agent locates the file in following order:

  1. Path from SystemProperty. Using -DconfigPath in your JVM args.
  2. Classpath. Loading by Class.getResourceAsStream("/sky-walking.config").
  3. Path, where agent.jar is.

If no found in any path, agent is still going to run in default config. You must set -DapplicationCode=test-service -Dservers=127.0.0.1:7001 through JVM args, otherwise, your application will stop with an ExceptionInInitializerError.

Example all config items in "sky-walking.config"

# Application code is showed in sky-walking-ui.
# Suggestion: set a unique name for each application, one application's nodes share the same code.
agent.application_code=Your_ApplicationName

# One, means sampling OFF.
# Greater than one, select one trace in every N traces.
# Zero and negative number are illegal.
agent.sampling_cycle=1

# Collector REST-Service address.
# e.g.
# SERVERS="127.0.0.1:8080"  for single collector node.
# SERVERS="10.2.45.126:8080,10.2.45.127:7600"  for multi collector nodes.
collector.servers=10.2.45.126:8080,10.2.45.127:7600

# Collector receive segments REST-Service name.
# If you use sky-walking-ui in default mode, no need to change this.
collector.service_name=/segments

# The max size to send traces per rest-service call.
collector.batch_size=50

# The in-memory buffer size. Based on Disruptor, this value must be 2^n.
# More info about this, see https://github.com/LMAX-Exchange/disruptor
buffer.size=512

# log file name
logging.file_name=skywalking-api.log

# Log files directory.
# Default is blank string, means, use "system.out" to output logs.
logging.dir=

# The max size of log file.
# If the size is bigger than this, archive the current file, and write into a new file.
# Default 300M per file
logging.max_file_size=314572800

# The log level. Default is debug.
logging.level=DEBUG

# Name of disabled plugins.
# The value spilt by <code>,</code>, if you have multiple plugins need to disable.
# All plugin names are in the skywalking-plugin.def, which is in the root of agent.jar
plugin.disabled_plugins=****