Skip to content

Commit

Permalink
Allow dynamic datasets and namespaces (elastic#11168)
Browse files Browse the repository at this point in the history
* allow dynamic datasets and namespaces

* only keep dynamic datasets and namespaces for app metrics and app logs

* add dynamic namespace to every data stream

* add dynamic dataset to traces

* update changelog
  • Loading branch information
dmathieu authored and bmorelli25 committed Sep 5, 2023
1 parent bf8d473 commit a91b6e4
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apmpackage/apm/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
- description: Placeholder
type: enhancement
link: https://github.com/elastic/apm-server/pull/123
- description: Add permissions to reroute to dedicated datasets for logs, metrics and traces
type: enhancement
link: https://github.com/elastic/apm-server/pull/11168
- description: Add permissions to reroute to dedicated namespaces for every data stream.
type: enhancement
link: https://github.com/elastic/apm-server/pull/11168
- version: "8.9.0"
changes:
- description: Handle `metricset.samples` from apm-server
Expand Down
3 changes: 3 additions & 0 deletions apmpackage/apm/data_stream/app_logs/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ dataset: apm.app
dataset_is_prefix: true
ilm_policy: logs-apm.app_logs-default_policy
elasticsearch:
# Ensures agents have permissions to write data to `logs-*-*`
dynamic_dataset: true
dynamic_namespace: true
index_template:
mappings:
# TODO(axw) investigate setting `dynamic: runtime`, so that fields are
Expand Down
3 changes: 3 additions & 0 deletions apmpackage/apm/data_stream/app_metrics/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ dataset: apm.app
dataset_is_prefix: true
ilm_policy: metrics-apm.app_metrics-default_policy
elasticsearch:
# Ensures agents have permissions to write data to `metrics-*-*`
dynamic_dataset: true
dynamic_namespace: true
index_template:
mappings:
# Application metrics must be dynamically mapped,
Expand Down
1 change: 1 addition & 0 deletions apmpackage/apm/data_stream/error_logs/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type: logs
dataset: apm.error
ilm_policy: logs-apm.error_logs-default_policy
elasticsearch:
dynamic_namespace: true
index_template:
mappings:
# TODO(axw) investigate setting `dynamic: runtime`, so that fields are
Expand Down
1 change: 1 addition & 0 deletions apmpackage/apm/data_stream/internal_metrics/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type: metrics
dataset: apm.internal
ilm_policy: metrics-apm.internal_metrics-default_policy
elasticsearch:
dynamic_namespace: true
index_template:
mappings:
# We are in full control of the field names,
Expand Down
1 change: 1 addition & 0 deletions apmpackage/apm/data_stream/rum_traces/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type: traces
dataset: apm.rum
ilm_policy: traces-apm.rum_traces-default_policy
elasticsearch:
dynamic_namespace: true
index_template:
mappings:
# TODO(axw) investigate setting `dynamic: runtime`, so that fields are
Expand Down
1 change: 1 addition & 0 deletions apmpackage/apm/data_stream/sampled_traces/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type: traces
dataset: apm.sampled
ilm_policy: traces-apm.sampled_traces-default_policy
elasticsearch:
dynamic_namespace: true
privileges:
# We need additional privileges for the sampled traces data stream,
# for refreshing indices, querying index stats, and reading documents.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type: metrics
dataset: apm.service_destination.{{ .Interval }}
ilm_policy: metrics-apm.service_destination_{{ .Interval }}_metrics-default_policy
elasticsearch:
dynamic_namespace: true
index_template:
mappings:
# We are in full control of the field names,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type: metrics
dataset: apm.service_summary.{{ .Interval }}
ilm_policy: metrics-apm.service_summary_{{ .Interval }}_metrics-default_policy
elasticsearch:
dynamic_namespace: true
index_template:
mappings:
# We are in full control of the field names,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type: metrics
dataset: apm.service_transaction.{{ .Interval }}
ilm_policy: metrics-apm.service_transaction_{{ .Interval }}_metrics-default_policy
elasticsearch:
dynamic_namespace: true
index_template:
mappings:
# We are in full control of the field names,
Expand Down
3 changes: 3 additions & 0 deletions apmpackage/apm/data_stream/traces/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ type: traces
dataset: apm
ilm_policy: traces-apm.traces-default_policy
elasticsearch:
# Ensures agents have permissions to write data to `traces-*-*`
dynamic_dataset: true
dynamic_namespace: true
index_template:
mappings:
# TODO(axw) investigate setting `dynamic: runtime`, so that fields are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type: metrics
dataset: apm.transaction.{{ .Interval }}
ilm_policy: metrics-apm.transaction_{{ .Interval }}_metrics-default_policy
elasticsearch:
dynamic_namespace: true
index_template:
mappings:
# We are in full control of the field names,
Expand Down
1 change: 1 addition & 0 deletions changelogs/head.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ https://github.com/elastic/apm-server/compare/8.9\...main[View commits]
- Add a self-instrumentation transaction to the source map periodic refresh action. {pull}11116[11116]
- Add a self-instrumentation transaction to the agent config periodic refresh action. {pull}11129[11129]
- Stop dropping metadata fields from span documents. {pull}11089[11089]
- Add permissions to reroute events in the integration package. {pull}11168[11168]

0 comments on commit a91b6e4

Please sign in to comment.