File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
boot/src/main/kotlin/spp/probe
common/src/main/kotlin/spp/probe Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,11 @@ object SourceProbe {
240240 it.getString(" client_id" )?.let { probeMessageHeaders.put(" client_id" , it) }
241241 it.getString(" client_secret" )?.let { probeMessageHeaders.put(" client_secret" , it) }
242242 it.getString(" tenant_id" )?.let { probeMessageHeaders.put(" tenant_id" , it) }
243+
244+ if (ProbeConfiguration .spp.containsKey(" application" )) {
245+ it.getString(" environment" )?.let { probeMessageHeaders.put(" environment" , it) }
246+ it.getString(" version" )?.let { probeMessageHeaders.put(" version" , it) }
247+ }
243248 }
244249
245250 // send probe connected status
Original file line number Diff line number Diff line change @@ -232,14 +232,9 @@ object ProbeConfiguration {
232232 val clientId = it.getString(" client_id" )
233233 val clientSecret = it.getString(" client_secret" )
234234 val tenantId = it.getString(" tenant_id" )
235- val clientAuth = " $clientId :$clientSecret " .let {
236- if (tenantId != null ) {
237- " $it :$tenantId "
238- } else {
239- it
240- }
241- }
242- arrayOf(" skywalking.agent.authentication" , clientAuth)
235+ val environment = spp.getJsonObject(" application" )?.getString(" environment" )
236+ val version = spp.getJsonObject(" application" )?.getString(" version" )
237+ arrayOf(" skywalking.agent.authentication" , " $clientId :$clientSecret :$tenantId :$environment :$version " )
243238 }
244239 ).filterNotNull().toMutableSet()
245240 }
You can’t perform that action at this time.
0 commit comments