Not seeing any logs or metrics

Hi, I am not seeing any logs or metrics for my app. The app is deployed in developer and production environments.
All of the logic in my app is written in the frontend/ folder. Could that be the reason for this?
Should the logic be written in resolvers/ for it to show up in metrics/invocations and logs?

That’s mostly correct. Quoting the docs:

Logs are only available when a console.log statement is made from:

Logging made from your front-end will not be available through the forge logs command.

1 Like

This was a little confusing. My frontend code is using UI Kit components. Wondering what is meant by ‘logs are available when a console.log statement is made from UI kit’. Hope someone can elaborate.
Because my frontend/ is using UI Kit and yet there are no logs.

Is it that I am on UI Kit2? How to tell whether I am on UI Kit 1 or UI Kit 2? The documentation does not describe the two systems.

I can understand your confusion. UI Kit 1 and UI Kit 2 were two distinct libraries but Atlassian has since phased out UI Kit 1 so UI Kit 2 is generally just referred to as UI Kit in their docs. More info here.

UI Kit 2 components will have render: native in the manifest for their respective modules e.g:

modules:
    confluence:globalPage:
        - key: hello-world
          resource: main
          route: hello-world
          resolver:
            function: resolver
          render: native <-----this guy
          title: UI Kit 2 App

Thanks a lot for clarifying that. It makes sense now why logs aren’t shown from the current frontend only design.
This is a big design decision of whether to use resolvers or put all code in frontend. When I first encountered resolvers, I dug up and read lots of documentation with hope of finding answer to why resolvers exist or should be used. I didn’t find anything useful.
I wish this bit about logging and more should be mentioned in why to use resolvers.