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

processor/otel: clone shared labels for log events #7358

Merged
merged 1 commit into from Feb 21, 2022

Conversation

axw
Copy link
Member

@axw axw commented Feb 21, 2022

Motivation/summary

Make sure we call initEventLabels on every log event, to clone any shared labels produced from resource attributes. If we don't call that, then we end up updating the shared label map for each log record in a payload.

Checklist

How to test these changes

See #7311

Related issues

Fixes #7311

@axw axw added backport-8.0 Automated backport with mergify backport-8.1 Automated backport with mergify labels Feb 21, 2022
@apmmachine
Copy link
Collaborator

apmmachine commented Feb 21, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-02-21T09:57:24.220+0000

  • Duration: 69 min 47 sec

Test stats 🧪

Test Results
Failed 0
Passed 5648
Skipped 19
Total 5667

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /hey-apm : Run the hey-apm benchmark.

  • /package : Generate and publish the docker images.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@axw axw marked this pull request as ready for review February 21, 2022 12:07
@axw axw requested a review from a team February 21, 2022 12:07
Copy link
Contributor

@marclop marclop left a comment

Choose a reason for hiding this comment

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

thanks for the fix!

@axw axw merged commit afdd45e into elastic:main Feb 21, 2022
@axw axw deleted the otel-logs-labels branch February 21, 2022 12:28
mergify bot pushed a commit that referenced this pull request Feb 21, 2022
(cherry picked from commit afdd45e)

# Conflicts:
#	processor/otel/logs_test.go
mergify bot pushed a commit that referenced this pull request Feb 21, 2022
(cherry picked from commit afdd45e)

# Conflicts:
#	changelogs/head.asciidoc
#	processor/otel/logs_test.go
axw added a commit that referenced this pull request Feb 21, 2022
) (#7359)

* processor/otel: copy shared labels for logs (#7358)

(cherry picked from commit afdd45e)

# Conflicts:
#	processor/otel/logs_test.go

* Fix merge conflict

Co-authored-by: Andrew Wilkins <axw@elastic.co>
axw added a commit that referenced this pull request Feb 21, 2022
) (#7360)

* processor/otel: copy shared labels for logs (#7358)

(cherry picked from commit afdd45e)

# Conflicts:
#	changelogs/head.asciidoc
#	processor/otel/logs_test.go

* Delete head.asciidoc

* Fix merge conflict

Co-authored-by: Andrew Wilkins <axw@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.0 Automated backport with mergify backport-8.1 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenTelemetry Log message attributes are mixed across different messages
3 participants