beats icon indicating copy to clipboard operation
beats copied to clipboard

[9.2](backport #48075) Remove direct access to v2.Context.StatusReporter in Filestream

Open mergify[bot] opened this issue 2 weeks ago • 2 comments

Proposed commit message

v2.Context.StatusReporter can be nil when Filebeat runs standalone. The direct access to this field is replaced in Filestream by the UpdateStatus method. A deprecation notice is added is added to the StatusReporter field.

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] ~~I have made corresponding changes to the documentation~~
  • [ ] ~~I have made corresponding change to the default configuration files~~
  • [ ] ~~I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.~~
  • [ ] ~~I have added an entry in ./changelog/fragments using the changelog tool.~~

~~## Disruptive User Impact~~ ~~## Author's Checklist~~

How to test this PR locally

1. Create a log file

docker run -it --rm mingrammer/flog -n 50 > /tmp/flog.ndjson

2. Run Filebeat with the following configuration

filebeat.yml

filebeat.inputs:
  - type: filestream
    id: filestream-input-id
    paths:
      - /tmp/flog.log
    processors:
      - add_fields:
          INVALID_CONFIG_KEY: true
          fields:
            labels:
              foo: bar

logging:
  to_stderr: true

output.discard:
  enabled: true

It should not panic

~~## Related issues~~ ~~## Use cases~~ ~~## Screenshots~~ ~~## Logs~~


This is an automatic backport of pull request #48075 done by [Mergify](https://mergify.com).

mergify[bot] avatar Dec 12 '25 23:12 mergify[bot]

:robot: GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

github-actions[bot] avatar Dec 12 '25 23:12 github-actions[bot]

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

elasticmachine avatar Dec 12 '25 23:12 elasticmachine

This pull request has not been merged yet. Could you please review and merge it @belimawr? 🙏

mergify[bot] avatar Dec 15 '25 05:12 mergify[bot]