Closed francois-potato closed 1 year ago
This is already the case. It's just that we hadn't had any errors on staging, and so we'd never published anything to Sentry with environment: 'staging'
, and Sentry just creates environments automatically as you use them. I've now triggered an error on staging, and so the 'staging' environment is now listed: https://sentry.io/settings/protocol-labs-it/projects/w3name-api/environments/
Done. There's now a separate w3name-api-staging
source in Logtail and I've updated the LOGTAIL_TOKEN
for the staging worker in Cloudflare so that it sends its logs to this environment.
This is a bit more fun…
The problem seems to be that we're trying to set it, but failing to, and so the Toucan library is setting it for us, but to a value which isn't valid. Allow me to elaborate…
In buildworkermodule.mjs we create a string of w3name-api@${pkg.version}+${git.short(__dirname)}
and we attempt to set it as the value of the SENTRY_RELEASE
environment variable. But that clearly isn't working, because the value that we see coming into Sentry is actually the default value which is set by the Toucan library.
So the fix is to make the setting of the SENTRY_RELEASE
environment variable work. I've now made a PR to fix this: #95.
LGTM 👍
release: Discarded invalid value @w3name/api-1.2.0
)