-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add New Metrics For Where Customer Are Using The Agent #913
Conversation
translator/util/sdkutil.go
Outdated
region = SDKRegionWithCredsMap(mode, credsConfig) | ||
regionType = agentinfo.REGION_NOT_FOUND |
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.
I think if this happens, the agent will shut down before being able to reach out to the backend to send this metric. I will leave this in any way.
6e715ec
to
6781fb3
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #913 +/- ##
==========================================
+ Coverage 57.58% 62.95% +5.37%
==========================================
Files 370 325 -45
Lines 17548 16154 -1394
==========================================
+ Hits 10105 10170 +65
+ Misses 6848 5470 -1378
+ Partials 595 514 -81
☔ View full report in Codecov by Sentry. |
6781fb3
to
bf65482
Compare
We may need to increase our header size so we do not drop logs since we are increasing the header size with this change. |
c38a9b1
to
3fbfdec
Compare
@@ -31,7 +31,7 @@ const ( | |||
LogEntryField = "value" | |||
|
|||
defaultFlushTimeout = 5 * time.Second | |||
eventHeaderSize = 26 | |||
eventHeaderSize = 200 |
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.
Changed to 200 at the request of @bryce-carey
@@ -96,6 +97,17 @@ func (ctx *Context) Mode() string { | |||
return ctx.mode | |||
} | |||
|
|||
func (ctx *Context) ShortMode() string { |
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.
Can move to SetMode
.
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.
Spoke offline changed to suggestions
5f187b5
to
747f0f0
Compare
747f0f0
to
713f5e9
Compare
Description of the issue
CloudWatch Agent wants to collect metrics on where the agent is being run.
Description of changes
Add metrics for CloudWatch Agent mode and region provider. I did this by creating global variables for these metrics and shoving them into the config layer to be picked up by the plugins. This is because this information is only known at translation time, but we need this information at plugin runtime.
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Unit tests
Requirements
Before commit the code, please do the following steps.
make fmt
andmake fmt-sh
make lint