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

Export data #135

Open
3l3m01 opened this issue May 17, 2021 · 12 comments
Open

Export data #135

3l3m01 opened this issue May 17, 2021 · 12 comments

Comments

@3l3m01
Copy link

3l3m01 commented May 17, 2021

Is there a way to easily (or not so easily) export the data that tracy collects?
I have a big application with a lot of XSS and I need to flag them all (both the tracer, and the event). It would be much easier if I could get the data from tracy. Tried to get it from the Indexed DB (I'm using Firefox), but its harder than I anticipated.

@heathj
Copy link
Collaborator

heathj commented May 17, 2021

Hey! You're head was in the right place, indexdb would be the way to go for this since there isn't a button that would allow direct export right now. But you're right about it being not straight forward; the DB is split up since there can be many events per tracer and many requests shared between tracers. I think I can write something for you pretty easily though. Do you have a preferred export format? Would a CSV of all the rows combined work? Or would you prefer each of the tables as separate CSV file?

@heathj
Copy link
Collaborator

heathj commented May 17, 2021

Ok, I think I have a working solution, but I am curious if you would like to also be able to export the request table data. Right now, I have expanded the tracers with their corresponding events into individual rows and omitted the request data since there can often be a large number of requests associated with a single tracer. We can add the requests, but it might introduce a lot of rows that will essentially look exactly the same, but with a different request column.

My thought is, we can include as much data as the tracy provides, and then you can use other processing like Google Sheets or Excel to slice up however you like. What do you think?

@3l3m01
Copy link
Author

3l3m01 commented May 18, 2021

Request data would be nice. I'm planning to use python scripts to process it, so as long as I can get all data, the format is mostly irrelevant.
Requests probably have multiple lines, so it either needs to be escaped or encoded (maybe base64?) to work for CSV export. JSON data could work for my usecase too, and it may be easier to implement.
P.S.: Thanks for the quick response :)

@heathj
Copy link
Collaborator

heathj commented May 18, 2021

O JSON would be super easy. Let's just do that.

And sure! It's great to hear from the users. I don't work on the tool much anymore, but I probably would if I knew the community better. Always happy to help.

@heathj
Copy link
Collaborator

heathj commented May 18, 2021

Okay, this works. Although, the screenshots are base64 encoded now into the JSON object (previously, they were blob URLs), which makes the JSON objects pretty beefy. Not sure if that will cause issues for you or not since you have such a large application. If not, I will push this and it should be reflected in the application in a day or so.

@3l3m01
Copy link
Author

3l3m01 commented May 19, 2021

It should work in my case. If not, I can always do some pre-processing to reduce the size of the json file.

@jacobheath
Copy link
Collaborator

Alrighty, that is pushed to the Chrome store. Are you by chance using Firefox or Chrome? Looks like the Chrome Web Store review process is pretty lengthy now, so it might be a few days. I'll respond to this thread when it gets through pending approval. The Firefox store is a bit easier usually.

Also, I am maintaining the code at github.com/heathj/tracy now if you want to see the changes I made: heathj@5de8298#diff-24d1914f19507daee638e072c9a352ad2eb96233222d167e84ffdcc2109e4086R32

@3l3m01
Copy link
Author

3l3m01 commented May 20, 2021

I'm usually using Firefox, but I can make use of the Chrome version too, I only tries Tracy out on a few places and haven't gone trough the whole application yet.

@jacobheath
Copy link
Collaborator

O great, I actually prefer Firefox myself. It's on the Firefox store as well now. I'll update when they are approved.

@jacobheath
Copy link
Collaborator

Looks like the Firefox version is approved. Try to update your version to 0.9.1 and you should be able to find the export feature in the Settings page.

@jacobheath
Copy link
Collaborator

Looks like it was approved on Chrome too! I'll close this issue for now, but feel free to reach out if you need anything else.

@heathj
Copy link
Collaborator

heathj commented Jul 8, 2021

@3l3m01 just checking in. Did that export feature land for you? Did you have an issues with it?

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

No branches or pull requests

3 participants