@@ -78,11 +78,9 @@ function tryToAnnounce(ctx, retryDelay = initialRetryDelay) {
78
78
agentConnection . announceNodeCollector ( ( err , rawResponse ) => {
79
79
if ( err ) {
80
80
logger . info (
81
- 'Establishing the connection to the Instana host agent has failed: %s. This usually means that the Instana ' +
82
- 'host agent is not yet ready to accept connections. This is not an error. Establishing the connection will ' +
83
- 'be retried in %s ms.' ,
84
- err . message ,
85
- retryDelay
81
+ `Establishing the connection to the Instana host agent has failed: ${ err ?. message } . ` +
82
+ 'This usually means that the Instana host agent is not yet ready to accept connections.' +
83
+ `This is not an error. Establishing the connection will be retried in ${ retryDelay } ms.`
86
84
) ;
87
85
setTimeout ( tryToAnnounce , retryDelay , ctx , nextRetryDelay ) . unref ( ) ;
88
86
return ;
@@ -95,18 +93,16 @@ function tryToAnnounce(ctx, retryDelay = initialRetryDelay) {
95
93
logger . error (
96
94
"Failed to parse the JSON payload from the Instana host agent's response. Establishing the connection" +
97
95
`to the Instana host agent will be retried in ${ retryDelay } ms. The response payload was ${ rawResponse } .` +
98
- `${ e . message } ${ e . stack } `
96
+ `${ e ? .message } ${ e ? .stack } `
99
97
) ;
100
98
setTimeout ( tryToAnnounce , retryDelay , ctx , nextRetryDelay ) . unref ( ) ;
101
99
return ;
102
100
}
103
101
104
102
if ( pidStore . pid !== agentResponse . pid ) {
105
103
logger . info (
106
- 'Reporting data to the Instana host agent with the PID from the root namespace (%s) instead of the ' +
107
- 'in-container PID (%s).' ,
108
- agentResponse . pid ,
109
- pidStore . pid
104
+ `Reporting data to the Instana host agent with the PID from the root namespace (${ agentResponse . pid } ) ` +
105
+ `instead of the in-container PID (${ pidStore . pid } ).`
110
106
) ;
111
107
pidStore . pid = agentResponse . pid ;
112
108
}
@@ -135,18 +131,18 @@ function applySecretsConfiguration(agentResponse) {
135
131
if ( agentResponse . secrets ) {
136
132
if ( ! ( typeof agentResponse . secrets . matcher === 'string' ) ) {
137
133
logger . warn (
138
- ' Received an invalid secrets configuration from the Instana host agent, attribute matcher is not a string: $s' ,
139
- agentResponse . secrets . matcher
134
+ ` Received an invalid secrets configuration from the Instana host agent, attribute matcher is not a string:
135
+ ${ agentResponse . secrets . matcher } `
140
136
) ;
141
137
} else if ( Object . keys ( secrets . matchers ) . indexOf ( agentResponse . secrets . matcher ) < 0 ) {
142
138
logger . warn (
143
- ' Received an invalid secrets configuration from the Intana agent, matcher is not supported: $s' ,
144
- agentResponse . secrets . matcher
139
+ ` Received an invalid secrets configuration from the Intana agent, matcher is not supported:
140
+ ${ agentResponse . secrets . matcher } `
145
141
) ;
146
142
} else if ( ! Array . isArray ( agentResponse . secrets . list ) ) {
147
143
logger . warn (
148
- ' Received an invalid secrets configuration from the Instana host agent, attribute list is not an array: $s' ,
149
- agentResponse . secrets . list
144
+ ` Received an invalid secrets configuration from the Instana host agent, attribute list is not an array:
145
+ ${ agentResponse . secrets . list } `
150
146
) ;
151
147
} else {
152
148
secrets . setMatcher ( agentResponse . secrets . matcher , agentResponse . secrets . list ) ;
0 commit comments