File tree 3 files changed +7
-4
lines changed
common/src/main/kotlin/spp/probe
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
30
30
import io.vertx.ext.eventbus.bridge.tcp.impl.protocol.FrameParser
31
31
import org.apache.skywalking.apm.agent.core.conf.Config
32
32
import org.apache.skywalking.apm.agent.core.logging.core.LogLevel
33
+ import spp.probe.ProbeConfiguration.PROBE_DIRECTORY
33
34
import spp.probe.ProbeConfiguration.PROBE_ID
34
35
import spp.probe.ProbeConfiguration.instrumentation
35
36
import spp.probe.ProbeConfiguration.probeMessageHeaders
@@ -56,10 +57,6 @@ import java.util.zip.ZipInputStream
56
57
object SourceProbe {
57
58
58
59
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
- )
63
60
64
61
@JvmField
65
62
var vertx: Vertx ? = null
Original file line number Diff line number Diff line change 2
2
platform_host : ${SPP_PROBE_PLATFORM_HOST:-localhost}
3
3
platform_port : ${SPP_PROBE_PLATFORM_PORT:-12800}
4
4
quiet_mode : ${SPP_PROBE_QUIET_MODE:-false}
5
+ install_directory : ${SPP_PROBE_INSTALL_DIRECTORY:-/tmp/spp-probe}
5
6
skywalking :
6
7
logging :
7
8
level : ${SW_LOGGING_LEVEL:-INFO}
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ import kotlin.system.exitProcess
31
31
32
32
object ProbeConfiguration {
33
33
34
+ val PROBE_DIRECTORY by lazy {
35
+ getString(" probe_directory" )?.let { File (it) }
36
+ ? : File (System .getProperty(" java.io.tmpdir" ), " spp-probe" )
37
+ }
38
+
34
39
@JvmField
35
40
val PROBE_ID = UUID .randomUUID().toString()
36
41
var instrumentation: Instrumentation ? = null
You can’t perform that action at this time.
0 commit comments