From 746d7252a0a95d968e7e94f802675df5e07c102f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:03:16 +0000 Subject: [PATCH 1/5] Initial plan From d3bfd55f34876caeee9482fd38cfe51704788641 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:37:40 +0000 Subject: [PATCH 2/5] Add default OTEL telemetry settings to dab init config generation Co-authored-by: JerryNixon <1749983+JerryNixon@users.noreply.github.com> --- .../EndToEndTests.TestInitForCosmosDBNoSql.verified.txt | 8 ++++++++ .../InitTests.CosmosDbNoSqlDatabase.verified.txt | 8 ++++++++ .../InitTests.CosmosDbPostgreSqlDatabase.verified.txt | 8 ++++++++ ...AuthenticationProviders_171ea8114ff71814.verified.txt | 8 ++++++++ ...AuthenticationProviders_2df7a1794712f154.verified.txt | 8 ++++++++ ...AuthenticationProviders_59fe1a10aa78899d.verified.txt | 8 ++++++++ ...AuthenticationProviders_b95b637ea87f16a7.verified.txt | 8 ++++++++ ...AuthenticationProviders_daacbd948b7ef72f.verified.txt | 8 ++++++++ ...LPathWithoutStartingSlashWillHaveItAdded.verified.txt | 8 ++++++++ .../Snapshots/InitTests.MsSQLDatabase.verified.txt | 8 ++++++++ ...tPathWithoutStartingSlashWillHaveItAdded.verified.txt | 8 ++++++++ ...nitializingConfigWithoutConnectionString.verified.txt | 8 ++++++++ ....TestSpecialCharactersInConnectionString.verified.txt | 8 ++++++++ ...MultipleMutationOptions_0546bef37027a950.verified.txt | 8 ++++++++ ...MultipleMutationOptions_0ac567dd32a2e8f5.verified.txt | 8 ++++++++ ...MultipleMutationOptions_0c06949221514e77.verified.txt | 8 ++++++++ ...MultipleMutationOptions_18667ab7db033e9d.verified.txt | 8 ++++++++ ...MultipleMutationOptions_2f42f44c328eb020.verified.txt | 8 ++++++++ ...MultipleMutationOptions_3243d3f3441fdcc1.verified.txt | 8 ++++++++ ...MultipleMutationOptions_53350b8b47df2112.verified.txt | 8 ++++++++ ...MultipleMutationOptions_6584e0ec46b8a11d.verified.txt | 8 ++++++++ ...MultipleMutationOptions_81cc88db3d4eecfb.verified.txt | 8 ++++++++ ...MultipleMutationOptions_8ea187616dbb5577.verified.txt | 8 ++++++++ ...MultipleMutationOptions_905845c29560a3ef.verified.txt | 8 ++++++++ ...MultipleMutationOptions_b2fd24fab5b80917.verified.txt | 8 ++++++++ ...MultipleMutationOptions_bd7cd088755287c9.verified.txt | 8 ++++++++ ...MultipleMutationOptions_d2eccba2f836b380.verified.txt | 8 ++++++++ ...MultipleMutationOptions_d463eed7fe5e4bbe.verified.txt | 8 ++++++++ ...MultipleMutationOptions_d5520dd5c33f7b8d.verified.txt | 8 ++++++++ ...MultipleMutationOptions_eab4a6010e602b59.verified.txt | 8 ++++++++ ...MultipleMutationOptions_ecaa688829b4030e.verified.txt | 8 ++++++++ src/Cli/ConfigGenerator.cs | 9 ++++++++- 32 files changed, 256 insertions(+), 1 deletion(-) diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestInitForCosmosDBNoSql.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestInitForCosmosDBNoSql.verified.txt index 1b14a3a7f0..7471cd3cbd 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestInitForCosmosDBNoSql.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestInitForCosmosDBNoSql.verified.txt @@ -49,6 +49,14 @@ Provider: AppService }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.CosmosDbNoSqlDatabase.verified.txt b/src/Cli.Tests/Snapshots/InitTests.CosmosDbNoSqlDatabase.verified.txt index 9d5458c0ee..b1882d6150 100644 --- a/src/Cli.Tests/Snapshots/InitTests.CosmosDbNoSqlDatabase.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.CosmosDbNoSqlDatabase.verified.txt @@ -45,6 +45,14 @@ Provider: AppService }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.CosmosDbPostgreSqlDatabase.verified.txt b/src/Cli.Tests/Snapshots/InitTests.CosmosDbPostgreSqlDatabase.verified.txt index 51f6ad8d95..75676da625 100644 --- a/src/Cli.Tests/Snapshots/InitTests.CosmosDbPostgreSqlDatabase.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.CosmosDbPostgreSqlDatabase.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_171ea8114ff71814.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_171ea8114ff71814.verified.txt index 978d1a253b..a105ab2649 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_171ea8114ff71814.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_171ea8114ff71814.verified.txt @@ -48,6 +48,14 @@ } }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_2df7a1794712f154.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_2df7a1794712f154.verified.txt index 402bf4d2bc..391470f16e 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_2df7a1794712f154.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_2df7a1794712f154.verified.txt @@ -44,6 +44,14 @@ Provider: Simulator }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_59fe1a10aa78899d.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_59fe1a10aa78899d.verified.txt index ab71a40f03..c79efb4530 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_59fe1a10aa78899d.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_59fe1a10aa78899d.verified.txt @@ -44,6 +44,14 @@ Provider: StaticWebApps }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_b95b637ea87f16a7.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_b95b637ea87f16a7.verified.txt index 25e3976685..e140352dbc 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_b95b637ea87f16a7.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_b95b637ea87f16a7.verified.txt @@ -44,6 +44,14 @@ Provider: AppService }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_daacbd948b7ef72f.verified.txt b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_daacbd948b7ef72f.verified.txt index 140f017b78..0141462791 100644 --- a/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_daacbd948b7ef72f.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.EnsureCorrectConfigGenerationWithDifferentAuthenticationProviders_daacbd948b7ef72f.verified.txt @@ -48,6 +48,14 @@ } }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.GraphQLPathWithoutStartingSlashWillHaveItAdded.verified.txt b/src/Cli.Tests/Snapshots/InitTests.GraphQLPathWithoutStartingSlashWillHaveItAdded.verified.txt index a3a056ac0a..f9f057d8bb 100644 --- a/src/Cli.Tests/Snapshots/InitTests.GraphQLPathWithoutStartingSlashWillHaveItAdded.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.GraphQLPathWithoutStartingSlashWillHaveItAdded.verified.txt @@ -44,6 +44,14 @@ Provider: AppService }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.MsSQLDatabase.verified.txt b/src/Cli.Tests/Snapshots/InitTests.MsSQLDatabase.verified.txt index f40350c4da..f1e4bcafdb 100644 --- a/src/Cli.Tests/Snapshots/InitTests.MsSQLDatabase.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.MsSQLDatabase.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.RestPathWithoutStartingSlashWillHaveItAdded.verified.txt b/src/Cli.Tests/Snapshots/InitTests.RestPathWithoutStartingSlashWillHaveItAdded.verified.txt index b792d41c9f..04f77c9836 100644 --- a/src/Cli.Tests/Snapshots/InitTests.RestPathWithoutStartingSlashWillHaveItAdded.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.RestPathWithoutStartingSlashWillHaveItAdded.verified.txt @@ -44,6 +44,14 @@ Provider: AppService }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.TestInitializingConfigWithoutConnectionString.verified.txt b/src/Cli.Tests/Snapshots/InitTests.TestInitializingConfigWithoutConnectionString.verified.txt index 173960d7b1..2df4ded1cb 100644 --- a/src/Cli.Tests/Snapshots/InitTests.TestInitializingConfigWithoutConnectionString.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.TestInitializingConfigWithoutConnectionString.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.TestSpecialCharactersInConnectionString.verified.txt b/src/Cli.Tests/Snapshots/InitTests.TestSpecialCharactersInConnectionString.verified.txt index 25e3976685..e140352dbc 100644 --- a/src/Cli.Tests/Snapshots/InitTests.TestSpecialCharactersInConnectionString.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.TestSpecialCharactersInConnectionString.verified.txt @@ -44,6 +44,14 @@ Provider: AppService }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0546bef37027a950.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0546bef37027a950.verified.txt index 63f0da701c..bcf72fd49d 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0546bef37027a950.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0546bef37027a950.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0ac567dd32a2e8f5.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0ac567dd32a2e8f5.verified.txt index f40350c4da..f1e4bcafdb 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0ac567dd32a2e8f5.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0ac567dd32a2e8f5.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0c06949221514e77.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0c06949221514e77.verified.txt index e59070d692..a5093a7ace 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0c06949221514e77.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_0c06949221514e77.verified.txt @@ -52,6 +52,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_18667ab7db033e9d.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_18667ab7db033e9d.verified.txt index f7de35b7ae..8e6e461c78 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_18667ab7db033e9d.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_18667ab7db033e9d.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_2f42f44c328eb020.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_2f42f44c328eb020.verified.txt index 63f0da701c..bcf72fd49d 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_2f42f44c328eb020.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_2f42f44c328eb020.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_3243d3f3441fdcc1.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_3243d3f3441fdcc1.verified.txt index f7de35b7ae..8e6e461c78 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_3243d3f3441fdcc1.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_3243d3f3441fdcc1.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_53350b8b47df2112.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_53350b8b47df2112.verified.txt index 75613db959..a457962b38 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_53350b8b47df2112.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_53350b8b47df2112.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_6584e0ec46b8a11d.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_6584e0ec46b8a11d.verified.txt index d93aac7dc6..e597fd61e2 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_6584e0ec46b8a11d.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_6584e0ec46b8a11d.verified.txt @@ -48,6 +48,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_81cc88db3d4eecfb.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_81cc88db3d4eecfb.verified.txt index 640815babb..371c4c9324 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_81cc88db3d4eecfb.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_81cc88db3d4eecfb.verified.txt @@ -52,6 +52,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_8ea187616dbb5577.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_8ea187616dbb5577.verified.txt index 5900015d5a..7a9e8f4101 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_8ea187616dbb5577.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_8ea187616dbb5577.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_905845c29560a3ef.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_905845c29560a3ef.verified.txt index 63f0da701c..bcf72fd49d 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_905845c29560a3ef.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_905845c29560a3ef.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_b2fd24fab5b80917.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_b2fd24fab5b80917.verified.txt index d93aac7dc6..e597fd61e2 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_b2fd24fab5b80917.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_b2fd24fab5b80917.verified.txt @@ -48,6 +48,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_bd7cd088755287c9.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_bd7cd088755287c9.verified.txt index d93aac7dc6..e597fd61e2 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_bd7cd088755287c9.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_bd7cd088755287c9.verified.txt @@ -48,6 +48,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d2eccba2f836b380.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d2eccba2f836b380.verified.txt index 75613db959..a457962b38 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d2eccba2f836b380.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d2eccba2f836b380.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d463eed7fe5e4bbe.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d463eed7fe5e4bbe.verified.txt index 5900015d5a..7a9e8f4101 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d463eed7fe5e4bbe.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d463eed7fe5e4bbe.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d5520dd5c33f7b8d.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d5520dd5c33f7b8d.verified.txt index 75613db959..a457962b38 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d5520dd5c33f7b8d.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_d5520dd5c33f7b8d.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_eab4a6010e602b59.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_eab4a6010e602b59.verified.txt index f7de35b7ae..8e6e461c78 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_eab4a6010e602b59.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_eab4a6010e602b59.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_ecaa688829b4030e.verified.txt b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_ecaa688829b4030e.verified.txt index 5900015d5a..7a9e8f4101 100644 --- a/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_ecaa688829b4030e.verified.txt +++ b/src/Cli.Tests/Snapshots/InitTests.VerifyCorrectConfigGenerationWithMultipleMutationOptions_ecaa688829b4030e.verified.txt @@ -44,6 +44,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [] diff --git a/src/Cli/ConfigGenerator.cs b/src/Cli/ConfigGenerator.cs index 9a3401a55a..e23db54edd 100644 --- a/src/Cli/ConfigGenerator.cs +++ b/src/Cli/ConfigGenerator.cs @@ -271,7 +271,14 @@ public static bool TryCreateRuntimeConfig(InitOptions options, FileSystemRuntime Provider: options.AuthenticationProvider, Jwt: (options.Audience is null && options.Issuer is null) ? null : new(options.Audience, options.Issuer)), Mode: options.HostMode), - BaseRoute: runtimeBaseRoute + BaseRoute: runtimeBaseRoute, + Telemetry: new TelemetryOptions( + OpenTelemetry: new OpenTelemetryOptions( + Enabled: true, + Endpoint: "@env('OTEL_EXPORTER_OTLP_ENDPOINT')", + Headers: "@env('OTEL_EXPORTER_OTLP_HEADERS')", + ExporterProtocol: null, + ServiceName: "@env('OTEL_SERVICE_NAME')")) ), Entities: new RuntimeEntities(new Dictionary())); From 0c37bd2194b00b6cb7a22741eda3e71a9c9a14dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:55:32 +0000 Subject: [PATCH 3/5] Fix E2E tests: use Ignore mode for OTEL env vars, update telemetry assertion Co-authored-by: JerryNixon <1749983+JerryNixon@users.noreply.github.com> --- src/Cli.Tests/EndToEndTests.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Cli.Tests/EndToEndTests.cs b/src/Cli.Tests/EndToEndTests.cs index 99a9b77b6e..e3e32d5076 100644 --- a/src/Cli.Tests/EndToEndTests.cs +++ b/src/Cli.Tests/EndToEndTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using Azure.DataApiBuilder.Config.Converters; using Azure.DataApiBuilder.Product; using Cli.Constants; using Microsoft.Data.SqlClient; @@ -116,7 +117,7 @@ public void TestInitializingRestAndGraphQLGlobalSettings() string[] args = { "init", "-c", TEST_RUNTIME_CONFIG_FILE, "--connection-string", SAMPLE_TEST_CONN_STRING, "--database-type", "mssql", "--rest.path", "/rest-api", "--rest.enabled", "false", "--graphql.path", "/graphql-api" }; Program.Execute(args, _cliLogger!, _fileSystem!, _runtimeConfigLoader!); - DeserializationVariableReplacementSettings replacementSettings = new(azureKeyVaultOptions: null, doReplaceEnvVar: true, doReplaceAkvVar: true); + DeserializationVariableReplacementSettings replacementSettings = new(azureKeyVaultOptions: null, doReplaceEnvVar: true, doReplaceAkvVar: true, envFailureMode: EnvironmentVariableReplacementFailureMode.Ignore); Assert.IsTrue(_runtimeConfigLoader!.TryLoadConfig( TEST_RUNTIME_CONFIG_FILE, out RuntimeConfig? runtimeConfig, @@ -196,7 +197,7 @@ public void TestEnablingMultipleCreateOperation(CliBool isMultipleCreateEnabled, Program.Execute(args.ToArray(), _cliLogger!, _fileSystem!, _runtimeConfigLoader!); - DeserializationVariableReplacementSettings replacementSettings = new(azureKeyVaultOptions: null, doReplaceEnvVar: true, doReplaceAkvVar: true); + DeserializationVariableReplacementSettings replacementSettings = new(azureKeyVaultOptions: null, doReplaceEnvVar: true, doReplaceAkvVar: true, envFailureMode: EnvironmentVariableReplacementFailureMode.Ignore); Assert.IsTrue(_runtimeConfigLoader!.TryLoadConfig( TEST_RUNTIME_CONFIG_FILE, out RuntimeConfig? runtimeConfig, @@ -273,7 +274,7 @@ public void TestAddTelemetry(string? appInsightsEnabled, string appInsightsConnS // Perform assertions on various properties. Assert.IsNotNull(runtimeConfig); Assert.IsNotNull(runtimeConfig.Runtime); - Assert.IsNull(runtimeConfig.Runtime.Telemetry); + Assert.IsNotNull(runtimeConfig.Runtime.Telemetry); string[] addTelemetryArgs; if (appInsightsEnabled is null) From cab3f861dda151d725c5c4764f02291d7f80c0a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 03:43:14 +0000 Subject: [PATCH 4/5] Fix: use Ignore mode for missing env vars in config loading, validate OTLP endpoint URI before setup Co-authored-by: Aniruddh25 <3513779+Aniruddh25@users.noreply.github.com> --- src/Config/FileSystemRuntimeConfigLoader.cs | 3 ++- src/Service/Program.cs | 5 +++-- src/Service/Startup.cs | 14 ++++++++------ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Config/FileSystemRuntimeConfigLoader.cs b/src/Config/FileSystemRuntimeConfigLoader.cs index 614cfbd11c..70b36d8294 100644 --- a/src/Config/FileSystemRuntimeConfigLoader.cs +++ b/src/Config/FileSystemRuntimeConfigLoader.cs @@ -6,6 +6,7 @@ using System.Net; using System.Reflection; using System.Text.Json; +using Azure.DataApiBuilder.Config.Converters; using Azure.DataApiBuilder.Config.ObjectModel; using Azure.DataApiBuilder.Config.Utilities; using Azure.DataApiBuilder.Service.Exceptions; @@ -304,7 +305,7 @@ public bool TryLoadConfig( public override bool TryLoadKnownConfig([NotNullWhen(true)] out RuntimeConfig? config, bool replaceEnvVar = false) { // Convert legacy replaceEnvVar parameter to replacement settings for backward compatibility - DeserializationVariableReplacementSettings? replacementSettings = new(azureKeyVaultOptions: null, doReplaceEnvVar: replaceEnvVar, doReplaceAkvVar: replaceEnvVar); + DeserializationVariableReplacementSettings? replacementSettings = new(azureKeyVaultOptions: null, doReplaceEnvVar: replaceEnvVar, doReplaceAkvVar: replaceEnvVar, envFailureMode: EnvironmentVariableReplacementFailureMode.Ignore); return TryLoadConfig(ConfigFilePath, out config, replacementSettings: replacementSettings); } diff --git a/src/Service/Program.cs b/src/Service/Program.cs index e23fb98cd9..c7e6cb10e5 100644 --- a/src/Service/Program.cs +++ b/src/Service/Program.cs @@ -220,7 +220,8 @@ public static ILoggerFactory GetLoggerFactoryForLogLevel( } } - if (Startup.OpenTelemetryOptions.Enabled && !string.IsNullOrWhiteSpace(Startup.OpenTelemetryOptions.Endpoint)) + if (Startup.OpenTelemetryOptions.Enabled + && Uri.TryCreate(Startup.OpenTelemetryOptions.Endpoint, UriKind.Absolute, out Uri? otlpEndpoint)) { builder.AddOpenTelemetry(logging => { @@ -229,7 +230,7 @@ public static ILoggerFactory GetLoggerFactoryForLogLevel( logging.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(Startup.OpenTelemetryOptions.ServiceName!)); logging.AddOtlpExporter(configure => { - configure.Endpoint = new Uri(Startup.OpenTelemetryOptions.Endpoint); + configure.Endpoint = otlpEndpoint; configure.Headers = Startup.OpenTelemetryOptions.Headers; configure.Protocol = OtlpExportProtocol.Grpc; }); diff --git a/src/Service/Startup.cs b/src/Service/Startup.cs index 05f920a2c0..db520c8ab5 100644 --- a/src/Service/Startup.cs +++ b/src/Service/Startup.cs @@ -132,7 +132,8 @@ public void ConfigureServices(IServiceCollection services) if (runtimeConfigAvailable && runtimeConfig?.Runtime?.Telemetry?.OpenTelemetry is not null - && runtimeConfig.Runtime.Telemetry.OpenTelemetry.Enabled) + && runtimeConfig.Runtime.Telemetry.OpenTelemetry.Enabled + && Uri.TryCreate(runtimeConfig.Runtime.Telemetry.OpenTelemetry.Endpoint, UriKind.Absolute, out Uri? otlpEndpoint)) { services.Configure(options => { @@ -146,7 +147,7 @@ public void ConfigureServices(IServiceCollection services) logging.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(runtimeConfig.Runtime.Telemetry.OpenTelemetry.ServiceName!)) .AddOtlpExporter(configure => { - configure.Endpoint = new Uri(runtimeConfig.Runtime.Telemetry.OpenTelemetry.Endpoint!); + configure.Endpoint = otlpEndpoint; configure.Headers = runtimeConfig.Runtime.Telemetry.OpenTelemetry.Headers; configure.Protocol = OtlpExportProtocol.Grpc; }); @@ -160,7 +161,7 @@ public void ConfigureServices(IServiceCollection services) // .AddFusionCacheInstrumentation() .AddOtlpExporter(configure => { - configure.Endpoint = new Uri(runtimeConfig.Runtime.Telemetry.OpenTelemetry.Endpoint!); + configure.Endpoint = otlpEndpoint; configure.Headers = runtimeConfig.Runtime.Telemetry.OpenTelemetry.Headers; configure.Protocol = OtlpExportProtocol.Grpc; }) @@ -176,7 +177,7 @@ public void ConfigureServices(IServiceCollection services) .AddHotChocolateInstrumentation() .AddOtlpExporter(configure => { - configure.Endpoint = new Uri(runtimeConfig.Runtime.Telemetry.OpenTelemetry.Endpoint!); + configure.Endpoint = otlpEndpoint; configure.Headers = runtimeConfig.Runtime.Telemetry.OpenTelemetry.Headers; configure.Protocol = OtlpExportProtocol.Grpc; }) @@ -1049,9 +1050,10 @@ private void ConfigureOpenTelemetry(RuntimeConfig runtimeConfig) return; } - if (string.IsNullOrWhiteSpace(OpenTelemetryOptions?.Endpoint)) + if (string.IsNullOrWhiteSpace(OpenTelemetryOptions?.Endpoint) + || !Uri.TryCreate(OpenTelemetryOptions.Endpoint, UriKind.Absolute, out _)) { - _logger.LogWarning("Logs won't be sent to Open Telemetry because an Open Telemetry connection string is not available in the runtime config."); + _logger.LogWarning("Logs won't be sent to Open Telemetry because a valid Open Telemetry endpoint URI is not available in the runtime config."); return; } From 75773ef96297a5659683bffced6d09b967698867 Mon Sep 17 00:00:00 2001 From: Anusha Kolan Date: Wed, 11 Mar 2026 13:24:29 -0700 Subject: [PATCH 5/5] Fixed failing tests --- src/Cli.Tests/ConfigGeneratorTests.cs | 8 ++++++++ src/Cli.Tests/EnvironmentTests.cs | 3 +-- ...cedureWithRestMethodsAndGraphQLOperations.verified.txt | 8 ++++++++ ...erAddingEntityWithSourceAsStoredProcedure.verified.txt | 8 ++++++++ ...fterAddingEntityWithSourceWithDefaultType.verified.txt | 8 ++++++++ ...ratedAfterAddingEntityWithoutIEnumerables.verified.txt | 8 ++++++++ ...estUpdatingStoredProcedureWithRestMethods.verified.txt | 8 ++++++++ ...cedureWithRestMethodsAndGraphQLOperations.verified.txt | 8 ++++++++ ...onTests.TestReadingRuntimeConfigForCosmos.verified.txt | 8 ++++++++ ...ionTests.TestReadingRuntimeConfigForMsSql.verified.txt | 8 ++++++++ ...ionTests.TestReadingRuntimeConfigForMySql.verified.txt | 8 ++++++++ ...sts.TestReadingRuntimeConfigForPostgreSql.verified.txt | 8 ++++++++ 12 files changed, 89 insertions(+), 2 deletions(-) diff --git a/src/Cli.Tests/ConfigGeneratorTests.cs b/src/Cli.Tests/ConfigGeneratorTests.cs index 9621a8ce98..a3533381dd 100644 --- a/src/Cli.Tests/ConfigGeneratorTests.cs +++ b/src/Cli.Tests/ConfigGeneratorTests.cs @@ -176,6 +176,14 @@ public void TestSpecialCharactersInConnectionString() ""provider"": ""AppService"" }, ""mode"": ""production"" + }, + ""telemetry"": { + ""open-telemetry"": { + ""enabled"": true, + ""endpoint"": ""@env('OTEL_EXPORTER_OTLP_ENDPOINT')"", + ""headers"": ""@env('OTEL_EXPORTER_OTLP_HEADERS')"", + ""service-name"": ""@env('OTEL_SERVICE_NAME')"" + } } }, ""autoentities"": {}, diff --git a/src/Cli.Tests/EnvironmentTests.cs b/src/Cli.Tests/EnvironmentTests.cs index 2d6378cf74..d7b359783a 100644 --- a/src/Cli.Tests/EnvironmentTests.cs +++ b/src/Cli.Tests/EnvironmentTests.cs @@ -165,8 +165,7 @@ public async Task FailureToStartEngineWhenEnvVarNamedWrong() string? output = await process.StandardError.ReadLineAsync(); Assert.AreEqual("Deserialization of the configuration file failed during a post-processing step.", output); output = await process.StandardError.ReadToEndAsync(); - StringAssert.Contains(output, "Environmental Variable, " - + expectedEnvVarName + ", not found.", StringComparison.Ordinal); + StringAssert.Contains(output, "A valid Connection String should be provided.", StringComparison.Ordinal); process.Kill(); } diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestAddingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestAddingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt index 11bf762b42..6fcd0d79b1 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestAddingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestAddingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceAsStoredProcedure.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceAsStoredProcedure.verified.txt index 475149674b..67fb0f00dc 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceAsStoredProcedure.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceAsStoredProcedure.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceWithDefaultType.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceWithDefaultType.verified.txt index 19c590a7f7..197f5588ed 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceWithDefaultType.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithSourceWithDefaultType.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithoutIEnumerables.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithoutIEnumerables.verified.txt index 2b4583dc36..36294a4882 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithoutIEnumerables.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestConfigGeneratedAfterAddingEntityWithoutIEnumerables.verified.txt @@ -48,6 +48,14 @@ Provider: AppService }, Mode: Production + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethods.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethods.verified.txt index eae623f5a8..4a26b4f4fb 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethods.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethods.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt b/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt index 4be8d89e14..8f9e1e92f6 100644 --- a/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt +++ b/src/Cli.Tests/Snapshots/EndToEndTests.TestUpdatingStoredProcedureWithRestMethodsAndGraphQLOperations.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForCosmos.verified.txt b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForCosmos.verified.txt index c9def099f9..c229da4ce6 100644 --- a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForCosmos.verified.txt +++ b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForCosmos.verified.txt @@ -51,6 +51,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMsSql.verified.txt b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMsSql.verified.txt index d80506e102..3459578f59 100644 --- a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMsSql.verified.txt +++ b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMsSql.verified.txt @@ -55,6 +55,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMySql.verified.txt b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMySql.verified.txt index e7f312ef48..d3393a7b89 100644 --- a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMySql.verified.txt +++ b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForMySql.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [ diff --git a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForPostgreSql.verified.txt b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForPostgreSql.verified.txt index 5dcef0dcdb..f7d781fe64 100644 --- a/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForPostgreSql.verified.txt +++ b/src/Service.Tests/Snapshots/ConfigurationTests.TestReadingRuntimeConfigForPostgreSql.verified.txt @@ -47,6 +47,14 @@ Authentication: { Provider: AppService } + }, + Telemetry: { + OpenTelemetry: { + Enabled: true, + Endpoint: @env('OTEL_EXPORTER_OTLP_ENDPOINT'), + Headers: @env('OTEL_EXPORTER_OTLP_HEADERS'), + ServiceName: @env('OTEL_SERVICE_NAME') + } } }, Entities: [