-
Notifications
You must be signed in to change notification settings - Fork 210
[beatreceiver] Enable telemetry for indexing errors on ES exporter - and test to ensure sensitive logs are not shipped #9341
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
Conversation
…and test to ensure sensitive logs are not shipped
|
This PR is going to be flaky because of global paths in filebeat. Keeping this in draft mode until elastic/beats#44903 is resolved |
|
This pull request does not have a backport label. Could you fix it @khushijain21? 🙏
|
|
💛 Build succeeded, but was flaky
Failed CI Steps |
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
…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




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