-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sampling: use a data stream for sampled trace docs #4707
Conversation
This enables x-pack/apm-server code to alter behaviour based on whether APM Server is managed or not, and to create data streams with the configured namespace.
Update tail-based sampling to index into and search a data stream. The data stream will be associated with an ILM policy that takes care of rollover and deletion. When running in Fleet-managed mode, apm-server will expect the data stream and ILM policy to exist for the data stream called `traces-sampled-<namespace>`. Servers participating in tail-based sampling are required to be configured with the same namespace. When running in standalone mode, apm-server will attempt to create an index template and ILM policy for a data stream called `apm-sampled-traces`. This is added for minimal support while we transition things to Fleet, and is intended to be removed in a future release. The data stream is not intended to adhere to the standard indexing strategy.
Add a data stream for sampled trace documents, along with an ILM policy which rolls over after 1h, and then deletes after 1h.
When searching for beats monitoring docs, make sure we get the most recent one by sorting on 'timestamp'.
Update test to rely on apm-server to create its own data stream index template.
9e2ce55
to
8b6a31d
Compare
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪Test errorsExpand to view the tests failures
|
jenkins run the tests please |
Codecov Report
@@ Coverage Diff @@
## master #4707 +/- ##
==========================================
- Coverage 76.20% 76.14% -0.07%
==========================================
Files 163 164 +1
Lines 9898 9935 +37
==========================================
+ Hits 7543 7565 +22
- Misses 2355 2370 +15
|
jenkins run the tests please |
On second thoughts, merging - the apm-it failure is clearly not related to this. It's been flaky recently. |
* beater: add Managed and Namespace to ServerParams This enables x-pack/apm-server code to alter behaviour based on whether APM Server is managed or not, and to create data streams with the configured namespace. * sampling: use a data stream for sampled trace docs Update tail-based sampling to index into and search a data stream. The data stream will be associated with an ILM policy that takes care of rollover and deletion. When running in Fleet-managed mode, apm-server will expect the data stream and ILM policy to exist for the data stream called `traces-sampled-<namespace>`. Servers participating in tail-based sampling are required to be configured with the same namespace. When running in standalone mode, apm-server will attempt to create an index template and ILM policy for a data stream called `apm-sampled-traces`. This is added for minimal support while we transition things to Fleet, and is intended to be removed in a future release. The data stream is not intended to adhere to the standard indexing strategy. * apmpackage: add traces-sampled-* data stream Add a data stream for sampled trace documents, along with an ILM policy which rolls over after 1h, and then deletes after 1h. * systemtest: fetch most recent beats monitoring doc When searching for beats monitoring docs, make sure we get the most recent one by sorting on 'timestamp'. * systemtest: update tail-based sampling test Update test to rely on apm-server to create its own data stream index template. * Cross-reference sampling/pubsub and apmpackage # Conflicts: # changelogs/head.asciidoc # systemtest/elasticsearch.go
* beater: add Managed and Namespace to ServerParams This enables x-pack/apm-server code to alter behaviour based on whether APM Server is managed or not, and to create data streams with the configured namespace. * sampling: use a data stream for sampled trace docs Update tail-based sampling to index into and search a data stream. The data stream will be associated with an ILM policy that takes care of rollover and deletion. When running in Fleet-managed mode, apm-server will expect the data stream and ILM policy to exist for the data stream called `traces-sampled-<namespace>`. Servers participating in tail-based sampling are required to be configured with the same namespace. When running in standalone mode, apm-server will attempt to create an index template and ILM policy for a data stream called `apm-sampled-traces`. This is added for minimal support while we transition things to Fleet, and is intended to be removed in a future release. The data stream is not intended to adhere to the standard indexing strategy. * apmpackage: add traces-sampled-* data stream Add a data stream for sampled trace documents, along with an ILM policy which rolls over after 1h, and then deletes after 1h. * systemtest: fetch most recent beats monitoring doc When searching for beats monitoring docs, make sure we get the most recent one by sorting on 'timestamp'. * systemtest: update tail-based sampling test Update test to rely on apm-server to create its own data stream index template. * Cross-reference sampling/pubsub and apmpackage # Conflicts: # changelogs/head.asciidoc # systemtest/elasticsearch.go
* beater: add Managed and Namespace to ServerParams This enables x-pack/apm-server code to alter behaviour based on whether APM Server is managed or not, and to create data streams with the configured namespace. * sampling: use a data stream for sampled trace docs Update tail-based sampling to index into and search a data stream. The data stream will be associated with an ILM policy that takes care of rollover and deletion. When running in Fleet-managed mode, apm-server will expect the data stream and ILM policy to exist for the data stream called `traces-sampled-<namespace>`. Servers participating in tail-based sampling are required to be configured with the same namespace. When running in standalone mode, apm-server will attempt to create an index template and ILM policy for a data stream called `apm-sampled-traces`. This is added for minimal support while we transition things to Fleet, and is intended to be removed in a future release. The data stream is not intended to adhere to the standard indexing strategy. * apmpackage: add traces-sampled-* data stream Add a data stream for sampled trace documents, along with an ILM policy which rolls over after 1h, and then deletes after 1h. * systemtest: fetch most recent beats monitoring doc When searching for beats monitoring docs, make sure we get the most recent one by sorting on 'timestamp'. * systemtest: update tail-based sampling test Update test to rely on apm-server to create its own data stream index template. * Cross-reference sampling/pubsub and apmpackage # Conflicts: # changelogs/head.asciidoc # systemtest/elasticsearch.go
* beater: add Managed and Namespace to ServerParams This enables x-pack/apm-server code to alter behaviour based on whether APM Server is managed or not, and to create data streams with the configured namespace. * sampling: use a data stream for sampled trace docs Update tail-based sampling to index into and search a data stream. The data stream will be associated with an ILM policy that takes care of rollover and deletion. When running in Fleet-managed mode, apm-server will expect the data stream and ILM policy to exist for the data stream called `traces-sampled-<namespace>`. Servers participating in tail-based sampling are required to be configured with the same namespace. When running in standalone mode, apm-server will attempt to create an index template and ILM policy for a data stream called `apm-sampled-traces`. This is added for minimal support while we transition things to Fleet, and is intended to be removed in a future release. The data stream is not intended to adhere to the standard indexing strategy. * apmpackage: add traces-sampled-* data stream Add a data stream for sampled trace documents, along with an ILM policy which rolls over after 1h, and then deletes after 1h. * systemtest: fetch most recent beats monitoring doc When searching for beats monitoring docs, make sure we get the most recent one by sorting on 'timestamp'. * systemtest: update tail-based sampling test Update test to rely on apm-server to create its own data stream index template. * Cross-reference sampling/pubsub and apmpackage # Conflicts: # changelogs/head.asciidoc # systemtest/elasticsearch.go
Motivation/summary
Update tail-based sampling to index into and search a data stream. The data stream will be associated with an ILM policy that takes care of rollover and deletion.
When running in Fleet-managed mode, apm-server will expect the data stream and ILM policy to exist for the data stream called
traces-sampled-<namespace>
. Servers participating in tail-based sampling are required to be configured with the same namespace.When running in standalone mode, apm-server will attempt to create an index template and ILM policy for a data stream called
apm-sampled-traces
. This is added for minimal support while we transition things to Fleet, and is intended to be removed in a future release. The data stream is not intended to adhere to the standard indexing strategy.Checklist
How to test these changes
cd systemtest && go test -v -run TailSampling
For manual testing:
It's not currently possible to configure tail sampling with Fleet, so no testing steps are described for those parts. Just check that installing the package leads to the "sampled_traces" data stream index template, ILM policy, and ingest pipeline being installed.
Related issues
Closes #4584