Skip to content
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

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Use cloudwatch #110

merged 1 commit into from
Dec 16, 2024

Conversation

norkans7
Copy link
Contributor

@norkans7 norkans7 commented Dec 12, 2024

No description provided.

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 90.32258% with 9 lines in your changes missing coverage. Please review.

Project coverage is 63.06%. Comparing base (e513ab2) to head (5701fd3).

Files with missing lines Patch % Lines
cmd/rp-archiver/main.go 0.00% 6 Missing ⚠️
archives/archives.go 96.42% 2 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@norkans7 norkans7 force-pushed the use-cloudwatch branch 2 times, most recently from 4c2de9c to 5c71762 Compare December 13, 2024 11:35
@norkans7 norkans7 marked this pull request as ready for review December 13, 2024 16:58
@norkans7 norkans7 mentioned this pull request Dec 13, 2024
@@ -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})
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

@norkans7 norkans7 force-pushed the use-cloudwatch branch 3 times, most recently from 0f85b80 to 207e8a1 Compare December 13, 2024 19:22
)

assert.NoError(t, err)
assert.Equal(t, 1, rt.CW.Client.(*cwatch.DevClient).CallCount())
Copy link
Member

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


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},
Copy link
Member

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.

@rowanseymour rowanseymour merged commit 205dd68 into main Dec 16, 2024
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2024
@rowanseymour rowanseymour deleted the use-cloudwatch branch December 16, 2024 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants