Apply suggested refactor suggestions to Delivery metrics webhook parsing
Apply some refactor suggestions to Delivery metrics webhook parsing:
-
gitlab-org/release-tools!2102 (comment 1242425334):
nit: maybe we want to keep the same logging structure as in line 23 and add the
number_of_webkhooks
field, maybe we can generalize both with a commonnumber_of_handlers
field in both cases. -
gitlab-org/release-tools!2102 (comment 1242425353):
There is a lot of common code between this function and the one in metrics/pkg/handlers/utils_test.go.
Maybe we can leave this as is for now, but as soon as we start creating another one of those huge json object for testing, I think we should consider moving the stucture data into it's own test package and include it both here and in metrics/pkg/handlers/utils_test.go.