Porter
Integrate your app with Subtrace on Porter
If you’re using Porter Cloud to manage your deployments, you can easily integrate with Subtrace to monitor your app’s network requests. Depending on how you build your app on Porter, the instructions are different.
We’ll use a Next.js app as an example, but you can do this with any language and framework.
Make the following changes to your app’s Dockerfile:
Get a SUBTRACE_TOKEN
from the Tokens page on the dashboard
and set it as an environment secret on Porter:
And then deploy your app as you normally would.
That’s it! You can now visit your app and make some requests to see them automatically appear in the Subtrace dashboard.
Make the following changes to your app’s Dockerfile:
Get a SUBTRACE_TOKEN
from the Tokens page on the dashboard
and set it as an environment secret on Porter:
And then deploy your app as you normally would.
That’s it! You can now visit your app and make some requests to see them automatically appear in the Subtrace dashboard.
If you’re using Buildpacks, the easiest way to integrate Subtrace would be to just change the command that’s used to start your app on Porter.
Create a file called start.sh
in your repo root that downloads Subtrace and starts your app:
Change your app’s start command on Porter to run this script:
Get a SUBTRACE_TOKEN
from the Tokens page on the dashboard
and set it as an environment secret on Porter:
And then deploy your app as you normally would.
That’s it! You can now visit your app and make some requests to see them automatically appear in the Subtrace dashboard.