-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use cloudwatch #110
Use cloudwatch #110
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
==========================================
+ Coverage 61.11% 63.06% +1.94%
==========================================
Files 7 7
Lines 1304 1397 +93
==========================================
+ Hits 797 881 +84
- Misses 402 410 +8
- Partials 105 106 +1 ☔ View full report in Codecov by Sentry. |
4c2de9c
to
5c71762
Compare
16d1993
to
bade8ef
Compare
archives/archives.go
Outdated
@@ -966,6 +968,19 @@ func ArchiveActiveOrgs(rt *runtime.Runtime) error { | |||
timeTaken := dates.Now().Sub(start) | |||
slog.Info("archiving of active orgs complete", "time_taken", timeTaken, "num_orgs", len(orgs)) | |||
|
|||
rt.CW.Queue(types.MetricDatum{MetricName: aws.String("ArchiveElapsed"), Value: aws.Float64(timeTaken.Seconds()), Unit: types.StandardUnitSeconds}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are all sent once a night so we don't need to use the queue functionality .. see how it's done in indexer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
bade8ef
to
9ebcca0
Compare
0f85b80
to
207e8a1
Compare
archives/archives_test.go
Outdated
) | ||
|
||
assert.NoError(t, err) | ||
assert.Equal(t, 1, rt.CW.Client.(*cwatch.DevClient).CallCount()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't think we need this... this is testing gocommon not archiver
207e8a1
to
6fb4183
Compare
6fb4183
to
5701fd3
Compare
archives/archives_test.go
Outdated
|
||
err := rt.CW.Send(ctx, | ||
types.MetricDatum{MetricName: aws.String("NumGoats"), Value: aws.Float64(10), Unit: types.StandardUnitCount}, | ||
types.MetricDatum{MetricName: aws.String("NumSheep"), Dimensions: []types.Dimension{{Name: aws.String("Host"), Value: aws.String("foo1")}}, Value: aws.Float64(20), Unit: types.StandardUnitCount}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still don't feel this belongs here.. it's like testing the DB connection. Running archiving will test that rt.CW.Send
works as much as these lines.
5701fd3
to
a88a45e
Compare
a88a45e
to
5dffbc3
Compare
No description provided.