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

[APM] Fix: Add tracing sample missing fields in the overview #206932

Conversation

jennypavlova
Copy link
Member

@jennypavlova jennypavlova commented Jan 16, 2025

Closes #200474

Summary

This PR fixes the issue with tracing sample missing URL/Status Code/User Agent fields in the overview

Testing

  • Open the APM UI and find APM traces that contains url.full / transaction.page.url, http.request.method and http.response.status_code
    • One should be ingested using an otel collector the other should use an apm-server

      • if using oblt cluster you can check transactions from loadgenerator and opbeans-python for example
    • check the trace summary:

      • Otel:

      image

      • APM server:

      image

@jennypavlova jennypavlova added release_note:skip Skip the PR/issue when compiling release notes backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Jan 16, 2025
@jennypavlova jennypavlova self-assigned this Jan 16, 2025
@jennypavlova jennypavlova requested a review from a team as a code owner January 16, 2025 12:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

Copy link
Contributor

@rmyz rmyz left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@crespocarlos crespocarlos 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 quick fix!

@@ -58,7 +63,15 @@ export async function getTransaction({
TRANSACTION_TYPE,
] as const);

const optionalFields = asMutableArray([PROCESSOR_NAME, SERVICE_LANGUAGE_NAME] as const);
const optionalFields = asMutableArray([
Copy link
Contributor

Choose a reason for hiding this comment

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

These errors keep happening ever since we adapted the code to support otel, could we add a test to validate whether these fields are returned in the response?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a great idea, thanks! As this is a blocker for some users I would do it in a separate PR: I added an issue: #206947

@jennypavlova jennypavlova enabled auto-merge (squash) January 16, 2025 14:14
@jennypavlova jennypavlova merged commit 1d493c0 into elastic:main Jan 16, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12813574154

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #12 / Fleet Endpoints fleet_proxies_crud PUT /proxies/{itemId} should allow to update an existing fleet proxy

Metrics [docs]

✅ unchanged

History

cc @jennypavlova

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 16, 2025
…#206932)

Closes elastic#200474

## Summary

This PR fixes the issue with tracing sample missing URL/Status Code/User
Agent fields in the overview

## Testing
- Open the APM UI and find APM traces that contains `url.full` /
`transaction.page.url`, `http.request.method` and
`http.response.status_code`
- One should be ingested using an otel collector the other should use an
apm-server
- if using oblt cluster you can check transactions from `loadgenerator`
and `opbeans-python` for example
    - check the trace summary:
        - Otel:

![image](https://github.com/user-attachments/assets/871172b6-8307-4aa2-844e-73a8405da746)

        - APM server:

![image](https://github.com/user-attachments/assets/ef233cf4-0fbb-49c2-8f09-d4299a34ec8c)

(cherry picked from commit 1d493c0)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 Backport failed because of merge conflicts
8.17 Backport failed because of merge conflicts
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 206932

Questions ?

Please refer to the Backport tool documentation

jennypavlova added a commit to jennypavlova/kibana that referenced this pull request Jan 16, 2025
…#206932)

Closes elastic#200474

## Summary

This PR fixes the issue with tracing sample missing URL/Status Code/User
Agent fields in the overview

## Testing
- Open the APM UI and find APM traces that contains `url.full` /
`transaction.page.url`, `http.request.method` and
`http.response.status_code`
- One should be ingested using an otel collector the other should use an
apm-server
- if using oblt cluster you can check transactions from `loadgenerator`
and `opbeans-python` for example
    - check the trace summary:
        - Otel:

![image](https://github.com/user-attachments/assets/871172b6-8307-4aa2-844e-73a8405da746)

        - APM server:

![image](https://github.com/user-attachments/assets/ef233cf4-0fbb-49c2-8f09-d4299a34ec8c)

(cherry picked from commit 1d493c0)

# Conflicts:
#	x-pack/plugins/spaces/public/config.ts
@jennypavlova
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.17
8.16

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

jennypavlova added a commit to jennypavlova/kibana that referenced this pull request Jan 16, 2025
…#206932)

Closes elastic#200474

## Summary

This PR fixes the issue with tracing sample missing URL/Status Code/User
Agent fields in the overview

## Testing
- Open the APM UI and find APM traces that contains `url.full` /
`transaction.page.url`, `http.request.method` and
`http.response.status_code`
- One should be ingested using an otel collector the other should use an
apm-server
- if using oblt cluster you can check transactions from `loadgenerator`
and `opbeans-python` for example
    - check the trace summary:
        - Otel:

![image](https://github.com/user-attachments/assets/871172b6-8307-4aa2-844e-73a8405da746)

        - APM server:

![image](https://github.com/user-attachments/assets/ef233cf4-0fbb-49c2-8f09-d4299a34ec8c)

(cherry picked from commit 1d493c0)

# Conflicts:
#	x-pack/plugins/spaces/public/config.ts
kibanamachine added a commit that referenced this pull request Jan 16, 2025
…206932) (#206978)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM] Fix: Add tracing sample missing fields in the overview
(#206932)](#206932)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-16T16:45:06Z","message":"[APM]
Fix: Add tracing sample missing fields in the overview
(#206932)\n\nCloses #200474\r\n\r\n## Summary\r\n\r\nThis PR fixes the
issue with tracing sample missing URL/Status Code/User\r\nAgent fields
in the overview\r\n\r\n## Testing\r\n- Open the APM UI and find APM
traces that contains `url.full` /\r\n`transaction.page.url`,
`http.request.method` and\r\n`http.response.status_code`\r\n- One should
be ingested using an otel collector the other should use
an\r\napm-server\r\n- if using oblt cluster you can check transactions
from `loadgenerator`\r\nand `opbeans-python` for example\r\n - check the
trace summary:\r\n - Otel:\r\n
\r\n\r\n![image](https://github.com/user-attachments/assets/871172b6-8307-4aa2-844e-73a8405da746)\r\n\r\n
- APM server:\r\n
\r\n\r\n![image](https://github.com/user-attachments/assets/ef233cf4-0fbb-49c2-8f09-d4299a34ec8c)","sha":"1d493c0a8df778ca8bfd86dbf11d59c8aa3d548c","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major","Team:obs-ux-infra_services"],"title":"[APM]
Fix: Add tracing sample missing fields in the
overview","number":206932,"url":"https://github.com/elastic/kibana/pull/206932","mergeCommit":{"message":"[APM]
Fix: Add tracing sample missing fields in the overview
(#206932)\n\nCloses #200474\r\n\r\n## Summary\r\n\r\nThis PR fixes the
issue with tracing sample missing URL/Status Code/User\r\nAgent fields
in the overview\r\n\r\n## Testing\r\n- Open the APM UI and find APM
traces that contains `url.full` /\r\n`transaction.page.url`,
`http.request.method` and\r\n`http.response.status_code`\r\n- One should
be ingested using an otel collector the other should use
an\r\napm-server\r\n- if using oblt cluster you can check transactions
from `loadgenerator`\r\nand `opbeans-python` for example\r\n - check the
trace summary:\r\n - Otel:\r\n
\r\n\r\n![image](https://github.com/user-attachments/assets/871172b6-8307-4aa2-844e-73a8405da746)\r\n\r\n
- APM server:\r\n
\r\n\r\n![image](https://github.com/user-attachments/assets/ef233cf4-0fbb-49c2-8f09-d4299a34ec8c)","sha":"1d493c0a8df778ca8bfd86dbf11d59c8aa3d548c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206932","number":206932,"mergeCommit":{"message":"[APM]
Fix: Add tracing sample missing fields in the overview
(#206932)\n\nCloses #200474\r\n\r\n## Summary\r\n\r\nThis PR fixes the
issue with tracing sample missing URL/Status Code/User\r\nAgent fields
in the overview\r\n\r\n## Testing\r\n- Open the APM UI and find APM
traces that contains `url.full` /\r\n`transaction.page.url`,
`http.request.method` and\r\n`http.response.status_code`\r\n- One should
be ingested using an otel collector the other should use
an\r\napm-server\r\n- if using oblt cluster you can check transactions
from `loadgenerator`\r\nand `opbeans-python` for example\r\n - check the
trace summary:\r\n - Otel:\r\n
\r\n\r\n![image](https://github.com/user-attachments/assets/871172b6-8307-4aa2-844e-73a8405da746)\r\n\r\n
- APM server:\r\n
\r\n\r\n![image](https://github.com/user-attachments/assets/ef233cf4-0fbb-49c2-8f09-d4299a34ec8c)","sha":"1d493c0a8df778ca8bfd86dbf11d59c8aa3d548c"}}]}]
BACKPORT-->

Co-authored-by: jennypavlova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APM Tracing sample missing URL/Status Code/User Agent fields in overview
5 participants