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

apmpackage: prepare for move to apm-data plugin #12102

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

axw
Copy link
Member

@axw axw commented Nov 24, 2023

Motivation/summary

This is a precursor to #12066.

The undocumented, best-effort 7.x migration data stream migration pipeline has been removed. To migrate, users can install an older version and perform a stepped upgrade.

We add mappings for various fields to the integration package that were previously unmapped.

The following fields are all newly mapped as flattened:

  • error.custom
  • error.exception.attributes
  • error.exception.stacktrace
  • error.log.stacktrace
  • http.request.body (always send as a JSON object with a single field, original)
  • http.request.env
  • http.request.cookies
  • span.message.headers
  • span.stacktrace
  • transaction.custom
  • transaction.message.headers

http.{request,response}.headers have been changed from object to flattened. Even though these were mapped as object type, they were inheriting dynamic: false and thus the headers never got mapped. The result of this change is headers will be returned in fields now, as http.request.headers: {Content-Length: ...}. There's no change to the _source for these fields.

http.response.headers_sent is mapped as a boolean.
transaction.span_count.started is mapped as a long for consistency with transaction.span_count.dropped.

The following fields are mapped as keyword, in line with the dynamic mapping rules of the apm-data plugin's templates:

  • span.db.instance
  • span.db.type
  • span.db.user.name
  • span.db.statement
  • span.message.body
  • span.message.routing_key
  • transaction.message.body
  • transaction.message.routing_key

Checklist

How to test these changes

  • Check that error/exception stack traces show up correctly in APM UI
  • Check that HTTP request/response headers show up in APM UI
  • Check that SQL statements show up in APM UI

Related issues

#12066

Copy link
Contributor

mergify bot commented Nov 24, 2023

This pull request does not have a backport label. Could you fix it @axw? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-7.17 is the label to automatically backport to the 7.17 branch.
  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Nov 24, 2023
@axw axw marked this pull request as ready for review November 24, 2023 06:42
@axw axw requested a review from a team as a code owner November 24, 2023 06:42
@axw axw added the v8.12.0 label Nov 24, 2023
@axw axw enabled auto-merge (squash) November 28, 2023 03:35
@axw axw merged commit 46c0967 into elastic:main Nov 28, 2023
15 checks passed
@axw axw deleted the apmpackage-updates branch November 28, 2023 04:34
@simitt simitt self-assigned this Dec 19, 2023
@simitt
Copy link
Contributor

simitt commented Dec 19, 2023

Verified with BC-2 that

  • error stacktraces show up
  • http headers show up
  • sql statements show up as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify test-plan test-plan-ok v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants