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

Write Application Telemetry to JSON file #2144

Open
kwandrew2 opened this issue Mar 7, 2024 · 4 comments
Open

Write Application Telemetry to JSON file #2144

kwandrew2 opened this issue Mar 7, 2024 · 4 comments
Labels
New Feature New feature request [class->Implemented #{number}: {title}]

Comments

@kwandrew2
Copy link

Is your feature request related to a problem? Please describe

It may be possible and I'm just missing a setting but we currently write our script telemetry data to JSON files and would like to do the same with Application Telemetry.

Describe the solution you'd like

I'd like to save application telemetry data to JSON files. We use power BI to visualize pyRevit tool usage (from the JSON files) and would like to use the same process for application telemetry.

Describe alternatives you've considered

I requested our IT team setup a application telemetry server or API endpoint and they made this process seem prohibitive because of the effort/time investment it'd take.

Additional context

If writing application telemetry to JSON is already possible please let me know and I can put this to rest. If it's not possible to write Application Telemetry data to JSON files, adding a note next to those sections in the pyRevit settings could potentially save others on these efforts.

Thanks in advance!

@kwandrew2 kwandrew2 added the New Feature New feature request [class->Implemented #{number}: {title}] label Mar 7, 2024
@sanzoghenzo
Copy link
Contributor

Hi @kwandrew2 ,
have you tried this?
image

@kwandrew2
Copy link
Author

kwandrew2 commented Mar 9, 2024

Hi @sanzoghenzo
Yes that’s what I’m currently using for commands but it doesn’t seem to write hook/event data to the json, only the commands.

@sanzoghenzo
Copy link
Contributor

Thanks for the clarification, I admin I don't use telemetry (yet) and I didn't know the difference between script and application telemetry 😅

To write the application telemetry to the same json file it would be enough to copy over 3 lines of code from here to here.

You can already try it on you local copy (files are in %appdata%\pyRevit-Master\ if you installed it as a single user), but I'm not sure if there were any reason to left it out; tomorrow at the online meeting we could discuss it along with my proposal: to get rid of our custom telemetry server and use OpenTelemetry, so that one can use the server and visualization app of his/her choice (Jaeger and zipkin are two open source options, among others - you IT would just need a linux box with docker to spin up a server...)

@kwandrew2
Copy link
Author

Thank you for the assistance! I ended up playing around with hooks a bit and enlisted the help of one of my coworkers to get project times written to a file. I’m waiting on the end product yet but truly appreciate the assistance and may end up giving what you sent a shot if we run into any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature New feature request [class->Implemented #{number}: {title}]
Projects
None yet
Development

No branches or pull requests

2 participants