-
Notifications
You must be signed in to change notification settings - Fork 313
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
Pick up data streams in disk-usage-stats telemetry #1455
Conversation
Some of our tracks just declare data streams.
tests/telemetry_test.py
Outdated
@@ -4150,24 +4150,31 @@ def test_logs_warning_on_missing_stats(self, metrics_put_value_cluster_level, me | |||
|
|||
class TestDiskUsageStats: | |||
@mock.patch("elasticsearch.Elasticsearch") | |||
def test_uses_indices_param_by_default(self, es): | |||
def test_uses_indices_and_data_streams_by_default(self, es): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you split this case, please? Per the docs, we can only use one or the other
The indices section contains a list of all indices that are used by this track. Cannot be used if the data-streams section is specified.
tests/telemetry_test.py
Outdated
|
||
@mock.patch("elasticsearch.Elasticsearch") | ||
def test_uses_indices_param_if_specified(self, es): | ||
cfg = create_config() | ||
metrics_store = metrics.EsMetricsStore(cfg) | ||
tc = TransportClient(response={"_shards": {"failed": 0}}) | ||
es = Client(transport_client=tc) | ||
device = telemetry.DiskUsageStats({"disk-usage-stats-indices": "foo,bar"}, es, metrics_store, ["baz"]) | ||
device = telemetry.DiskUsageStats( | ||
{"disk-usage-stats-indices": "foo,bar"}, es, metrics_store, index_names=["baz"], data_stream_names=["not_this"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise would be good here to only use index_names or data_stream_names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Excited to get this for our data stream-based benchmarks also
Nice! |
Some of our tracks just declare data streams.