File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
common/src/main/kotlin/spp/probe Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import io.vertx.ext.eventbus.bridge.tcp.impl.protocol.FrameHelper
3030import io.vertx.ext.eventbus.bridge.tcp.impl.protocol.FrameParser
3131import org.apache.skywalking.apm.agent.core.conf.Config
3232import org.apache.skywalking.apm.agent.core.logging.core.LogLevel
33+ import spp.probe.ProbeConfiguration.PROBE_DIRECTORY
3334import spp.probe.ProbeConfiguration.PROBE_ID
3435import spp.probe.ProbeConfiguration.instrumentation
3536import spp.probe.ProbeConfiguration.probeMessageHeaders
@@ -56,10 +57,6 @@ import java.util.zip.ZipInputStream
5657object SourceProbe {
5758
5859 private val BUILD = ResourceBundle .getBundle(" probe_build" )
59- private var PROBE_DIRECTORY = File (
60- if (System .getProperty(" os.name" ).lowercase().startsWith(" mac" ))
61- " /tmp" else System .getProperty(" java.io.tmpdir" ), " spp-probe"
62- )
6360
6461 @JvmField
6562 var vertx: Vertx ? = null
Original file line number Diff line number Diff line change 22 platform_host : ${SPP_PROBE_PLATFORM_HOST:-localhost}
33 platform_port : ${SPP_PROBE_PLATFORM_PORT:-12800}
44 quiet_mode : ${SPP_PROBE_QUIET_MODE:-false}
5+ install_directory : ${SPP_PROBE_INSTALL_DIRECTORY:-/tmp/spp-probe}
56skywalking :
67 logging :
78 level : ${SW_LOGGING_LEVEL:-INFO}
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ import kotlin.system.exitProcess
3131
3232object ProbeConfiguration {
3333
34+ val PROBE_DIRECTORY by lazy {
35+ getString(" probe_directory" )?.let { File (it) }
36+ ? : File (System .getProperty(" java.io.tmpdir" ), " spp-probe" )
37+ }
38+
3439 @JvmField
3540 val PROBE_ID = UUID .randomUUID().toString()
3641 var instrumentation: Instrumentation ? = null
You can’t perform that action at this time.
0 commit comments