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

Chore: Fixes error handling in log exporter #6262

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 16 additions & 4 deletions pkg/integrations/v2/app_agent_receiver/logs_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,41 @@ func (le *LogsExporter) Export(ctx context.Context, payload Payload) error {
for _, logItem := range payload.Logs {
kv := logItem.KeyVal()
MergeKeyVal(kv, meta)
err = le.sendKeyValsToLogsPipeline(kv)
err := le.sendKeyValsToLogsPipeline(kv)
if err != nil {
return err
}
}

// exceptions
for _, exception := range payload.Exceptions {
transformedException := TransformException(le.sourceMapStore, le.logger, &exception, payload.Meta.App.Release)
kv := transformedException.KeyVal()
MergeKeyVal(kv, meta)
err = le.sendKeyValsToLogsPipeline(kv)
err := le.sendKeyValsToLogsPipeline(kv)
if err != nil {
return err
}
}

// measurements
for _, measurement := range payload.Measurements {
kv := measurement.KeyVal()
MergeKeyVal(kv, meta)
err = le.sendKeyValsToLogsPipeline(kv)
err := le.sendKeyValsToLogsPipeline(kv)
if err != nil {
return err
}
}

// events
for _, event := range payload.Events {
kv := event.KeyVal()
MergeKeyVal(kv, meta)
err = le.sendKeyValsToLogsPipeline(kv)
err := le.sendKeyValsToLogsPipeline(kv)
if err != nil {
return err
}
}

return err
Expand Down
Loading