Skip to content

[Synthtrace] Remove fnv-plus dependency#230722

Merged
rmyz merged 7 commits intoelastic:mainfrom
rmyz:230414-remove-fnv-plus
Aug 8, 2025
Merged

[Synthtrace] Remove fnv-plus dependency#230722
rmyz merged 7 commits intoelastic:mainfrom
rmyz:230414-remove-fnv-plus

Conversation

@rmyz
Copy link
Contributor

@rmyz rmyz commented Aug 6, 2025

Summary

Closes #230414

This PR removes the fnv-plus dependency by implementing the algorithm where it's used, so we keep the same output as before.

We could use the 'crypto' library for Node, but that would change the output.

Testing

  1. Console.log the hashed variable.
  2. The output should be the same before/after applying those changes. You can use simple_trace synthtrace scenario to test.

Performance

It should be relatively the same as before.

Before

image

After

image

@rmyz rmyz self-assigned this Aug 6, 2025
@rmyz rmyz added release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release synthtrace Synthtrace Topics Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. dependency-reduction initiative to reduce the number of Kibana's third-party dependencies labels Aug 6, 2025
@rmyz rmyz marked this pull request as ready for review August 6, 2025 08:58
@rmyz rmyz requested a review from a team August 6, 2025 08:58
@rmyz rmyz requested a review from a team as a code owner August 6, 2025 08:58
@elasticmachine
Copy link
Contributor

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

@rmyz rmyz marked this pull request as draft August 6, 2025 13:17
@rmyz
Copy link
Contributor Author

rmyz commented Aug 6, 2025

I'm turning this into a draft.
As decided with @Bluefinger, I will copy the code from fnv-plus and add a test to it.

@rmyz rmyz marked this pull request as ready for review August 6, 2025 14:41
@rmyz rmyz requested review from a team and Bluefinger August 6, 2025 14:42
Copy link
Contributor

@Bluefinger Bluefinger left a comment

Choose a reason for hiding this comment

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

Just a minor nit with styling

@elasticmachine
Copy link
Contributor

elasticmachine commented Aug 7, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #79 / Agents fleet_agents_status should return incoming data status for specified agents

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
@kbn/apm-synthtrace-client 6 7 +1

Total ESLint disabled count

id before after diff
@kbn/apm-synthtrace-client 8 9 +1

History

cc @rmyz

@rmyz rmyz merged commit 2a59ab5 into elastic:main Aug 8, 2025
13 checks passed
@rmyz rmyz deleted the 230414-remove-fnv-plus branch August 8, 2025 06:44
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 8, 2025
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.17 Backport failed because of merge conflicts
8.18 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.18:
- Update @testing-library (main) (#230346)
- Remove unused deps (#230630)
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [CI] Remove Bazel (#193983)
- [ska] relocate chat serverless api & functional tests (#230527)
- Remove unused deps (#230630)
9.0 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.0:
- [CI] Remove Bazel (#193983)
- Update @testing-library (main) (#230346)
9.1

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 230722

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Aug 8, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [[Synthtrace] Remove `fnv-plus` dependency
(#230722)](#230722)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T06:44:39Z","message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","synthtrace","Team:obs-ux-infra_services","v9.2.0","dependency-reduction"],"title":"[Synthtrace]
Remove `fnv-plus`
dependency","number":230722,"url":"https://github.com/elastic/kibana/pull/230722","mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230722","number":230722,"mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
rmyz added a commit to rmyz/kibana that referenced this pull request Aug 8, 2025
(cherry picked from commit 2a59ab5)

# Conflicts:
#	package.json
rmyz added a commit to rmyz/kibana that referenced this pull request Aug 8, 2025
(cherry picked from commit 2a59ab5)

# Conflicts:
#	package.json
rmyz added a commit to rmyz/kibana that referenced this pull request Aug 8, 2025
(cherry picked from commit 2a59ab5)

# Conflicts:
#	package.json
#	yarn.lock
rmyz added a commit to rmyz/kibana that referenced this pull request Aug 8, 2025
(cherry picked from commit 2a59ab5)

# Conflicts:
#	package.json
#	packages/kbn-apm-synthtrace-client/src/lib/utils/hash.test.ts
#	renovate.json
#	yarn.lock
@rmyz
Copy link
Contributor Author

rmyz commented Aug 8, 2025

💚 All backports created successfully

Status Branch Result
9.0
8.19
8.18
8.17

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

Questions ?

Please refer to the Backport tool documentation

rmyz added a commit that referenced this pull request Aug 8, 2025
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Synthtrace] Remove `fnv-plus` dependency
(#230722)](#230722)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T06:44:39Z","message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","synthtrace","Team:obs-ux-infra_services","v9.2.0","v9.1.1","dependency-reduction"],"title":"[Synthtrace]
Remove `fnv-plus`
dependency","number":230722,"url":"https://github.com/elastic/kibana/pull/230722","mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230722","number":230722,"mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231068","number":231068,"state":"MERGED","mergeCommit":{"sha":"0f11eb798443c582bc9c3261d7aea72053a2fe78","message":"[9.1]
[Synthtrace] Remove `fnv-plus` dependency (#230722) (#231068)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.1`:\n- [[Synthtrace] Remove `fnv-plus`
dependency\n(#230722)](https://github.com/elastic/kibana/pull/230722)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Sergi Romeu <sergi.romeu@elastic.co>"}}]}] BACKPORT-->
rmyz added a commit that referenced this pull request Aug 8, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[Synthtrace] Remove `fnv-plus` dependency
(#230722)](#230722)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T06:44:39Z","message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","synthtrace","Team:obs-ux-infra_services","v9.2.0","v9.1.1","dependency-reduction"],"title":"[Synthtrace]
Remove `fnv-plus`
dependency","number":230722,"url":"https://github.com/elastic/kibana/pull/230722","mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230722","number":230722,"mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231068","number":231068,"state":"MERGED","mergeCommit":{"sha":"0f11eb798443c582bc9c3261d7aea72053a2fe78","message":"[9.1]
[Synthtrace] Remove `fnv-plus` dependency (#230722) (#231068)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.1`:\n- [[Synthtrace] Remove `fnv-plus`
dependency\n(#230722)](https://github.com/elastic/kibana/pull/230722)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Sergi Romeu <sergi.romeu@elastic.co>"}}]}] BACKPORT-->
rmyz added a commit that referenced this pull request Aug 8, 2025
# Backport

This will backport the following commits from `main` to `8.17`:
- [[Synthtrace] Remove `fnv-plus` dependency
(#230722)](#230722)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T06:44:39Z","message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","synthtrace","Team:obs-ux-infra_services","v9.2.0","v9.1.1","dependency-reduction"],"title":"[Synthtrace]
Remove `fnv-plus`
dependency","number":230722,"url":"https://github.com/elastic/kibana/pull/230722","mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230722","number":230722,"mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231068","number":231068,"state":"MERGED","mergeCommit":{"sha":"0f11eb798443c582bc9c3261d7aea72053a2fe78","message":"[9.1]
[Synthtrace] Remove `fnv-plus` dependency (#230722) (#231068)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.1`:\n- [[Synthtrace] Remove `fnv-plus`
dependency\n(#230722)](https://github.com/elastic/kibana/pull/230722)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Sergi Romeu <sergi.romeu@elastic.co>"}}]}] BACKPORT-->
rmyz added a commit that referenced this pull request Aug 8, 2025
# Backport

This will backport the following commits from `main` to `8.18`:
- [[Synthtrace] Remove `fnv-plus` dependency
(#230722)](#230722)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-08-08T06:44:39Z","message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","synthtrace","Team:obs-ux-infra_services","v9.2.0","v9.1.1","dependency-reduction"],"title":"[Synthtrace]
Remove `fnv-plus`
dependency","number":230722,"url":"https://github.com/elastic/kibana/pull/230722","mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230722","number":230722,"mergeCommit":{"message":"[Synthtrace]
Remove `fnv-plus` dependency
(#230722)","sha":"2a59ab5073882c91582e914fe37d06e22e96dc9e"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231068","number":231068,"state":"MERGED","mergeCommit":{"sha":"0f11eb798443c582bc9c3261d7aea72053a2fe78","message":"[9.1]
[Synthtrace] Remove `fnv-plus` dependency (#230722) (#231068)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.1`:\n- [[Synthtrace] Remove `fnv-plus`
dependency\n(#230722)](https://github.com/elastic/kibana/pull/230722)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Sergi Romeu <sergi.romeu@elastic.co>"}}]}] BACKPORT-->
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release dependency-reduction initiative to reduce the number of Kibana's third-party dependencies release_note:skip Skip the PR/issue when compiling release notes synthtrace Synthtrace Topics Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. v8.17.11 v8.18.6 v8.19.1 v9.0.6 v9.1.1 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Synthtrace] Replace fnv-plus with a native implementation

6 participants