@@ -678,7 +678,7 @@ describe("DesktopBackendConfiguration", () => {
678678 ) ,
679679 ) ;
680680
681- it . effect ( "resolveWsl carries the kill switch into the distro" , ( ) =>
681+ it . effect ( "resolveWsl carries the kill switch and resource attributes into the distro" , ( ) =>
682682 Effect . gen ( function * ( ) {
683683 const fileSystem = yield * FileSystem . FileSystem ;
684684 const baseDir = yield * fileSystem . makeTempDirectoryScoped ( {
@@ -688,10 +688,12 @@ describe("DesktopBackendConfiguration", () => {
688688 const previousWslEnv = process . env . WSLENV ;
689689 const previousDisabled = process . env . OTEL_SDK_DISABLED ;
690690 const previousTelemetry = process . env . T3CODE_TELEMETRY_ENABLED ;
691+ const previousResourceAttributes = process . env . OTEL_RESOURCE_ATTRIBUTES ;
691692 try {
692693 delete process . env . WSLENV ;
693694 process . env . OTEL_SDK_DISABLED = "true" ;
694695 process . env . T3CODE_TELEMETRY_ENABLED = "false" ;
696+ process . env . OTEL_RESOURCE_ATTRIBUTES = "deployment.environment.name=staging" ;
695697
696698 yield * Effect . gen ( function * ( ) {
697699 const configuration = yield * DesktopBackendConfiguration . DesktopBackendConfiguration ;
@@ -701,6 +703,8 @@ describe("DesktopBackendConfiguration", () => {
701703 assert . include ( ( config . env . WSLENV ?? "" ) . split ( ":" ) , "OTEL_SDK_DISABLED" ) ;
702704 assert . equal ( config . env . T3CODE_TELEMETRY_ENABLED , "false" ) ;
703705 assert . include ( ( config . env . WSLENV ?? "" ) . split ( ":" ) , "T3CODE_TELEMETRY_ENABLED" ) ;
706+ assert . equal ( config . env . OTEL_RESOURCE_ATTRIBUTES , "deployment.environment.name=staging" ) ;
707+ assert . include ( ( config . env . WSLENV ?? "" ) . split ( ":" ) , "OTEL_RESOURCE_ATTRIBUTES" ) ;
704708 } ) . pipe (
705709 Effect . provide (
706710 layerBackendConfiguration ( ) . pipe (
@@ -722,6 +726,7 @@ describe("DesktopBackendConfiguration", () => {
722726 restoreEnv ( "WSLENV" , previousWslEnv ) ;
723727 restoreEnv ( "OTEL_SDK_DISABLED" , previousDisabled ) ;
724728 restoreEnv ( "T3CODE_TELEMETRY_ENABLED" , previousTelemetry ) ;
729+ restoreEnv ( "OTEL_RESOURCE_ATTRIBUTES" , previousResourceAttributes ) ;
725730 }
726731 } ) . pipe ( Effect . scoped , Effect . provide ( NodeServices . layer ) ) ,
727732 ) ;
0 commit comments