From fd268b39cfa1d5e04eb695787640a8f8689ecc66 Mon Sep 17 00:00:00 2001 From: Marcus Aspin Date: Mon, 22 Jan 2024 13:40:56 +0000 Subject: [PATCH] PI-1822 Remove DeliusConnectionProvider (#3062) * PI-1822 Remove DeliusConnectionProvider This appears to have stopped working recently, so I've re-enabled setting the client id via a logon trigger instead: https://github.com/ministryofjustice/hmpps-delius-pipelines/pull/783 * Remove app insights filter --- .../audit/config/ConnectionProviderConfig.kt | 28 ------- .../hmpps/audit/service/OptimisationTables.kt | 11 ++- .../datasource/DeliusConnectionProvider.kt | 23 ------ .../DeliusConnectionProviderTest.kt | 73 ------------------- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../arns-and-delius/applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../cas2-and-delius/applicationinsights.json | 11 --- .../cas3-and-delius/applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../dps-and-delius/applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../opd-and-delius/applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../soc-and-delius/applicationinsights.json | 11 --- .../tier-to-delius/applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../api-server/applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../applicationinsights.json | 11 --- .../message-listener/applicationinsights.json | 11 --- 46 files changed, 10 insertions(+), 587 deletions(-) delete mode 100644 libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/audit/config/ConnectionProviderConfig.kt delete mode 100644 libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/datasource/DeliusConnectionProvider.kt delete mode 100644 libs/audit/src/test/kotlin/uk/gov/justice/digital/hmpps/datasource/DeliusConnectionProviderTest.kt diff --git a/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/audit/config/ConnectionProviderConfig.kt b/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/audit/config/ConnectionProviderConfig.kt deleted file mode 100644 index 1c95b82278..0000000000 --- a/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/audit/config/ConnectionProviderConfig.kt +++ /dev/null @@ -1,28 +0,0 @@ -package uk.gov.justice.digital.hmpps.audit.config - -import org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Condition -import org.springframework.context.annotation.ConditionContext -import org.springframework.context.annotation.Conditional -import org.springframework.context.annotation.Configuration -import org.springframework.core.type.AnnotatedTypeMetadata -import uk.gov.justice.digital.hmpps.datasource.DeliusConnectionProvider - -@Configuration -class ConnectionProviderConfig { - @Bean - @Conditional(OracleCondition::class) - fun hibernatePropertiesCustomizer(): HibernatePropertiesCustomizer { - return HibernatePropertiesCustomizer { props: MutableMap -> - props["hibernate.connection.provider_class"] = DeliusConnectionProvider::class.java - } - } -} - -class OracleCondition : Condition { - override fun matches(context: ConditionContext, metadata: AnnotatedTypeMetadata): Boolean { - val url = context.environment.getProperty("spring.datasource.url") - return url?.startsWith("jdbc:oracle") ?: false && !context.environment.acceptsProfiles { it.test("oracle") } - } -} diff --git a/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/audit/service/OptimisationTables.kt b/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/audit/service/OptimisationTables.kt index ce11456b87..95dbe5a114 100644 --- a/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/audit/service/OptimisationTables.kt +++ b/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/audit/service/OptimisationTables.kt @@ -1,11 +1,13 @@ package uk.gov.justice.digital.hmpps.audit.service +import org.springframework.context.annotation.Condition +import org.springframework.context.annotation.ConditionContext import org.springframework.context.annotation.Conditional +import org.springframework.core.type.AnnotatedTypeMetadata import org.springframework.jdbc.core.JdbcTemplate import org.springframework.stereotype.Service import org.springframework.transaction.support.TransactionSynchronization import org.springframework.transaction.support.TransactionSynchronizationManager -import uk.gov.justice.digital.hmpps.audit.config.OracleCondition @Service class OptimisationTables(private val optimisationTablesRebuild: OptimisationTablesRebuild?) { @@ -25,3 +27,10 @@ class OptimisationTablesRebuild(private val jdbcTemplate: JdbcTemplate) { }) } } + +class OracleCondition : Condition { + override fun matches(context: ConditionContext, metadata: AnnotatedTypeMetadata): Boolean { + val url = context.environment.getProperty("spring.datasource.url") + return url?.startsWith("jdbc:oracle") ?: false && !context.environment.acceptsProfiles { it.test("oracle") } + } +} diff --git a/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/datasource/DeliusConnectionProvider.kt b/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/datasource/DeliusConnectionProvider.kt deleted file mode 100644 index f6d963ee9f..0000000000 --- a/libs/audit/src/main/kotlin/uk/gov/justice/digital/hmpps/datasource/DeliusConnectionProvider.kt +++ /dev/null @@ -1,23 +0,0 @@ -package uk.gov.justice.digital.hmpps.datasource - -import org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl -import uk.gov.justice.digital.hmpps.security.ServiceContext -import java.sql.Connection - -open class DeliusConnectionProvider : DatasourceConnectionProviderImpl() { - override fun getConnection(): Connection { - return super.getConnection().also { con -> - ServiceContext.servicePrincipal()?.username.let { username -> - con.prepareStatement("call PKG_VPD_CTX.SET_CLIENT_IDENTIFIER(?)").use { - it.setString(1, username) - it.execute() - } - } - } - } - - override fun closeConnection(connection: Connection) { - connection.prepareStatement("call PKG_VPD_CTX.CLEAR_CLIENT_IDENTIFIER()").use { it.execute() } - super.closeConnection(connection) - } -} diff --git a/libs/audit/src/test/kotlin/uk/gov/justice/digital/hmpps/datasource/DeliusConnectionProviderTest.kt b/libs/audit/src/test/kotlin/uk/gov/justice/digital/hmpps/datasource/DeliusConnectionProviderTest.kt deleted file mode 100644 index 31ba857d8c..0000000000 --- a/libs/audit/src/test/kotlin/uk/gov/justice/digital/hmpps/datasource/DeliusConnectionProviderTest.kt +++ /dev/null @@ -1,73 +0,0 @@ -package uk.gov.justice.digital.hmpps.datasource - -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.ExtendWith -import org.mockito.ArgumentMatchers.anyString -import org.mockito.Mock -import org.mockito.junit.jupiter.MockitoExtension -import org.mockito.kotlin.times -import org.mockito.kotlin.verify -import org.mockito.kotlin.whenever -import org.springframework.boot.context.event.ApplicationStartedEvent -import uk.gov.justice.digital.hmpps.security.ServiceContext -import uk.gov.justice.digital.hmpps.user.AuditUser -import uk.gov.justice.digital.hmpps.user.AuditUserService -import java.sql.Connection -import java.sql.PreparedStatement -import javax.sql.DataSource - -@ExtendWith(MockitoExtension::class) -class DeliusConnectionProviderTest { - - @Mock - private lateinit var connection: Connection - - @Mock - private lateinit var preparedStatement: PreparedStatement - - @Mock - private lateinit var dataSource: DataSource - - @Mock - private lateinit var auditUserService: AuditUserService - - @Mock - private lateinit var applicationStartedEvent: ApplicationStartedEvent - - private lateinit var serviceContext: ServiceContext - - private val deliusConnectionProvider = DeliusConnectionProvider() - - @Test - fun `retrieving a connection with oracle sets client identifier with security context`() { - val user = AuditUser(1, "ServiceUserName") - whenever(auditUserService.findUser(user.username)).thenReturn(user) - whenever(connection.prepareStatement(anyString())).thenReturn(preparedStatement) - whenever(dataSource.connection).thenReturn(connection) - serviceContext = ServiceContext(user.username, auditUserService) - serviceContext.onApplicationEvent(applicationStartedEvent) - deliusConnectionProvider.dataSource = dataSource - deliusConnectionProvider.configure(mapOf()) - - deliusConnectionProvider.connection - - verify(dataSource).connection - verify(connection).prepareStatement("call PKG_VPD_CTX.SET_CLIENT_IDENTIFIER(?)") - verify(preparedStatement).setString(1, user.username) - verify(preparedStatement).execute() - } - - @Test - fun `close connection successfully removes context in db`() { - whenever(connection.prepareStatement(anyString())).thenReturn(preparedStatement) - - deliusConnectionProvider.dataSource = dataSource - deliusConnectionProvider.configure(mapOf()) - - deliusConnectionProvider.closeConnection(connection) - - verify(connection).prepareStatement("call PKG_VPD_CTX.CLEAR_CLIENT_IDENTIFIER()") - verify(preparedStatement).execute() - verify(preparedStatement).close() - } -} diff --git a/projects/accredited-programmes-and-oasys/applicationinsights.json b/projects/accredited-programmes-and-oasys/applicationinsights.json index aeb6b52473..b0ddef2adf 100644 --- a/projects/accredited-programmes-and-oasys/applicationinsights.json +++ b/projects/accredited-programmes-and-oasys/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/approved-premises-and-delius/applicationinsights.json b/projects/approved-premises-and-delius/applicationinsights.json index 678e9260ae..8baf13ff5b 100644 --- a/projects/approved-premises-and-delius/applicationinsights.json +++ b/projects/approved-premises-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/approved-premises-and-oasys/applicationinsights.json b/projects/approved-premises-and-oasys/applicationinsights.json index 117eba6c33..117f079166 100644 --- a/projects/approved-premises-and-oasys/applicationinsights.json +++ b/projects/approved-premises-and-oasys/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/arns-and-delius/applicationinsights.json b/projects/arns-and-delius/applicationinsights.json index bc00acef67..5bf59c0c22 100644 --- a/projects/arns-and-delius/applicationinsights.json +++ b/projects/arns-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/assessment-summary-and-delius/applicationinsights.json b/projects/assessment-summary-and-delius/applicationinsights.json index 2b8e009946..83667ad03b 100644 --- a/projects/assessment-summary-and-delius/applicationinsights.json +++ b/projects/assessment-summary-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/cas2-and-delius/applicationinsights.json b/projects/cas2-and-delius/applicationinsights.json index 8563327519..5ff05befc9 100644 --- a/projects/cas2-and-delius/applicationinsights.json +++ b/projects/cas2-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/cas3-and-delius/applicationinsights.json b/projects/cas3-and-delius/applicationinsights.json index a738632a5e..acd45e1b96 100644 --- a/projects/cas3-and-delius/applicationinsights.json +++ b/projects/cas3-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/court-case-and-delius/applicationinsights.json b/projects/court-case-and-delius/applicationinsights.json index 28cae0c8ae..413e6d2cee 100644 --- a/projects/court-case-and-delius/applicationinsights.json +++ b/projects/court-case-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/create-and-vary-a-licence-and-delius/applicationinsights.json b/projects/create-and-vary-a-licence-and-delius/applicationinsights.json index ed04ece95c..4beda4f7c6 100644 --- a/projects/create-and-vary-a-licence-and-delius/applicationinsights.json +++ b/projects/create-and-vary-a-licence-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/custody-key-dates-and-delius/applicationinsights.json b/projects/custody-key-dates-and-delius/applicationinsights.json index 1417182d31..433b0ae69a 100644 --- a/projects/custody-key-dates-and-delius/applicationinsights.json +++ b/projects/custody-key-dates-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/domain-events-and-delius/applicationinsights.json b/projects/domain-events-and-delius/applicationinsights.json index 3b8074e3d5..1aeff20ed3 100644 --- a/projects/domain-events-and-delius/applicationinsights.json +++ b/projects/domain-events-and-delius/applicationinsights.json @@ -37,17 +37,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/dps-and-delius/applicationinsights.json b/projects/dps-and-delius/applicationinsights.json index d9632474f6..1e80456aed 100644 --- a/projects/dps-and-delius/applicationinsights.json +++ b/projects/dps-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/effective-proposal-framework-and-delius/applicationinsights.json b/projects/effective-proposal-framework-and-delius/applicationinsights.json index 522bded28a..e1050184ed 100644 --- a/projects/effective-proposal-framework-and-delius/applicationinsights.json +++ b/projects/effective-proposal-framework-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/external-api-and-delius/applicationinsights.json b/projects/external-api-and-delius/applicationinsights.json index d9dc19e001..b4b73b146d 100644 --- a/projects/external-api-and-delius/applicationinsights.json +++ b/projects/external-api-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/hdc-licences-and-delius/applicationinsights.json b/projects/hdc-licences-and-delius/applicationinsights.json index c472c8e6ed..b6e88168b6 100644 --- a/projects/hdc-licences-and-delius/applicationinsights.json +++ b/projects/hdc-licences-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/hmpps-auth-and-delius/applicationinsights.json b/projects/hmpps-auth-and-delius/applicationinsights.json index b2317cf83f..977b0ac261 100644 --- a/projects/hmpps-auth-and-delius/applicationinsights.json +++ b/projects/hmpps-auth-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/make-recall-decisions-and-delius/applicationinsights.json b/projects/make-recall-decisions-and-delius/applicationinsights.json index 5fe81656f0..c2295d1607 100644 --- a/projects/make-recall-decisions-and-delius/applicationinsights.json +++ b/projects/make-recall-decisions-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/manage-offences-and-delius/applicationinsights.json b/projects/manage-offences-and-delius/applicationinsights.json index 439a96e91a..1fed319549 100644 --- a/projects/manage-offences-and-delius/applicationinsights.json +++ b/projects/manage-offences-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/manage-pom-cases-and-delius/applicationinsights.json b/projects/manage-pom-cases-and-delius/applicationinsights.json index 0981a5cf1f..da03fec685 100644 --- a/projects/manage-pom-cases-and-delius/applicationinsights.json +++ b/projects/manage-pom-cases-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/offender-events-and-delius/applicationinsights.json b/projects/offender-events-and-delius/applicationinsights.json index 4e8ec8d661..957697bc56 100644 --- a/projects/offender-events-and-delius/applicationinsights.json +++ b/projects/offender-events-and-delius/applicationinsights.json @@ -37,17 +37,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/opd-and-delius/applicationinsights.json b/projects/opd-and-delius/applicationinsights.json index a7f232e04e..d9042908b0 100644 --- a/projects/opd-and-delius/applicationinsights.json +++ b/projects/opd-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/pathfinder-and-delius/applicationinsights.json b/projects/pathfinder-and-delius/applicationinsights.json index 9d31a56574..d327644622 100644 --- a/projects/pathfinder-and-delius/applicationinsights.json +++ b/projects/pathfinder-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/pre-sentence-reports-to-delius/applicationinsights.json b/projects/pre-sentence-reports-to-delius/applicationinsights.json index a047d1f150..cf91a12a8b 100644 --- a/projects/pre-sentence-reports-to-delius/applicationinsights.json +++ b/projects/pre-sentence-reports-to-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/prison-case-notes-to-probation/applicationinsights.json b/projects/prison-case-notes-to-probation/applicationinsights.json index e32aec2de4..fb3959983a 100644 --- a/projects/prison-case-notes-to-probation/applicationinsights.json +++ b/projects/prison-case-notes-to-probation/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/prison-custody-status-to-delius/applicationinsights.json b/projects/prison-custody-status-to-delius/applicationinsights.json index 466c3422d7..46c4f2c7e8 100644 --- a/projects/prison-custody-status-to-delius/applicationinsights.json +++ b/projects/prison-custody-status-to-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/prison-education-and-delius/applicationinsights.json b/projects/prison-education-and-delius/applicationinsights.json index d64357334a..24f137d189 100644 --- a/projects/prison-education-and-delius/applicationinsights.json +++ b/projects/prison-education-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/prison-identifier-and-delius/applicationinsights.json b/projects/prison-identifier-and-delius/applicationinsights.json index 2be853ff97..2990b96b9c 100644 --- a/projects/prison-identifier-and-delius/applicationinsights.json +++ b/projects/prison-identifier-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/prisoner-profile-and-delius/applicationinsights.json b/projects/prisoner-profile-and-delius/applicationinsights.json index 3bad7466f3..bac436e27a 100644 --- a/projects/prisoner-profile-and-delius/applicationinsights.json +++ b/projects/prisoner-profile-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/refer-and-monitor-and-delius/applicationinsights.json b/projects/refer-and-monitor-and-delius/applicationinsights.json index 83bfb69aed..2c0d58ee72 100644 --- a/projects/refer-and-monitor-and-delius/applicationinsights.json +++ b/projects/refer-and-monitor-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/resettlement-passport-and-delius/applicationinsights.json b/projects/resettlement-passport-and-delius/applicationinsights.json index ea8f4d339b..8fe9fe42f4 100644 --- a/projects/resettlement-passport-and-delius/applicationinsights.json +++ b/projects/resettlement-passport-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/risk-assessment-scores-to-delius/applicationinsights.json b/projects/risk-assessment-scores-to-delius/applicationinsights.json index 24827dd2dd..d24f847591 100644 --- a/projects/risk-assessment-scores-to-delius/applicationinsights.json +++ b/projects/risk-assessment-scores-to-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/sentence-plan-and-delius/applicationinsights.json b/projects/sentence-plan-and-delius/applicationinsights.json index fe63548a36..f0ef4b6063 100644 --- a/projects/sentence-plan-and-delius/applicationinsights.json +++ b/projects/sentence-plan-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/sentence-plan-and-oasys/applicationinsights.json b/projects/sentence-plan-and-oasys/applicationinsights.json index 821813d71b..4264cca09d 100644 --- a/projects/sentence-plan-and-oasys/applicationinsights.json +++ b/projects/sentence-plan-and-oasys/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/soc-and-delius/applicationinsights.json b/projects/soc-and-delius/applicationinsights.json index c6cb430836..593277b70f 100644 --- a/projects/soc-and-delius/applicationinsights.json +++ b/projects/soc-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/tier-to-delius/applicationinsights.json b/projects/tier-to-delius/applicationinsights.json index 90d6eeb2fd..887cc9e29a 100644 --- a/projects/tier-to-delius/applicationinsights.json +++ b/projects/tier-to-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/unpaid-work-and-delius/applicationinsights.json b/projects/unpaid-work-and-delius/applicationinsights.json index f24bf94f99..0db24b0f5a 100644 --- a/projects/unpaid-work-and-delius/applicationinsights.json +++ b/projects/unpaid-work-and-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/projects/workforce-allocations-to-delius/applicationinsights.json b/projects/workforce-allocations-to-delius/applicationinsights.json index baff3768a8..afb899ed5b 100644 --- a/projects/workforce-allocations-to-delius/applicationinsights.json +++ b/projects/workforce-allocations-to-delius/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/templates/projects/api-client-and-server/applicationinsights.json b/templates/projects/api-client-and-server/applicationinsights.json index 894cd6667d..321ae7189a 100644 --- a/templates/projects/api-client-and-server/applicationinsights.json +++ b/templates/projects/api-client-and-server/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/templates/projects/api-server/applicationinsights.json b/templates/projects/api-server/applicationinsights.json index 894cd6667d..321ae7189a 100644 --- a/templates/projects/api-server/applicationinsights.json +++ b/templates/projects/api-server/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/templates/projects/message-listener-with-api-client-and-server/applicationinsights.json b/templates/projects/message-listener-with-api-client-and-server/applicationinsights.json index 894cd6667d..321ae7189a 100644 --- a/templates/projects/message-listener-with-api-client-and-server/applicationinsights.json +++ b/templates/projects/message-listener-with-api-client-and-server/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/templates/projects/message-listener-with-api-client/applicationinsights.json b/templates/projects/message-listener-with-api-client/applicationinsights.json index 894cd6667d..321ae7189a 100644 --- a/templates/projects/message-listener-with-api-client/applicationinsights.json +++ b/templates/projects/message-listener-with-api-client/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [ diff --git a/templates/projects/message-listener/applicationinsights.json b/templates/projects/message-listener/applicationinsights.json index 894cd6667d..321ae7189a 100644 --- a/templates/projects/message-listener/applicationinsights.json +++ b/templates/projects/message-listener/applicationinsights.json @@ -34,17 +34,6 @@ ], "percentage": 0 }, - { - "telemetryType": "dependency", - "attributes": [ - { - "key": "db.statement", - "value": ".*CLIENT_IDENTIFIER.*", - "matchType": "regexp" - } - ], - "percentage": 0 - }, { "telemetryType": "dependency", "attributes": [