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

Fix concurrency in emf exporter #2571

Merged
merged 1 commit into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix concurrency issues in emf exporter
  • Loading branch information
bjrara committed Mar 9, 2021
commit 2a374445340639d66c7f1c831297b5e5f337571c
4 changes: 2 additions & 2 deletions exporter/awsemfexporter/cwlog_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import (
"go.uber.org/zap"
)

func NewAlwaysPassMockLogClient() LogClient {
func NewAlwaysPassMockLogClient(putLogEventsFunc func(args mock.Arguments)) LogClient {
logger := zap.NewNop()
svc := new(mockCloudWatchLogsClient)

svc.On("PutLogEvents", mock.Anything).Return(
&cloudwatchlogs.PutLogEventsOutput{
NextSequenceToken: &expectedNextSequenceToken},
nil)
nil).Run(putLogEventsFunc)

svc.On("CreateLogGroup", mock.Anything).Return(new(cloudwatchlogs.CreateLogGroupOutput), nil)

Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/metric_translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func translateCWMetricToEMF(cWMetric *CWMetrics) *LogEvent {
}

metricCreationTime := cWMetric.TimestampMs
logEvent := NewLogEvent(
logEvent := newLogEvent(
metricCreationTime,
string(pleMsg),
)
Expand Down
Loading