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

[7.x] Refactor metadata enrichment and fix bug in v3 Intake (#3943) #3945

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Jul 6, 2020

Backports the following commits to 7.x:

Decode request metadata into a struct instead of a map and pass the metadata struct
into a decoder function. The refactoring automatically fixes a bug where the `client.ip`
and `user_agent` were not set for v3 RUM events.

implements elastic#3885
fixes elastic#3942
@simitt simitt added the backport label Jul 6, 2020
@apmmachine
Copy link
Contributor

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #3945 opened]

  • Start Time: 2020-07-06T09:02:34.186+0000

  • Duration: 26 min 3 sec

Test stats 🧪

Test Results
Failed 0
Passed 3004
Skipped 144
Total 3148

Steps errors

Expand to view the steps failures

  • Name: Compress

    • Description: tar --exclude=coverage-files.tgz -czf coverage-files.tgz coverage

    • Duration: 0 min 0 sec

    • Start Time: 2020-07-06T09:17:44.846+0000

    • log

  • Name: Compress

    • Description: tar --exclude=system-tests-linux-files.tgz -czf system-tests-linux-files.tgz system-tests

    • Duration: 0 min 0 sec

    • Start Time: 2020-07-06T09:28:35.147+0000

    • log

  • Name: Test Sync

    • Description: ./script/jenkins/sync.sh

    • Duration: 2 min 29 sec

    • Start Time: 2020-07-06T09:13:15.915+0000

    • log

@simitt simitt merged commit de5447b into elastic:7.x Jul 6, 2020
@axw
Copy link
Member

axw commented Jul 21, 2020

Verified with BC2.

Created a basic webpage with RUM, using the v3 protocol:

<html>
<head>
<script src="https://unpkg.com/@elastic/apm-rum/dist/bundles/elastic-apm-rum.umd.min.js" crossorigin></script>
<script>
elasticApm.init({
  serviceName: 'webapp',
  serverUrl: 'http://localhost:8200',
  apiVersion: 3,
})
</script>
</head>
<body>
hello!
<a href="/">back</a>
</body>

Confirmed that client.ip and user_agent.* are added to the docs:

image

image

@simitt simitt deleted the backport/7.x/pr-3943 branch August 11, 2020 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants