@@ -967,82 +967,68 @@ func ArchiveActiveOrgs(rt *runtime.Runtime) error {
967
967
timeTaken := dates .Now ().Sub (start )
968
968
slog .Info ("archiving of active orgs complete" , "time_taken" , timeTaken , "num_orgs" , len (orgs ))
969
969
970
- dims := []types.Dimension {
971
- {Name : aws .String ("App" ), Value : aws .String ("archiver" )},
972
- }
970
+ msgsDim := types.Dimension {Name : aws .String ("ArchiveType" ), Value : aws .String ("msgs" )}
971
+ runsDim := types.Dimension {Name : aws .String ("ArchiveType" ), Value : aws .String ("runs" )}
973
972
974
973
metrics := []types.MetricDatum {
974
+ {MetricName : aws .String ("ArchivingElapsed" ), Value : aws .Float64 (timeTaken .Seconds ()), Unit : types .StandardUnitSeconds },
975
975
{
976
- MetricName : aws .String ("ArchiveElapsed" ),
977
- Dimensions : dims ,
978
- Value : aws .Float64 (timeTaken .Seconds ()),
979
- Unit : types .StandardUnitSeconds ,
980
- },
981
- {
982
- MetricName : aws .String ("OrgsArchived" ),
983
- Dimensions : dims ,
984
- Value : aws .Float64 (float64 (len (orgs ))),
985
- Unit : types .StandardUnitCount ,
986
- },
987
- {
988
- MetricName : aws .String ("MsgsRecordsArchived" ),
989
- Dimensions : dims ,
976
+ MetricName : aws .String ("RecordsArchived" ),
977
+ Dimensions : []types.Dimension {msgsDim },
990
978
Value : aws .Float64 (float64 (totalMsgsRecordsArchived )),
991
979
Unit : types .StandardUnitCount ,
992
980
},
993
981
{
994
- MetricName : aws .String ("MsgsArchivedsCreated " ),
995
- Dimensions : dims ,
996
- Value : aws .Float64 (float64 (totalMsgsArchivesCreated )),
982
+ MetricName : aws .String ("RecordsArchived " ),
983
+ Dimensions : []types. Dimension { runsDim } ,
984
+ Value : aws .Float64 (float64 (totalRunsRecordsArchived )),
997
985
Unit : types .StandardUnitCount ,
998
986
},
999
-
1000
987
{
1001
- MetricName : aws .String ("MsgsArchivedsFailed " ),
1002
- Dimensions : dims ,
1003
- Value : aws .Float64 (float64 (totalMsgsArchivesFailed )),
988
+ MetricName : aws .String ("ArchivesCreated " ),
989
+ Dimensions : []types. Dimension { msgsDim } ,
990
+ Value : aws .Float64 (float64 (totalMsgsArchivesCreated )),
1004
991
Unit : types .StandardUnitCount ,
1005
992
},
1006
-
1007
993
{
1008
- MetricName : aws .String ("MsgsRollupsCreated " ),
1009
- Dimensions : dims ,
1010
- Value : aws .Float64 (float64 (totalMsgsRollupsCreated )),
994
+ MetricName : aws .String ("ArchivesCreated " ),
995
+ Dimensions : []types. Dimension { runsDim } ,
996
+ Value : aws .Float64 (float64 (totalRunsArchivesCreated )),
1011
997
Unit : types .StandardUnitCount ,
1012
998
},
1013
999
{
1014
- MetricName : aws .String ("MsgsRollupsFailed " ),
1015
- Dimensions : dims ,
1016
- Value : aws .Float64 (float64 (totalMsgsRollupsFailed )),
1000
+ MetricName : aws .String ("ArchivesFailed " ),
1001
+ Dimensions : []types. Dimension { msgsDim } ,
1002
+ Value : aws .Float64 (float64 (totalMsgsArchivesFailed )),
1017
1003
Unit : types .StandardUnitCount ,
1018
1004
},
1019
1005
{
1020
- MetricName : aws .String ("RunsRecordsArchived " ),
1021
- Dimensions : dims ,
1022
- Value : aws .Float64 (float64 (totalRunsRecordsArchived )),
1006
+ MetricName : aws .String ("ArchivesFailed " ),
1007
+ Dimensions : []types. Dimension { runsDim } ,
1008
+ Value : aws .Float64 (float64 (totalRunsArchivesFailed )),
1023
1009
Unit : types .StandardUnitCount ,
1024
1010
},
1025
1011
{
1026
- MetricName : aws .String ("RunsArchivedsCreated " ),
1027
- Dimensions : dims ,
1028
- Value : aws .Float64 (float64 (totalRunsArchivesCreated )),
1012
+ MetricName : aws .String ("RollupsCreated " ),
1013
+ Dimensions : []types. Dimension { msgsDim } ,
1014
+ Value : aws .Float64 (float64 (totalMsgsRollupsCreated )),
1029
1015
Unit : types .StandardUnitCount ,
1030
1016
},
1031
1017
{
1032
- MetricName : aws .String ("RunsArchivedsFailed " ),
1033
- Dimensions : dims ,
1034
- Value : aws .Float64 (float64 (totalRunsArchivesFailed )),
1018
+ MetricName : aws .String ("RollupsCreated " ),
1019
+ Dimensions : []types. Dimension { runsDim } ,
1020
+ Value : aws .Float64 (float64 (totalRunsRollupsCreated )),
1035
1021
Unit : types .StandardUnitCount ,
1036
1022
},
1037
1023
{
1038
- MetricName : aws .String ("RunsRollupsCreated " ),
1039
- Dimensions : dims ,
1040
- Value : aws .Float64 (float64 (totalRunsRollupsCreated )),
1024
+ MetricName : aws .String ("RollupsFailed " ),
1025
+ Dimensions : []types. Dimension { msgsDim } ,
1026
+ Value : aws .Float64 (float64 (totalMsgsRollupsFailed )),
1041
1027
Unit : types .StandardUnitCount ,
1042
1028
},
1043
1029
{
1044
- MetricName : aws .String ("RunsRollupsFailed " ),
1045
- Dimensions : dims ,
1030
+ MetricName : aws .String ("RollupsFailed " ),
1031
+ Dimensions : []types. Dimension { runsDim } ,
1046
1032
Value : aws .Float64 (float64 (totalRunsRollupsFailed )),
1047
1033
Unit : types .StandardUnitCount ,
1048
1034
},
0 commit comments