Repository navigation
[sql_server_input_otel][mysql_input_otel] Add signal-specific system and policy tests for logs and metrics - #3508
Merged
Merged
Conversation
…_otel and mysql_input_otel sql_server_input_otel: - Enable test-logs-config with signal_types: logs, covering db.server.top_query and db.server.query_sample events with fields_present assertions aligned with upstream receiver field names (user.name instead of sqlserver.username; sqlserver.query_plan removed due to ES ignore_above limit). Uses top_query_lookback_time: 20s to match the workload's 20s lock window. - Add test-metrics-config (skipped pending multisignal input support). - Enable log event collection in default and datasource configs so the default system test also exercises log collection alongside metrics. - Remove blanket fields_present from default and datasource configs. - Fix Docker workload to hold TABLOCKX so foreground SELECTs appear as suspended sessions in sys.dm_exec_requests for query_sample collector. - Remove skip directive from all 5 existing policy tests. - Add test-resource-attributes policy test for resource_attributes var. - Add test-logs-custom-collection policy test for non-default query settings. mysql_input_otel: - Add test-logs-config and test-metrics-config signal-specific system tests with fields_present assertions using correct mysqlreceiver field names. - Add policy tests for logs and metrics enabling. - Restrict default system test to a multisignal run (no signal_types filter), dropping fields_present in favour of signal-specific configs. Ref: elastic/integrations#18658 (elastic/integrations#18658) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsHistory
cc @mrodm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the
sql_server_input_otelandmysql_input_oteltest packages to add signal-specific system and policy tests, aligned with the changes in elastic/integrations#18658.sql_server_input_oteltest-logs-configsystem test withsignal_types: logs, coveringdb.server.top_queryanddb.server.query_sampleevents withfields_presentassertions aligned with upstream receiver field names (user.nameinstead ofsqlserver.username;sqlserver.query_planremoved due to ESignore_abovelimit). Usestop_query_lookback_time: 20sto match the workload's lock window.test-metrics-configsystem test (skipped pending multisignal input support in elastic-package).fields_presentfrom default and datasource configs — assertions are now handled per-signal config file.TABLOCKX) so foregroundSELECTs appear as suspended sessions insys.dm_exec_requests, making them reliably visible to thequery_samplecollector.skipdirective from all 5 existing policy tests.test-resource-attributespolicy test for theresource_attributesvar.test-logs-custom-collectionpolicy test for non-default query-sample and top-query settings.mysql_input_oteltest-logs-configandtest-metrics-configsignal-specific system tests withfields_presentassertions using correctmysqlreceiverfield names.signal_typesfilter), droppingfields_presentin favour of the signal-specific configs.Why
These tests ensure that both OTel SQL integrations collect the expected fields for each signal type, catch regressions in field naming conventions, and validate that policy rendering produces correct agent configurations for all supported configuration options.
Related