feat: Improve faro.receiver.sourcemaps caching strategy#4337
Merged
kalleep merged 40 commits intografana:mainfrom Jan 21, 2026
Merged
feat: Improve faro.receiver.sourcemaps caching strategy#4337kalleep merged 40 commits intografana:mainfrom
kalleep merged 40 commits intografana:mainfrom
Conversation
…ps can be removed from cache if cache minimum ttl is specified
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
kalleep
reviewed
Sep 17, 2025
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Contributor
Author
|
Hi @kalleep, any updates on this? |
kalleep
reviewed
Dec 10, 2025
kalleep
reviewed
Dec 16, 2025
kalleep
reviewed
Jan 14, 2026
kalleep
reviewed
Jan 14, 2026
Contributor
kalleep
left a comment
There was a problem hiding this comment.
Looks good, just one more comment!
Contributor
Author
Hey @kalleep, I've changed RWMutex to Mutex in sourcemap cache. |
Contributor
|
Great there are some linting issues https://github.com/grafana/alloy/actions/runs/21137540434/job/60791161970?pr=4337 |
Contributor
|
Revisited the docs and suggested some improvements |
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Contributor
Author
I've removed the unnecessary whitespaces. |
kalleep
approved these changes
Jan 21, 2026
This was referenced Jan 21, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Alloy currently stores all source maps in memory (cache) indefinitely. This can become an issue if you are running an instance with a lot of big source maps where frontend application versions often change as it can lead to OOM. I've added an option to clear source maps from cache if they were not used after the specified time has passed.
In this PR I've also changed the behavior of the cache when download/parsing of sourcemaps fails. Before, errors would be cached and download would not be retried. With this solution you can specify an interval in which you want to check if there are any errors cached and remove them, after which Alloy will reattempt to download.
Which issue(s) this PR fixes
No issue filed.
Notes to the Reviewer
PR Checklist