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][Otel] Fix an error with mobile services #196161

Closed
jennypavlova opened this issue Oct 14, 2024 · 2 comments · Fixed by #196313
Closed

[APM][Otel] Fix an error with mobile services #196161

jennypavlova opened this issue Oct 14, 2024 · 2 comments · Fixed by #196313
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@jennypavlova
Copy link
Member

The mobile service transactions should load without error

Error:
Image

Expected:
Image

@jennypavlova jennypavlova added the bug Fixes for quality problems that affect the customer experience label Oct 14, 2024
@jennypavlova jennypavlova self-assigned this Oct 14, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 14, 2024
@jennypavlova jennypavlova added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Oct 14, 2024
@elasticmachine
Copy link
Contributor

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

@jennypavlova
Copy link
Member Author

PR merged in #195242

@jennypavlova jennypavlova reopened this Oct 15, 2024
jennypavlova added a commit that referenced this issue Oct 15, 2024
…196313)

Closes #196161 
## Summary

This PR fixes an issue with the mobile data using synthtrace. After some
investigation I saw that the the `httpSpan` was creating the spans with
`transaction.type` set which resulted in `processor.event` being set to
`transaction` instead of `span` - then with [the new required
transaction
fields](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L277)
in get_trace_docs for transactions ([checking based on the
processor.event](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L352))
we were throwing an error because the transaction fields were not
defined (which is expected because it's a span and not a transaction)

## Testing 

Generate mobile data using:
`node scripts/synthtrace mobile.ts --clean`

Open all the mobile traces (ios/Android) - there should not be an error
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 15, 2024
…lastic#196313)

Closes elastic#196161
## Summary

This PR fixes an issue with the mobile data using synthtrace. After some
investigation I saw that the the `httpSpan` was creating the spans with
`transaction.type` set which resulted in `processor.event` being set to
`transaction` instead of `span` - then with [the new required
transaction
fields](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L277)
in get_trace_docs for transactions ([checking based on the
processor.event](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L352))
we were throwing an error because the transaction fields were not
defined (which is expected because it's a span and not a transaction)

## Testing

Generate mobile data using:
`node scripts/synthtrace mobile.ts --clean`

Open all the mobile traces (ios/Android) - there should not be an error

(cherry picked from commit c218e7c)
kibanamachine added a commit that referenced this issue Oct 15, 2024
…trace (#196313) (#196357)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM][Otel] Fix an error with mobile services coming from synthtrace
(#196313)](#196313)

<!--- 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":"2024-10-15T15:53:12Z","message":"[APM][Otel]
Fix an error with mobile services coming from synthtrace
(#196313)\n\nCloses #196161 \r\n## Summary\r\n\r\nThis PR fixes an issue
with the mobile data using synthtrace. After some\r\ninvestigation I saw
that the the `httpSpan` was creating the spans
with\r\n`transaction.type` set which resulted in `processor.event` being
set to\r\n`transaction` instead of `span` - then with [the new
required\r\ntransaction\r\nfields](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L277)\r\nin
get_trace_docs for transactions ([checking based on
the\r\nprocessor.event](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L352))\r\nwe
were throwing an error because the transaction fields were
not\r\ndefined (which is expected because it's a span and not a
transaction)\r\n\r\n## Testing \r\n\r\nGenerate mobile data
using:\r\n`node scripts/synthtrace mobile.ts --clean`\r\n\r\nOpen all
the mobile traces (ios/Android) - there should not be an
error","sha":"c218e7cc29c00864d744d886c6e712b99ba97ed5","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.16.0","backport:version"],"title":"[APM][Otel]
Fix an error with mobile services coming from
synthtrace","number":196313,"url":"https://github.com/elastic/kibana/pull/196313","mergeCommit":{"message":"[APM][Otel]
Fix an error with mobile services coming from synthtrace
(#196313)\n\nCloses #196161 \r\n## Summary\r\n\r\nThis PR fixes an issue
with the mobile data using synthtrace. After some\r\ninvestigation I saw
that the the `httpSpan` was creating the spans
with\r\n`transaction.type` set which resulted in `processor.event` being
set to\r\n`transaction` instead of `span` - then with [the new
required\r\ntransaction\r\nfields](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L277)\r\nin
get_trace_docs for transactions ([checking based on
the\r\nprocessor.event](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L352))\r\nwe
were throwing an error because the transaction fields were
not\r\ndefined (which is expected because it's a span and not a
transaction)\r\n\r\n## Testing \r\n\r\nGenerate mobile data
using:\r\n`node scripts/synthtrace mobile.ts --clean`\r\n\r\nOpen all
the mobile traces (ios/Android) - there should not be an
error","sha":"c218e7cc29c00864d744d886c6e712b99ba97ed5"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196313","number":196313,"mergeCommit":{"message":"[APM][Otel]
Fix an error with mobile services coming from synthtrace
(#196313)\n\nCloses #196161 \r\n## Summary\r\n\r\nThis PR fixes an issue
with the mobile data using synthtrace. After some\r\ninvestigation I saw
that the the `httpSpan` was creating the spans
with\r\n`transaction.type` set which resulted in `processor.event` being
set to\r\n`transaction` instead of `span` - then with [the new
required\r\ntransaction\r\nfields](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L277)\r\nin
get_trace_docs for transactions ([checking based on
the\r\nprocessor.event](https://github.com/elastic/kibana/blob/adb558a86bafbe3567915c3fae252ff414147930/x-pack/plugins/observability_solution/apm/server/routes/traces/get_trace_items.ts#L352))\r\nwe
were throwing an error because the transaction fields were
not\r\ndefined (which is expected because it's a span and not a
transaction)\r\n\r\n## Testing \r\n\r\nGenerate mobile data
using:\r\n`node scripts/synthtrace mobile.ts --clean`\r\n\r\nOpen all
the mobile traces (ios/Android) - there should not be an
error","sha":"c218e7cc29c00864d744d886c6e712b99ba97ed5"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
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
bug Fixes for quality problems that affect the customer experience Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants