Skip to content

Commit

Permalink
Add instance type to metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
IanPhilips committed Nov 1, 2024
1 parent 777ef68 commit 341a5c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/shared/src/monitoring/metric-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ function serializeEntries(
},
metric: {
type: `custom.googleapis.com/${entry.type}`,
labels: entry.labels ?? {},
labels: {
...(entry.labels ?? {}),
instance_type: process.env.READ_ONLY ? 'read' : 'write',
},
},
points: [
{
Expand Down

0 comments on commit 341a5c5

Please sign in to comment.