The current endpoint requires the json payload conform to a LogEvent type. This LogEvent type has data needed for log4j or Python logging, but isn't flexible if we want to insert arbitrary data, like Metrics, into Pulse.
- Create a new endpoint in LogCollectorRoutes with the path `v1/json/
- Parse the json using Spray (this is already a project dependency) into a map[String, String]
- Change all code in
SolrCloudStreams to work with Map[String, String] instead of LogEvent. Figure out: do we still need the LogEvent class? How can we move it up the call stack?
- The new endpoint should dump the
Map[String, String] onto the solr stream.
- At the end of the stream here:
solrService.insertDocuments(latestCollectionAlias, events.map(DocumentConversion.toSolrDocument) we need a function to convert the Map into a SolrDocument
The current endpoint requires the json payload conform to a
LogEventtype. ThisLogEventtype has data needed for log4j or Python logging, but isn't flexible if we want to insert arbitrary data, like Metrics, into Pulse.SolrCloudStreamsto work withMap[String, String]instead ofLogEvent. Figure out: do we still need theLogEventclass? How can we move it up the call stack?Map[String, String]onto the solr stream.solrService.insertDocuments(latestCollectionAlias, events.map(DocumentConversion.toSolrDocument)we need a function to convert the Map into a SolrDocument