diff options
author | John St John <johnthesaintjohn@gmail.com> | 2017-09-26 17:03:32 -0700 |
---|---|---|
committer | John St John <johnthesaintjohn@gmail.com> | 2017-09-26 17:03:32 -0700 |
commit | c1628abaad79de60c7eafb27a5914dabd3fb75dc (patch) | |
tree | e38728e9a5423152b34e464a974c8b161a45334e /src/main/scala/xyz/driver/core/trace/GoogleStackdriverTrace.scala | |
parent | e07838aab7b059a37bfaa8ff23335cc6e1c9867e (diff) | |
download | driver-core-c1628abaad79de60c7eafb27a5914dabd3fb75dc.tar.gz driver-core-c1628abaad79de60c7eafb27a5914dabd3fb75dc.tar.bz2 driver-core-c1628abaad79de60c7eafb27a5914dabd3fb75dc.zip |
only push traces every 10 requests by default
Diffstat (limited to 'src/main/scala/xyz/driver/core/trace/GoogleStackdriverTrace.scala')
-rw-r--r-- | src/main/scala/xyz/driver/core/trace/GoogleStackdriverTrace.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/core/trace/GoogleStackdriverTrace.scala b/src/main/scala/xyz/driver/core/trace/GoogleStackdriverTrace.scala index fa98ef4..04f2ec6 100644 --- a/src/main/scala/xyz/driver/core/trace/GoogleStackdriverTrace.scala +++ b/src/main/scala/xyz/driver/core/trace/GoogleStackdriverTrace.scala @@ -14,7 +14,8 @@ final class GoogleStackdriverTrace(projectId: String, clientSecretsFile: String, appName: String, appEnvironment: String, - log: Logger) + log: Logger, + bufferSize: Int = 10) extends GoogleServiceTracer { // initialize our various tracking storage systems @@ -38,10 +39,12 @@ final class GoogleStackdriverTrace(projectId: String, } private val googleServiceTracer = - new GoogleStackdriverTraceWithConsumer(projectId, appName, appEnvironment, traceConsumer, log) + new GoogleStackdriverTraceWithConsumer(projectId, appName, appEnvironment, traceConsumer, log, bufferSize) override def startSpan(httpRequest: HttpRequest): GoogleStackdriverTraceSpan = googleServiceTracer.startSpan(httpRequest) override def endSpan(span: GoogleStackdriverTraceSpan): Unit = googleServiceTracer.endSpan(span) + + override def flush(): Unit = googleServiceTracer.flush() } |