File tree Expand file tree Collapse file tree
SweeperActions/ServiceProviders Expand file tree Collapse file tree Original file line number Diff line number Diff line change 178178 <Compile Include =" SweeperActions\DataScrubbing\PersonTokenRemoveData.cs" />
179179 <Compile Include =" SweeperActions\General\DisableRockJobs.cs" />
180180 <Compile Include =" SweeperActions\General\DisableSslForSitesAndPages.cs" />
181+ <Compile Include =" SweeperActions\ServiceProviders\ObservabilityDisable.cs" />
182+ <Compile Include =" SweeperActions\ServiceProviders\ObservabilityReset.cs" />
181183 <Compile Include =" SweeperActions\SweeperAction.cs" />
182184 <Compile Include =" SweeperActions\Storage\ConvertBinaryFilesToDatabasePlaceholders.cs" />
183185 <Compile Include =" SweeperActions\Storage\MoveBinaryFilesIntoDatabase.cs" />
Original file line number Diff line number Diff line change 1+ using System . ComponentModel ;
2+ using System . Threading . Tasks ;
3+
4+ using RockSweeper . Attributes ;
5+
6+ namespace RockSweeper . SweeperActions . ServiceProviders
7+ {
8+ /// <summary>
9+ /// Updates the Rock configuration to that the observability feature is disabled.
10+ /// </summary>
11+ [ ActionId ( "5e27c631-3681-4d1b-b50c-0e5f3898e541" ) ]
12+ [ Title ( "Observability (Disable)" ) ]
13+ [ Description ( "Updates the Rock configuration to that the observability feature is disabled." ) ]
14+ [ Category ( "Service Providers" ) ]
15+ [ DefaultValue ( true ) ]
16+ [ ConflictsWithAction ( typeof ( ObservabilityReset ) ) ]
17+ public class ObservabilityDisable : SweeperAction
18+ {
19+ public override async Task ExecuteAsync ( )
20+ {
21+ await Sweeper . SqlCommandAsync ( "DELETE FROM [Attribute] WHERE [EntityTypeQualifierColumn] = 'SystemSetting' AND [Key] = 'core_ObservabilityEnabled'" ) ;
22+ }
23+ }
24+ }
Original file line number Diff line number Diff line change 1+ using System . ComponentModel ;
2+ using System . Threading . Tasks ;
3+
4+ using RockSweeper . Attributes ;
5+
6+ namespace RockSweeper . SweeperActions . ServiceProviders
7+ {
8+ /// <summary>
9+ /// Resets all observability settings to system default values.
10+ /// </summary>
11+ [ ActionId ( "12956c26-2965-4c40-9cfd-28c542357e55" ) ]
12+ [ Title ( "Observability (Reset)" ) ]
13+ [ Description ( "Resets all observability settings to system default values." ) ]
14+ [ Category ( "Service Providers" ) ]
15+ [ ConflictsWithAction ( typeof ( ObservabilityDisable ) ) ]
16+ public class ObservabilityReset : SweeperAction
17+ {
18+ public override async Task ExecuteAsync ( )
19+ {
20+ await Sweeper . SqlCommandAsync ( "DELETE FROM [Attribute] WHERE [EntityTypeQualifierColumn] = 'SystemSetting' AND [Key] LIKE 'core_Observability%'" ) ;
21+ }
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments