fix: gowaku_lightpush_errors tag (#261)

This commit is contained in:
Martin Kobetic 2022-06-13 14:36:04 -04:00 committed by GitHub
parent 3c0c3c4eeb
commit b749cf22c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -69,12 +69,12 @@ var (
Measure: LightpushErrors,
Description: "The distribution of the lightpush protocol errors",
Aggregation: view.Count(),
TagKeys: []tag.Key{KeyType},
TagKeys: []tag.Key{ErrorType},
}
)
func RecordLightpushError(ctx context.Context, tagType string) {
if err := stats.RecordWithTags(ctx, []tag.Mutator{tag.Insert(tag.Key(ErrorType), tagType)}, LightpushErrors.M(1)); err != nil {
if err := stats.RecordWithTags(ctx, []tag.Mutator{tag.Insert(ErrorType, tagType)}, LightpushErrors.M(1)); err != nil {
utils.Logger().Error("failed to record with tags", zap.Error(err))
}
}