Hi everyone i’ve been searching for an effective way to monitor forge with sentry. i found Forge transport for Sentry but it is maked as deprecated. i tried to use @sentry/node
import api from '@forge/api';
import * as Sentry from '@sentry/node';
Sentry.init({
dsn: "https://dsn.ingest.de.sentry.io/",
transportOptions: {
fetch:api.fetch,
logError: console.error,
} ,
debug: true,
autoSessionTracking: false,
});
i also added sentry domain to external fetch in manifest.
i dont receive anything in sentry dashboard and when i check the developer logs, i get this Sentry Logger [warn]: Sentry responded with status code 403 to sent event.
We had the same question last week. Debugging Forge backend with only the logs is very painful. A solution like Sentry, even it is not going in the direction of Runs on Atlassian, will make things a lot easier.
Sentry is definitely a way to help monitor your Forge apps. You should be able to use the official package as-is.
Looking at your error, it seems to be an integration (auth) issue with your Sentry project. Did you setup everything correctly? (ie, is the dns correct in relation to your project?)
@SilvreLestang in regards to Runs on Atlassian, we will offer developers a way to flag their egress permissions as analytics in the app manifest (via a new category field). This will mean that those egress do not count towards Runs on Atlassian eligibility and therefore your Forge app can still be eligible even if using Sentry or other analytics tools to help monitor and debug.
We try multiple times with and without the @atlassian/sentry-transport-forge, and we never succeed to make it work (on the backend, the frontend works fine).
FYI, here is the last config tried (index.ts):
...
import { nodeContextIntegration, init as sentryInit } from "@sentry/node";
...
sentryInit({
dsn: process.env.SENTRY_BACKEND_DSN,
autoSessionTracking: false,
integrations: [nodeContextIntegration()],
environment: process.env.SENTRY_ENVIRONMENT,
release: process.env.SENTRY_RELEASE,
});
const resolver = new Resolver();
...
And when something crash, Sentry is never triggered.
If somebody successfully make it work, please share your config.
After chatting with my team, they recommend using the following instructions - NPM package - CJS | Sentry for AWS Lambda which effectively leverages a different package that should be compatible with the Lambda architecture implementation.
Note that we have not tested it internally so we cannot guarantee its compatibility, but this is likely the best option to have Sentry working with Forge backend functions.
As part of the Runs on Atlassian program, customers will have the option to enable or disable analytics egress for the app at admin.atlassian.com.
Prior to this decision, we engaged with partners to understand their use cases for analytics. Our approach for analytics observability for “Runs on Atlassian” is incremental. We are transitioning from the current default analytics egress to a customer consent-based model, ultimately leading to the exploration of Atlassian Analytics in the future.
We firmly believe that Atlassian Analytics will encourage most customers to confidently enable analytics. Additionally, we will utilize the data and insights gathered from customer consent-based model to inform our decisions. Once we are confident that Atlassian Analytics can effectively meet partner use cases, we will encourage partners to migrate from their existing tools to the Atlassian Analytics platform. Rest assured, we will provide enough time for this transition once our long-term strategy is ready and communicated to partners.