Skip to content

QueryLoggingConfiguration

Source: src/AWS/AMP/QueryLoggingConfiguration.ts

The query logging configuration of an Amazon Managed Service for Prometheus workspace — ships PromQL query logs (query text, QSP cost, response code) to CloudWatch Logs. A workspace has at most one.

const workspace = yield* AMP.Workspace("Metrics", {});
const logs = yield* Logs.LogGroup("QueryLogs", {
logGroupName: "/aws/vendedlogs/prometheus/metrics-queries",
});
const queryLogging = yield* AMP.QueryLoggingConfiguration("QueryLogging", {
workspaceId: workspace.workspaceId,
destinations: [{ logGroupArn: logs.logGroupArn, qspThreshold: 1000 }],
});