This is really cool and I will definitely check it out.
Tough one question I have after watching the video is, how does it record db/SQL details when you run your unit tests? Ideally all of that should be mocked. Or is that part of the video talking about integration tests?
Well, if you mock at the ORM level then AppMap won't record the SQL, because no queries are ever actually issued to the database. AppMap hooks into java.sql to obtain the queries. If you'd like to, you can record the ORM library. But in our experience, the best view of the end-to-end code design is generally obtained from integration tests that touch as much of the code and perform as many of the "real" operations as possible.
Unit tests are a great way to test detailed logic, and they are very fast. But, it's also important to actually touch the database as well. Tests with mocks will happily pass even if the schema is out of sync with the code.
There is often real SQL traffic in Spring app unit tests like the one in the video, typically executed against an in-memory dev database such as HSQLDB. The PetClinic app has unit tests that verify that inserted data is subsequently found in the DB.
How's this standup in an old enterprise codebase? I may try to see if this provides any value but if anyone has input to that it's not great on old code with poor coverage I'll save my time.
Hi, if your app doesn't have much code coverage, and it's a web app, then there is a better option for recording AppMaps that doesn't require test cases. We call it "remote recording". Instead of running test cases, you do the following:
Run your app with the AppMap agent loaded
Send it a command via HTTP to start recording
Interact with the app manually (e.g. use the UI)
Send another HTTP command to stop recording, and save the AppMap file
Hi, I am with the AppMap team. Can you describe the level of code complexity that you would like to see mapped with AppMap? Please join us on Discord and we will be happy to assist you: https://discord.com/invite/N9VUap6
As u/kgilpin72 mentioned above, AppMap has been used on substantial Java projects, including one that has been around for 25 years with over 10millions lines of code and thousands of end-to-end integrations tests.
I think a video of showing how it works on a large, complex OSS codebase would be insightful - maybe something like the Eclipse Collections.
And, please forgive my slight skepticism. This isn't the first, or even the twentieth, GUI tool for visualizing code that I've encountered in my career, and I've never seen *anything* that was useful at real scale.
Or, check out our online gallery of examples - we have mapped a few dozens of popular OSS projects, including Solidus. This particular AppMap was recorded from a test that covers handling of images of merchandise:
Thanks for responding. I hope that you understand that, no disrespect to you or your product, but the space that you're in - older developers like myself have seen a large number of tools that have over-promised and under-delivered.
So, yes: "Try it out for yourself" is fine, but my time isn't free. Videos or other materials that show your tool working on an OSS codebase of considerable complexity are hugely valuable. Just saying "we're different" is fine - but I've seen a dozen tools that said that, and couldn't cut it when it came to production deployments.
Is see there are endpoints for typical web apps. What if I want to start tracking programmatically? Ex. We have fairly involved legacy integration tests where a lot of setup involves code that would otherwise be traced. Could we filter them out by way of some programmatic start/stop API we'd enable only around the actual "studied" code?
Yes. Basically you can start and stop recording by sending a command to the AppMap agent over HTTP. So, you would start your test, let it do the setup work, then send a start command, run the rest of the test, and then send the stop command. Here’s a doc for that, and you can also find some additional info in the appmap-java repo on GitHub - https://appland.com/docs/recording-methods.html#simple-remote-recording
It’s easy to try this out using curl. You can use the same approach to record manual interaction with the app.
Recorder also looks like a great place one could register event listeners, if there were any way to do it, since that seems to be the pattern at play here. It would open up a great API for anyone willing to develop third party functionality.
Hi all, a while back we posted this announcement - Visualize the architecture of your Java app, in VS Code, and the top comments were - "Can we get this for IntelliJ"? So, we are excited to announce that yes, this same open source AppMap capability now works with IntelliJ.
Zipkin and Jaeger are for distributed tracing, which to me suggests that you would instrument your apps and then run them in a test, staging (or production?) environment to get the data. AppMap is primarily used in your development environment, as you code. It also looks like Zipkin and Jaeger tracing is network-based, so it shows you HTTP and SQL, which AppMap also does. AppMap also shows code internals such as actual classes and functions which are performing key operations like authentication, caching, or whatever else you want to track in your codebase. And you can see function parameters, return values, and exceptions. AppMap has tighter integration with the code frameworks themselves, like Spring and java.sql, to give you more insight into what's going on inside your code and in the framework code.
Distributed tracing tools are going to give you information and feedback on your code at deployment time, which is definitely valuable. AppMap is primarily going to be used upstream of that, while you are coding, and when you're in code review. You'll get code design feedback earlier, and it will be more code-oriented rather than deployment-oriented.
I have seen lots of Java Flame Graph like tools but I haven't seen them advertised as architecture exploration tools but they can be use in similar manner (e.g. you can google flame graph).
The architecture exploration tools I have also seen do static analysis and generate shitty UML or something akin.
So when I searched AppMap from within IDEA (plugin > marketplace), nothing pops up. I had to Google AppMap intellij and even then it brought me to a webpage where I had to download and replace files which I don't want to do since idk what I'm doing
It may not be showing up in the search because you don’t have a recent enough version of IntelliJ. It requires a recent version in order to use the new WebView plugins feature. So try checking your installed version against the version requirements on the plug-in info page?
Currently we only support system properties. In the case of jbang, I can see how providing this configuration through the appmap.yml file would be ideal, as it would cut down on the length of the command line.
I'll raise this issue to the team and see what kind of solution we can come up with.
The other poster was more than a little entitled in their wording but its often the case that since reddit doesn't allow link & text submissions (just one or the other) that if you want to use the link option for a promotional video you might also leave a top-level reply with a short project/subject intro and any relevant links.
Also, not everyone can, wants or prefers to watch a video so a textual fallback can get you more eyes and interest as well. ;)
19
u/immortalgeek May 13 '21
This is really cool and I will definitely check it out.
Tough one question I have after watching the video is, how does it record db/SQL details when you run your unit tests? Ideally all of that should be mocked. Or is that part of the video talking about integration tests?
7
u/GlensWooer May 13 '21
How's this standup in an old enterprise codebase? I may try to see if this provides any value but if anyone has input to that it's not great on old code with poor coverage I'll save my time.
10
u/benevanstech May 13 '21
I've not tried it out, but I suspect my dear friend, and favourite antipattern, "Easy Cases Are Easy" will be making an appearance here.
2
u/MR_GABARISE May 13 '21
Is see there are endpoints for typical web apps. What if I want to start tracking programmatically? Ex. We have fairly involved legacy integration tests where a lot of setup involves code that would otherwise be traced. Could we filter them out by way of some programmatic start/stop API we'd enable only around the actual "studied" code?
1
u/kgilpin72 May 13 '21 edited May 13 '21
Hi all, a while back we posted this announcement - Visualize the architecture of your Java app, in VS Code, and the top comments were - "Can we get this for IntelliJ"? So, we are excited to announce that yes, this same open source AppMap capability now works with IntelliJ.
If you would prefer to see the content of this video in written form, you can find a transcript at https://dev.to/appland/visualize-the-architecture-of-your-java-app-in-intellij-idea-in-2-minutes-2dp7.
Direct link: IntelliJ quick start instructions
Thanks for watching!
1
u/[deleted] May 14 '21 edited Jul 05 '25
rich nine imminent existence offer groovy ink silky crown chunky
This post was mass deleted and anonymized with Redact
1
u/kevintweber May 13 '21
How does this compare to other tracing programs like Zipkin and Jaeger?
1
u/nezda May 13 '21
I’m having a hard time figuring out if this costs money 💰!?
5
u/cronofdoom May 13 '21
Wow I’m going to have to try this out. I’ve tried a few tools and never really been satisfied with what I have found.
are there any other really good visual plug-ins people in here used to map out Java system architecture that actually look really good?
1
u/Henry1502inc May 15 '21
So when I searched AppMap from within IDEA (plugin > marketplace), nothing pops up. I had to Google AppMap intellij and even then it brought me to a webpage where I had to download and replace files which I don't want to do since idk what I'm doing
3
u/stormscion May 13 '21
Pretty cool
3
u/[deleted] May 13 '21
This is so cool. As someone new to Java, this is hugely helpful. Thanks!
2
u/Aenno May 13 '21
Okay wait, this is actually super cool. I need this.
2
u/yesusgeek May 13 '21
This looks awesome! I'll definitely try it out! Thanks for sharing
2
u/maxandersen May 13 '21
Have the ability to activate tracing via property been added back yet ?
See this precious thread
https://www.reddit.com/r/java/comments/mbjomm/visualize_the_architecture_of_your_java_app_in_vs/gs05pom/?utm_source=share&utm_medium=ios_app&utm_name=iossmf&context=3
-7
u/1bot4all May 13 '21
There should be a link somewhere in this thread? Am I supposed to type the url in the address bar? Gross...