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

feat: Add SpanLimit (includes some config changes) #1266

Merged
merged 10 commits into from
Aug 12, 2024

Conversation

kentquirk
Copy link
Contributor

Which problem is this PR solving?

#1257 -- helps to keep Refinery from exploding when a giant trace arrives.

Short description of the changes

@kentquirk kentquirk added this to the v2.8 milestone Aug 8, 2024
@kentquirk kentquirk self-assigned this Aug 8, 2024
@kentquirk kentquirk requested a review from a team as a code owner August 8, 2024 21:36
Copy link
Contributor

@VinozzZ VinozzZ left a comment

Choose a reason for hiding this comment

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

Looks good to me! Would nice to also have a unit test in collect_test.go to confirm a trace is sent when its span count surpass the configured SpanLimit.

I'm also wondering if the SpanLimit can be used in CacheImpact calculation so that we can eject giant traces first when there's memory pressure

@kentquirk
Copy link
Contributor Author

I added that test.

We already use a cache impact calculation, which is a combination of memory usage and duration in the cache to eject the largest traces first.

@kentquirk kentquirk merged commit 5005bb0 into main Aug 12, 2024
4 checks passed
@kentquirk kentquirk deleted the kent.span_count_limit branch August 12, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add span count limit as an alternative way to kick off trace evaluation
2 participants