Skip to content

Commit a35ae41

Browse files
Switch the metrics to enable all by default (#4)
1 parent ec67015 commit a35ae41

2 files changed

Lines changed: 12 additions & 18 deletions

File tree

‎cloudformation/full/README.md‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ aws cloudformation deploy \
5050

5151
| Data Type | Flow |
5252
|-----------|------|
53-
| Metrics (default) | CloudWatch Metric Stream (JSON, per-namespace opt-in) -> Firehose -> Lambda (enrichment) -> Better Stack |
53+
| Metrics (default) | CloudWatch Metric Stream (JSON, all namespaces by default) -> Firehose -> Lambda (enrichment) -> Better Stack |
5454
| Metrics (`EnableMetricStream=false`) | Better Stack pulls metrics via the CloudWatch API (`GetMetricData`) using the integration role |
5555
| Logs | CloudWatch Logs -> Subscription Filter -> Firehose -> Lambda (enrichment) -> Better Stack |
5656
| Traces | X-Ray -> CloudWatch Logs (`aws/spans`) -> Subscription Filter -> Better Stack |
@@ -98,19 +98,17 @@ The `better-stack-integration-role` already grants `cloudwatch:Get*` / `cloudwat
9898
on all resources, so Better Stack can read every metric via the API without any extra
9999
permissions.
100100

101-
### Metric namespace subscription (explicit opt-in)
101+
### Metric namespace subscription
102102

103-
When streaming is enabled, the metric stream is created with an `IncludeFilters`
104-
allowlist seeded with a single placeholder namespace (`BetterStack/Unsubscribed`) that
105-
has no metrics. **Nothing is streamed until you subscribe to specific namespaces in
106-
Better Stack**, which updates the stream's `IncludeFilters` via `cloudwatch:PutMetricStream`.
107-
This is deliberate: an *empty* `IncludeFilters` would stream **every** namespace, so the
108-
placeholder is what enforces opt-in.
103+
When streaming is enabled, the metric stream is created with no `IncludeFilters`, so it
104+
forwards **every** namespace by default — matching how log subscriptions default to on.
105+
Narrow the set in Better Stack, which updates the stream's `IncludeFilters` via
106+
`cloudwatch:PutMetricStream` (deselecting everything writes a `BetterStack/Unsubscribed`
107+
placeholder namespace so the stream sends nothing).
109108

110109
> **Re-deploys reset subscriptions.** Because CloudFormation owns the stream, running
111-
> `cloudformation deploy` again resets `IncludeFilters` back to the placeholder, dropping
112-
> the namespaces Better Stack added until it re-syncs your subscriptions. (Previously a
113-
> re-deploy reset the stream to "all namespaces" instead — the new default fails closed.)
110+
> `cloudformation deploy` again clears `IncludeFilters` back to "all namespaces", until
111+
> Better Stack re-applies your selection on the next sync.
114112
115113
```bash
116114
aws cloudformation deploy \

‎cloudformation/full/better-stack-full.yaml‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -943,13 +943,9 @@ Resources:
943943
- !GetAtt MetricStreamRole.Arn
944944
- !Sub 'arn:aws:iam::${AWS::AccountId}:role/better-stack-metric-stream-role'
945945
OutputFormat: json
946-
# Explicit-subscription default: an IncludeFilters allowlist that matches a
947-
# namespace with no metrics, so the stream sends nothing until a user
948-
# subscribes. Better Stack then adds the chosen namespaces via
949-
# PutMetricStream. NOTE: an empty IncludeFilters would stream EVERY
950-
# namespace, which is exactly what we want to avoid here. See T-18856.
951-
IncludeFilters:
952-
- Namespace: BetterStack/Unsubscribed
946+
# No IncludeFilters: the stream forwards every namespace by default, matching how
947+
# log subscriptions default to on. Better Stack narrows it to your selection via
948+
# PutMetricStream (deselecting everything writes a BetterStack/Unsubscribed placeholder).
953949
Tags:
954950
- Key: Solution
955951
Value: BetterStack

0 commit comments

Comments
 (0)