@@ -157,6 +157,13 @@ export class SlackIntegration extends Construct {
157157 authorizationType : apigw . AuthorizationType . NONE ,
158158 } ;
159159
160+ // Outbound SDK User-Agent solution tracking (#319), spread into every
161+ // handler environment in this construct.
162+ const abcaEnv : Record < string , string > = {
163+ ABCA_STACK_NAME : Stack . of ( this ) . stackName ,
164+ ABCA_COMPONENT : 'webhook' ,
165+ } ;
166+
160167 // --- Task creation environment (matches TaskApi createTaskEnv pattern) ---
161168 const createTaskEnv : Record < string , string > = {
162169 TASK_TABLE_NAME : props . taskTable . tableName ,
@@ -186,6 +193,7 @@ export class SlackIntegration extends Construct {
186193 architecture : Architecture . ARM_64 ,
187194 timeout : Duration . seconds ( 15 ) ,
188195 environment : {
196+ ...abcaEnv ,
189197 SLACK_INSTALLATION_TABLE_NAME : this . installationTable . tableName ,
190198 SLACK_CLIENT_ID_SECRET_ARN : this . clientIdSecret . secretArn ,
191199 SLACK_CLIENT_SECRET_ARN : this . clientSecret . secretArn ,
@@ -218,6 +226,7 @@ export class SlackIntegration extends Construct {
218226 architecture : Architecture . ARM_64 ,
219227 timeout : Duration . seconds ( 10 ) ,
220228 environment : {
229+ ...abcaEnv ,
221230 SLACK_INSTALLATION_TABLE_NAME : this . installationTable . tableName ,
222231 SLACK_SIGNING_SECRET_ARN : this . signingSecret . secretArn ,
223232 } ,
@@ -250,6 +259,7 @@ export class SlackIntegration extends Construct {
250259 timeout : Duration . seconds ( 30 ) ,
251260 memorySize : 512 ,
252261 environment : {
262+ ...abcaEnv ,
253263 ...createTaskEnv ,
254264 SLACK_USER_MAPPING_TABLE_NAME : this . userMappingTable . tableName ,
255265 SLACK_INSTALLATION_TABLE_NAME : this . installationTable . tableName ,
@@ -295,6 +305,7 @@ export class SlackIntegration extends Construct {
295305 architecture : Architecture . ARM_64 ,
296306 timeout : Duration . seconds ( 10 ) ,
297307 environment : {
308+ ...abcaEnv ,
298309 SLACK_SIGNING_SECRET_ARN : this . signingSecret . secretArn ,
299310 TASK_TABLE_NAME : props . taskTable . tableName ,
300311 SLACK_USER_MAPPING_TABLE_NAME : this . userMappingTable . tableName ,
@@ -314,6 +325,7 @@ export class SlackIntegration extends Construct {
314325 architecture : Architecture . ARM_64 ,
315326 timeout : Duration . seconds ( 3 ) ,
316327 environment : {
328+ ...abcaEnv ,
317329 SLACK_SIGNING_SECRET_ARN : this . signingSecret . secretArn ,
318330 SLACK_COMMAND_PROCESSOR_FUNCTION_NAME : commandProcessorFn . functionName ,
319331 } ,
@@ -333,6 +345,7 @@ export class SlackIntegration extends Construct {
333345 architecture : Architecture . ARM_64 ,
334346 timeout : Duration . seconds ( 10 ) ,
335347 environment : {
348+ ...abcaEnv ,
336349 SLACK_USER_MAPPING_TABLE_NAME : this . userMappingTable . tableName ,
337350 } ,
338351 bundling : commonBundling ,
0 commit comments