Skip to content

Conversation

smalyshev
Copy link
Contributor

Adds this structure to stats:

"ccs": {
     "_search": {
        "total": 7,
        "success": 7,
        "skipped": 0,
        "took": {
            "max": 36,
            "avg": 20,
            "p90": 33
        },
        "took_mrt_true": {
            "max": 33,
            "avg": 15,
            "p90": 33
        },
        "took_mrt_false": {
            "max": 36,
            "avg": 26,
            "p90": 36
        },
        "remotes_per_search_max": 3,
        "remotes_per_search_avg": 2.0,
        "failure_reasons": { ... },
        "features": { ... },
        "clients": { ... },
        "clusters": { ... }
     }
  }

with telemetry data about CCS searches.

Copy link
Contributor

Documentation preview:

@smalyshev smalyshev changed the title Adds "ccs/_search" item to the cluster stats output. Implement CCS telemetry export as part of _cluster/stats Aug 28, 2024
@smalyshev smalyshev marked this pull request as ready for review September 5, 2024 15:53
@smalyshev smalyshev requested review from quux00 and javanna September 5, 2024 15:53
@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Sep 5, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

Copy link
Contributor

@quux00 quux00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes requested.

Also, this has fewer tests / test changes than I would have guessed. Is ClusterStatsMonitoringDocTests.java and the docs tests the only ones to change for this?

Ideas on how we might generate other tests that also exercise searches - such as an IT test like you did for populating the CCSUsageTelemetry class?

====

`ccs`::
(object) Contains information relating to <<modules-cross-cluster-search, cross-cluster search>> settings and activity in the cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I usually also ask the PM to review the end user docs.
cc: @naj-h

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a good idea.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the include_remotes option be available to enable these metrics? If so, should we document it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@naj-h Yes on both, in the next pull following this one.

@smalyshev
Copy link
Contributor Author

Ideas on how we might generate other tests that also exercise searches - such as an IT test like you did for populating the CCSUsageTelemetry class?

We already test the collection part and the JSON rendering part in existing tests, so the new test only verifies the part where it is connected to a specific stats request. I plan to do a bit more roundtrip testing with remote clusters functionality but for this I think most of it is already covered. But if you see parts that are missing we could add more.

Copy link
Contributor

@quux00 quux00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smalyshev smalyshev merged commit 9081a95 into elastic:main Sep 10, 2024
15 checks passed
@smalyshev smalyshev deleted the ccs-telemetry-out branch September 10, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search Foundations/CCS Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants