We've seen cases of OOM errors in the test runner process, which occur
when we convert a response to a JSON string and then parse it. We can
directly parse from its input stream to avoid these OOM errors.
A predicate to check whether the cluster supports a feature is available
to rest handlers defined in server. This commit adds that predicate to
plugins defining rest handlers as well.
`ActionType` represents an action which runs on the local node, there's
no need for implementations to define a `Reader<Response>`. This commit
removes the unused constructor argument.
I noticed we're using 5 minutes for both query timeout and triggering
the out-of-memory action in heap attack tests. This means when we're
generating the heap dump, and some ESQL tasks might get canceled because
the connection was disconnected. This PR increases the query timeout to
6 minutes instead.
This updates two tests: * it chunks the bulk loading of "many longs",
which can "choke" some test environments otherwise. * it increases the
number of the "too many evals", which otherwise can be served in some
environments and not trigger a breaker.
The heap attack recent failures are because of #104240. Analyzing 2000
fields took more than 5 minutes in CI. With the fix in #104246, we can
enable this test now.
Relates #10424
We need to add a test plugin in the heap attack tests. However, we are
not loading test plugins in the release builds; hence, we need to skip
this suite.
This PR enables ESQL heap attack tests. I have run this suite over 500
iterations with different hardware configurations for the last two days,
and all have been successful with the changes in #104159.
Additionally, this PR adds an action that can trigger OOM to generate a
heap dump if a test takes more than 5 minutes. I've seen cases
(previously with our CI) where the test didn't result in OOM but was
taking too long. Having the ability to inspect the heap in such cases
would be beneficial.
Closes#103527Closes#100678
This commit adds a minimum metric name validation which checks:
metric name starts with es. prefix
metric name is using . as a separator of elements
metric name is using characters from a white list
validate min number of elements = 3 elements ( prefix, group and the suffix name)
validate max number of elements and max characters per element
validate the suffix element in a metric name to be from the enumerated allow list
It also modifies existing metric names to adhere to those rules
asynchronous counters (available in otel) are instruments which allow to update the counter's value with the callback style api. The callback has to report always the latest value. Upon restart the value might go back to 0, but in the backend apm server will know that since the value is always increasing.
Same as #101175, shorten `client().prepareIndex(index)` and
`client().prepareIndex().setIndex(index)` via a test utility.
Saves lots of code now and sets up some follow-up simplifcations.
this commit adds an integration test where ES is run with
apm-java-agent and sending traces.
Traces are then received by a fake http server and could be asserted on.
depending on operating system a System.lineSeparator is different however when reading a stream always with UTF_8 it will always be '\n'
This commit fixes the parsing of the ndjson that was failing on windows
closes#101793
this commit adds an integration test for APM module. In these tests we want to be independent to metrics generated by server, to avoid accidental failures when a code in server is refactored.
This test is implemented as a separate gradle module with a test plugin that is exposing a rest endpoint and executes metrics registration & reporting.
This commit forbids the use of Thread constructors that do not take a
name. In general nameless threads are more difficult to understand their
purpose when debugging. Note that this is only added to production
signatures. Tests are not forbidden here so as not to be pedantic (or
require a larger change since many tests create anonymous threads).
relates #101628