[9.1] (backport #9341) [beatreceiver] Enable telemetry for indexing errors on ES exporter - and test to ensure sensitive logs are not shipped#10376
Merged
khushijain21 merged 6 commits into9.1from Oct 29, 2025
Conversation
…and test to ensure sensitive logs are not shipped (#9341) * [beatreceiver] Enable telemetry for indexing errors on ES exporter - and test to ensure sensitive logs are not shipped * remove extra line (cherry picked from commit eb098ec) # Conflicts: # internal/pkg/otel/translate/otelconfig_test.go # testing/integration/ess/beat_receivers_test.go
Contributor
Author
|
Cherry-pick of eb098ec has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Contributor
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
khushijain21
previously approved these changes
Oct 7, 2025
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏 |
1 similar comment
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏 |
khushijain21
previously approved these changes
Oct 22, 2025
8802f6e to
462dd7d
Compare
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏 |
Member
|
Is this backport waiting on other dependencies to go into |
462dd7d to
dd05322
Compare
khushijain21
approved these changes
Oct 29, 2025
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsHistory
|
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.
What does this PR do?
This PR was already reviewed/approved here #8988. The original had to be closed due to security reason.
This PR enables telemetry logs for failed input docs on ES exporter.
This PR also adds a test to ensure sensitive logs from ES exporter or elastic-owned components are not shipped by
filestream-monitoring.And for sensitive logs from ES exporter are also blocked. The reasoning follows
If a document is failed to index for any reason, ES exporter logs the document at debug level.
The format looks something like this
{"log.level":"debug", "@timestamp":"2025-07-14T06:35:24.235Z", "message":"failed to index document; input may contain sensitive data", "input":"{\"create\":{\"_index\":\"logs-test-default\"}}\n{\"host\":{\"hostname\":\"Khushis-MacBook-Pro.local\",\...}\n", "index":"logs-test-default", "error.type":"strict_dynamic_mapping_exception", "error.reason":"", "ecs.version":"1.6.0", }Since the
inputfield above contains a json document andfilestream-monitoring's ndjson parser does not recurseively parse JSON - we can be sure this field in never indexed.This test explicity ensure this behavior is always true
This test is a follow up as part of the discussion here #8738 (comment)
Why is it important?
Checklist
./changelog/fragmentsusing the changelog toolHow to test this PR locally
Related issues
This is an automatic backport of pull request #9341 done by [Mergify](https://mergify.com).