<commit_before>package uk.ac.wellcome.finatra.modules

import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration
import com.amazonaws.services.cloudwatch.{
  AmazonCloudWatch,
  AmazonCloudWatchClientBuilder
}
import com.google.inject.{Provides, Singleton}
import com.twitter.inject.TwitterModule
import uk.ac.wellcome.metrics.MetricsSender
import uk.ac.wellcome.models.aws.AWSConfig

object AmazonCloudWatchModule extends TwitterModule {
  private val awsNamespace = flag[String]("aws.metrics.namespace",
                                          "",
                                          "Namespace for cloudwatch metrics")
  private val awsEndpoint = flag[String](
    "aws.cloudWatch.endpoint",
    "",
    "Endpoint of AWS CloudWatch. If not set, it will use the region")

  @Provides
  @Singleton
  def providesMetricsSender(amazonCloudWatch: AmazonCloudWatch) =<commit_msg>Adds MetricsSender to SQSWorker to send notice on terminal failure<commit_after>package uk.ac.wellcome.finatra.modules

import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration
import com.amazonaws.services.cloudwatch.{AmazonCloudWatch, AmazonCloudWatchClientBuilder}
import com.google.inject.{Provides, Singleton}
import com.twitter.inject.TwitterModule
import uk.ac.wellcome.metrics.MetricsSender
import uk.ac.wellcome.models.aws.AWSConfig

object AmazonCloudWatchModule extends TwitterModule {
  private val awsNamespace = flag[String]("aws.metrics.namespace",
                                          "",
                                          "Namespace for cloudwatch metrics")
  private val awsEndpoint = flag[String](
    "aws.cloudWatch.endpoint",
    "",
    "Endpoint of AWS CloudWatch. If not set, it will use the region")

  @Provides
  @Singleton
  def providesMetricsSender(amazonCloudWatch: AmazonCloudWatch) =
{'fraction_non_alphanumeric': 0.0822065981611682, 'fraction_numerical': 0.0, 'mean_word_length': 3.5121951219512195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6990868', 'n_tokens_mistral': 470, 'n_tokens_neox': 473, 'n_words': 110}