Skip to content
This repository was archived by the owner on Apr 8, 2021. It is now read-only.

Conversation

@aninhumer
Copy link

@aninhumer aninhumer commented Jan 30, 2018

@aninhumer aninhumer changed the base branch from master to feature/initial-release January 30, 2018 11:27
// $COVERAGE-OFF$ disabled until this is implemented
import scala.util.control.NonFatal

class ElasticSearchLogSource(id: String, logStreamName: String)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, maybe id and logStreamName should be treated as the same thing?

I'd also suggest that we might want to pass in a query parameter here as well? I'm thinking it might be a good idea to filter out noise prior to use parsing log lines.

val awsLogClient = AWSLogsAsyncClientBuilder.defaultClient()
val logStream = new GetLogEventsRequest()
.withLogStreamName(logStreamName)
.withStartFromHead(false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe where we start from can be defined via our initial stream query?


object DockerLogSource {

final case class ProcessTerminated(exitCode: Int)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in core module rather than in the instrumentation/docker module?

*
* @tparam A type of the unmarshalled logging instance
*/
trait SubscriberPollingLoggingSource[A] extends LoggingSource[A] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps SubscriberLoggingSource would be sufficient here?

// $COVERAGE-ON$
Observable
.fromFuture(
Future(awsLogClient.getLogEventsAsync(logStream).get())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugly, but what sadly is necessary with Java futures!

@aninhumer aninhumer force-pushed the feature/ISC-379-elastic-log-source branch from c50398e to eb52139 Compare February 7, 2018 14:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants