Is your feature request related to a problem? Please describe.
Many places its not possible to write directly to elastic for security reasons, so it would be nice if it would be possible to get the exporter to simply write a json file instead of trying to push documents directory to the elastic service.
Describe the solution you'd like
Allow ElasticsearchBenchmarkExporterOptions overload that will make the ElasticsearchBenchmarkExporter write to a configured directory instead of writing directly to elastic.
Alternatively move/expose the methods that converts the Summary into elastic objects so people can call that directly and write the objects to a json file.
Describe alternatives you've considered
Use reflection to to access the private method: private List<BenchmarkDocument> CreateBenchmarkDocuments(Summary summary) and simply use a json writer to write the BenchmarkDocument objects to a file.
Hack in a proxy of some sort that takes the data that the exporter posts and write it to a file.
None of the approaches are good - the reflection approach is the least hacky.
I am willing to make a PR for either solution, if you will allow me
ECS integration/library project(s): Elastic.CommonSchema.BenchmarkDotNetExporter
Is your feature request related to a problem? Please describe. Many places its not possible to write directly to elastic for security reasons, so it would be nice if it would be possible to get the exporter to simply write a json file instead of trying to push documents directory to the elastic service.
Describe the solution you'd like
Describe alternatives you've considered
Use reflection to to access the private method:
private List<BenchmarkDocument> CreateBenchmarkDocuments(Summary summary)
and simply use a json writer to write the BenchmarkDocument objects to a file.Hack in a proxy of some sort that takes the data that the exporter posts and write it to a file.
None of the approaches are good - the reflection approach is the least hacky.
I am willing to make a PR for either solution, if you will allow me