-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add support for app ids in spark #691
base: master
Are you sure you want to change the base?
Conversation
Hi @ambud ! I let the CI run, there are small lint errors that you can fix. To e2e test the profiler, you can build it locally with the instructions here https://github.com/Granulate/gprofiler/blob/master/CONTRIBUTING.md#docker-build for a Docker image build, and |
Note that you might be able to achieve the same goal by using the |
I had already tried running the script however it failed due to Granulate utils dependency, is there something I need to install? |
Thanks for this pointer, I don't think it will be as clean though since there are several places the |
Updated the code and fixed the lint issue |
Did you clone with submodules? (see as suggested here. granulate-utils is a submodule necessary for the build, yeah. Don't need to build it or anything, just clone |
I see, so a pattern like If the matching was done on the full commandline, the pattern could be |
for idx, x in enumerate(args): | ||
if x == self._APP_ID_KEY: | ||
return f"spark: {args[idx+1]}" | ||
except Exception: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you expect any particular exception type here? ValueError
for idx+1
? Please change to ValueError
then (it's nicer compared to generic except Exception
which might catch unexpected things)
Oh I didn't realize that's where the build instructions were. Let me try. |
We're currently investigating another approach, so putting this on hold. |
gprofiler doesn't pull the spark app ids which are necessary as a fallback mechanism if app name is unavailable.
Description
Adding a simple cli parser to pull app ids in case app names are not available
Related Issue
None
Motivation and Context
Without app ids we get no way to identify what app this is.
How Has This Been Tested?
Locally tested the snippet, added try catch in case the snippet fails.