@c1m-public/dash-site-kit 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -173,7 +173,10 @@ server the kit uses `CHANNEL_SITE_NAME` when present, then derives `site` from
173
173
  `location.hostname`. Every event also receives `site_kind=dash-site`, so one
174
174
  shared Sentry project and one Grafana dashboard can separate future site
175
175
  families without another per-deployment variable. This prevents a deployment
176
- from claiming error reporting while sending no attributable events.
176
+ from claiming error reporting while sending no attributable events. The
177
+ `observability.grafana_dashboard` event context links directly back to the same
178
+ site selection in the shared Grafana dashboard; it is derived from `site` and
179
+ does not need configuration.
177
180
  Use `CHANNEL_SITE_CHANNEL_ID` only when one deployment always represents one
178
181
  channel. If a process can serve multiple channels, attach `channel_id` inside a
179
182
  request-local Sentry scope after resolving the request instead of setting a
package/dist/sentry.d.ts CHANGED
@@ -10,6 +10,11 @@ export interface ChannelSiteSentryOptions {
10
10
  enableLogs: false;
11
11
  environment?: string;
12
12
  initialScope: {
13
+ contexts: {
14
+ observability: {
15
+ grafana_dashboard: string;
16
+ };
17
+ };
13
18
  tags: {
14
19
  channel_id?: string;
15
20
  site: string;
package/dist/sentry.js CHANGED
@@ -39,6 +39,12 @@ export function resolveChannelSiteSentryOptions(configuration) {
39
39
  enableLogs: false,
40
40
  ...(environment ? { environment } : {}),
41
41
  initialScope: {
42
+ contexts: {
43
+ observability: {
44
+ grafana_dashboard: "https://cloud1medialtd.grafana.net/d/c1m-sites-errors-health/saasdash-sites-errors-health" +
45
+ `?var-site=${encodeURIComponent(site)}&var-site_kind=dash-site&from=now-24h&to=now`,
46
+ },
47
+ },
42
48
  tags: {
43
49
  site,
44
50
  site_kind: "dash-site",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c1m-public/dash-site-kit",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Shared transport, domain and UI layer for MML dash-scoped public sites",