Skip to content

Commit 16bb5b1

Browse files
provide orgId to grafana RuleGroup (#8113)
1 parent ad6db5b commit 16bb5b1

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

deployment/services/grafana-alerts.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export function deployGrafanaAlerts(envName: string) {
2323

2424
// Single rule group for the metric-alerts feature; evaluation interval
2525
// matches the cron that produces the underlying metrics (every minute).
26-
// @ts-expect-error @lbrlabs/pulumi-grafana@0.1.0 marks orgId required on
27-
// RuleGroupArgs but optional on Folder/Dashboard; per the library docstring,
28-
// omitting it falls back to the provider's configured org (same as how the
29-
// Folder above and Dashboards in services/grafana.ts are set up).
26+
// `orgId: 1` is the default "Main Org" — Folder and Dashboard fall back to
27+
// the provider's configured org when omitted, but RuleGroup validates the
28+
// property at construct time and throws if missing.
3029
const ruleGroup = new RuleGroup('metric-alerts-evaluator', {
30+
orgId: '1',
3131
folderUid: folder.uid,
3232
name: 'metric-alerts-evaluator',
3333
intervalSeconds: 60,

deployment/services/grafana.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export function deployGrafana(envName: string, tableSuffix: string) {
2323
);
2424
params['TABLE_SUFFIX'] = tableSuffix;
2525
params['PROM_DATASOURCE_UID'] = params['PROM_DATASOURCE_UID'] ?? 'grafanacloud-prom';
26+
params['TEMPO_DATASOURCE_UID'] = params['TEMPO_DATASOURCE_UID'] ?? 'grafanacloud-traces';
2627

2728
const dashboards = availableFiles.map(filePath => {
2829
const fullPath = join(dashboardDirectory, filePath);

0 commit comments

Comments
 (0)