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

appmap_dir config param in appmap.yml does not work #345

Closed
sgrigson opened this issue Oct 31, 2023 · 5 comments · Fixed by #348
Closed

appmap_dir config param in appmap.yml does not work #345

sgrigson opened this issue Oct 31, 2023 · 5 comments · Fixed by #348
Labels
enhancement New feature or request released

Comments

@sgrigson
Copy link

sgrigson commented Oct 31, 2023

You cannot override the output directory because it's harcoded.

output_dir = File.join(AppMap::DEFAULT_APPMAP_DIR, 'requests')

We should be able to set appmap_dir to something other than tmp/appmap but at this point in time it does not seem to be referencing the parameter during recording.

@sgrigson sgrigson changed the title appmap_dir does not work appmap_dir config param in appmap.yml does not work Oct 31, 2023
@kgilpin
Copy link
Contributor

kgilpin commented Oct 31, 2023

Hi, the appmap_dir is currently designed to be advisory to other tools about where the AppMaps will be located, rather than a directive to the appmap gem. For example, by consulting the appmap_dir the code editor extension can watch only one specific directory for AppMaps, rather than having to watch the whole project.

Where do you want the AppMaps to go, and what is the purpose? Sharing that information will help us to assess the best course of action.

@kgilpin kgilpin added the enhancement New feature or request label Oct 31, 2023
@sgrigson
Copy link
Author

I guess it sort of defeats the point to have an 'advisory' about where the files will be written when they'll only be written one place.

I'm attempting to create OpenApi files by running an AppMap for Mastodon.

The problem is that Mastodon already uses the tmp folder and periodically will clear the folder, often while in the middle of generating an appmap.

So I need to write it to a non 'tmp' folder location.

@kgilpin
Copy link
Contributor

kgilpin commented Oct 31, 2023

I guess it sort of defeats the point to have an 'advisory' about where the files will be written when they'll only be written one place.

This is true for Ruby but the other tools support Java, Python, and Node.js as well. They all provide appmap_dir in appmap.yml.

Other tunable settings in the Ruby agent (use environment variables](https://appmap.io/docs/reference/appmap-ruby.html#advanced-runtime-options). So I'd suggest this is the best path forward to make the appmap dir configurable.

@sgrigson
Copy link
Author

This is true for Ruby but the other tools support Java, Python, and Node.js as well. They all provide appmap_dir in appmap.yml.

Exactly, take Java for instance. It pretty clearly states that appmap_dir is the directory that will be used when recording.

Screenshot 2023-10-31 at 12 37 37 PM

And even in the AppMap Ruby documentation under Configuration it says this first:

When you run your program, the appmap gem reads configuration settings from appmap.yml ....

^That suggests pretty strongly that appmap is receiving configuration from appmap.yml, and if it did use that directory during recording, it would match the Java behavior.

Other tunable settings in the Ruby agent use environment variables...

That would be fine, too, there just isn't an ENV for that for Ruby to set any alternate output directory.

@kgilpin
Copy link
Contributor

kgilpin commented Dec 18, 2023

🎉 This issue has been resolved in version 0.103.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants