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 {
240
240
it.getString(" client_id" )?.let { probeMessageHeaders.put(" client_id" , it) }
241
241
it.getString(" client_secret" )?.let { probeMessageHeaders.put(" client_secret" , it) }
242
242
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
+ }
243
248
}
244
249
245
250
// send probe connected status
Original file line number Diff line number Diff line change @@ -232,14 +232,9 @@ object ProbeConfiguration {
232
232
val clientId = it.getString(" client_id" )
233
233
val clientSecret = it.getString(" client_secret" )
234
234
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 " )
243
238
}
244
239
).filterNotNull().toMutableSet()
245
240
}
You can’t perform that action at this time.
0 commit comments