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

Posthog #2437

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Posthog #2437

merged 1 commit into from
Jan 15, 2025

Conversation

kevkevinpal
Copy link
Contributor

Seems like this change is still causing issues probably due to the string builder and there will need to be a more efficient way

routes/index.go Outdated
trap.AddInterceptor(&trap.Interceptor{
Pre: func(ctx context.Context, f *core.FuncInfo, args core.Object, results core.Object) (interface{}, error) {
index := strings.Index(f.File, "sphinx-tribes")
trimmed := f.File
if index != -1 {
trimmed = f.File[index:]
}
logger.Log.Machine("%s:%d %s\n", trimmed, f.Line, f.Name)
//fmt.Printf("%s:%d %s\n", trimmed, f.Line, f.Name)
elements_chain.WriteString(fmt.Sprintf("%s:%d %s,\n", trimmed, f.Line, f.Name))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is causing either a memory issue or something similar, because it is getting too large I wonder if there is a way to mitigate that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe we can do the last 100 lines of executed functions

adding variables to this aswell will bloat it even more

@kevkevinpal
Copy link
Contributor Author

ok I think I've got it working, to uncompress and decode the hex I used this command in the cli
xxd -r -p test.txt | gunzip -c > testuncompressed.txt

@kevkevinpal kevkevinpal force-pushed the posthog branch 4 times, most recently from 6176a20 to 20fd8dc Compare January 15, 2025 16:13
@kevkevinpal kevkevinpal merged commit f188da4 into master Jan 15, 2025
1 of 2 checks passed
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.

1 participant