You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/collector.md
+1-15Lines changed: 1 addition & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,14 +98,10 @@ Optional:
98
98
-`logs_sample_rate` (Number) Sample rate for logs (0-100).
99
99
-`memory_batch_size_mb` (Number) Memory batch size in MB for outgoing requests. Maximum 40 MB.
100
100
-`namespace_option` (Block Set) Per-namespace overrides for log sampling rate and trace ingestion (Kubernetes only). Order-independent; entries are identified by name. (see [below for nested schema](#nestedblock--configuration--namespace_option))
101
-
-`service_option` (Block Set) Per-service overrides for log sampling rate and trace ingestion. Only includes user-managed services; internal collector services (`better-stack-beyla`, `better-stack-collector`) are excluded. See `service_option_all` for the complete server state. (see [below for nested schema](#nestedblock--configuration--service_option))
101
+
-`service_option` (Block Set) Per-service overrides for log sampling rate and trace ingestion. Only includes user-managed services; internal collector services (`better-stack-beyla`, `better-stack-collector`) are excluded. Use the `logtail_collector` data source to see all discovered services. (see [below for nested schema](#nestedblock--configuration--service_option))
102
102
-`traces_sample_rate` (Number) Sample rate for traces (0-100).
103
103
-`vrl_transformation` (String) VRL transformation that runs on the collector host, inside your infrastructure, before data is transmitted to Better Stack. Use this for PII redaction and sensitive data filtering — raw data never leaves your network. For server-side transformations that run during ingestion on Better Stack, use the top-level `source_vrl_transformation` attribute instead. Read more about [VRL transformations](https://betterstack.com/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).
104
104
105
-
Read-Only:
106
-
107
-
-`service_option_all` (Set of Object) All per-service overrides including server-managed internal defaults (`better-stack-beyla`, `better-stack-collector`). Read-only; to configure services, use `service_option`. (see [below for nested schema](#nestedatt--configuration--service_option_all))
@@ -271,7 +271,7 @@ var collectorSchema = map[string]*schema.Schema{
271
271
ValidateFunc: validation.IntAtMost(40),
272
272
},
273
273
"service_option": {
274
-
Description: "Per-service overrides for log sampling rate and trace ingestion. Only includes user-managed services; internal collector services (`better-stack-beyla`, `better-stack-collector`) are excluded. See `service_option_all` for the complete server state.",
274
+
Description: "Per-service overrides for log sampling rate and trace ingestion. Only includes user-managed services; internal collector services (`better-stack-beyla`, `better-stack-collector`) are excluded. Use the `logtail_collector` data source to see all discovered services.",
275
275
Type: schema.TypeSet,
276
276
Optional: true,
277
277
Set: hashOptionEntry,
@@ -283,19 +283,6 @@ var collectorSchema = map[string]*schema.Schema{
283
283
},
284
284
},
285
285
},
286
-
"service_option_all": {
287
-
Description: "All per-service overrides including server-managed internal defaults (`better-stack-beyla`, `better-stack-collector`). Read-only; to configure services, use `service_option`.",
"ingest_traces": {Type: schema.TypeBool, Computed: true, Description: "Whether to ingest traces for this service."},
296
-
},
297
-
},
298
-
},
299
286
"namespace_option": {
300
287
Description: "Per-namespace overrides for log sampling rate and trace ingestion (Kubernetes only). Order-independent; entries are identified by name.",
301
288
Type: schema.TypeSet,
@@ -581,6 +568,101 @@ func fetchCollectorDatabases(ctx context.Context, meta interface{}, collectorID
581
568
returndatabases, nil
582
569
}
583
570
571
+
// getUserManagedOptionNames reads the current state's service_option or namespace_option
572
+
// names before d.Set overwrites them. Returns a map of names the user explicitly manages.
573
+
// Returns an empty map for data sources or resources with no option blocks.
0 commit comments