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] 404 Not found when Error Group Id has special characters in synthtrace scenarios #209096

Closed
rmyz opened this issue Jan 31, 2025 · 2 comments · Fixed by #210010
Closed

[APM] 404 Not found when Error Group Id has special characters in synthtrace scenarios #209096

rmyz opened this issue Jan 31, 2025 · 2 comments · Fixed by #210010
Assignees
Labels
apm:synthtrace APM Synthtrace Topics apm bug Fixes for quality problems that affect the customer experience Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@rmyz
Copy link
Contributor

rmyz commented Jan 31, 2025

Summary

We have a bug when a synthtrace service has error group ids that contain special characters, for example No handler for GET /order/{id}.

Image

As the way we create links is to append the errorGroupId into the URL, as it's not encoded, it will end up having a route like /services/Titus-java-1994/errors/00No handler for GET /order/{id}, the router can't match a route to this path, so it returns a 404.

Image

Technical context

We had a function that calculated the error.grouping_key but the implementation changed to rely on APMError constructor and is using generateLongId which ends up having an error.grouping_key like 00No handler for GET /order/{id} for the error No handler for GET /order/{id}, which is wrong.

AC

  • Regardless of the error group id, users using synthtrace should be able to navigate into the details of each error group.
@rmyz rmyz added apm Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Jan 31, 2025
@rmyz rmyz self-assigned this Jan 31, 2025
@elasticmachine
Copy link
Contributor

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

@smith smith added the bug Fixes for quality problems that affect the customer experience label Jan 31, 2025
@rmyz
Copy link
Contributor Author

rmyz commented Feb 3, 2025

I have been debugging with @kpatticha, and this error is only related to Synthtrace, will investigate why it is not creating the error group id as a number.

We are safe as this does not impact our customers.

@rmyz rmyz added the apm:synthtrace APM Synthtrace Topics label Feb 3, 2025
@rmyz rmyz changed the title [APM] 404 Not found when Error Group Id has special characters [APM] 404 Not found when Error Group Id has special characters in synthtrace scenarios Feb 3, 2025
@rmyz rmyz closed this as completed in ba5ae97 Feb 7, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Feb 7, 2025
kibanamachine added a commit that referenced this issue Feb 7, 2025
…0010) (#210230)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Synthtrace] Sanitize default value for error grouping key
(#210010)](#210010)

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

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

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-02-07T17:13:11Z","message":"[Synthtrace]
Sanitize default value for error grouping key (#210010)\n\n##
Summary\n\nCloses
#209096","sha":"ba5ae97569e59b83d6748bd0a8a5b52b573fda07","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","apm","backport:prev-minor","apm:synthtrace","ci:project-deploy-observability","Team:obs-ux-infra_services","v9.1.0"],"title":"[Synthtrace]
Sanitize default value for error grouping
key","number":210010,"url":"https://github.com/elastic/kibana/pull/210010","mergeCommit":{"message":"[Synthtrace]
Sanitize default value for error grouping key (#210010)\n\n##
Summary\n\nCloses
#209096","sha":"ba5ae97569e59b83d6748bd0a8a5b52b573fda07"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210010","number":210010,"mergeCommit":{"message":"[Synthtrace]
Sanitize default value for error grouping key (#210010)\n\n##
Summary\n\nCloses
#209096","sha":"ba5ae97569e59b83d6748bd0a8a5b52b573fda07"}}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
Samiul-TheSoccerFan pushed a commit to Samiul-TheSoccerFan/kibana that referenced this issue Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:synthtrace APM Synthtrace Topics apm bug Fixes for quality problems that affect the customer experience Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
3 participants