-
Notifications
You must be signed in to change notification settings - Fork 56
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
Duplicate Log Entries in CloudWatch Agent, using public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.32.5
#947
Comments
public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.32.5
I think this issue is from CloudWatch Agent, the log line is here func (emf *emfExporter) pushMetricsData(_ context.Context, md pmetric.Metrics) error {
rms := md.ResourceMetrics()
labels := map[string]string{}
for i := 0; i < rms.Len(); i++ {
rm := rms.At(i)
am := rm.Resource().Attributes()
if am.Len() > 0 {
am.Range(func(k string, v pcommon.Value) bool {
labels[k] = v.Str()
return true
})
}
}
emf.config.logger.Info("Start processing resource metrics", zap.Any("labels", labels))
emf.processResourceLabels(labels) I am not sure if this need to be info level logging. TBH I am not sure which repo is the right place to create issue (cwagent, otel contrib), you can check with @bjrara |
I agree with this comment, the log should not be created at info level. In v1.32.5, we introduced runtime metrics (which will be released on 11/20) that emit JVM metrics every minute. I believe the so called "duplicated" logs come from different batches of metrics, one from runtime, one from RED (latency, error, fault) metrics generated from incoming/outgoing calls. It shouldn't cause any impacting problems but I do agree such logs are misleading and noisy. We should downgrade the log level to avoid confusion. |
Actually, the log level has been downgraded in OTEL collector: open-telemetry/opentelemetry-collector-contrib#29337. Seems to be a missing patch at CloudWatch agent side. |
Describe the bug
Using
public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.32.5
,the CloudWatch Agent is sending duplicate log entries with the same content, like this:
Note: I masked Sensitive information.
This issue occurs in v1.32.5 but did not occur in v1.32.4.
Steps to reproduce
According to the Application Signals - Deploy using the Sidecar Strategy documentation, I configured my task definition as follows:
containerDefinitions in taskdef.json
What did you expect to see?
The CloudWatch Agent doesn't send duplicate log entries.
What did you see instead?
CloudWatch Agent is sending duplicate log entries with the same content.
Additional context
The text was updated successfully, but these errors were encountered: