aboutsummaryrefslogtreecommitdiff
path: root/checker-framework
diff options
context:
space:
mode:
authorDino Oliva <dinooliva@users.noreply.github.com>2018-09-05 12:09:44 -0700
committerGitHub <noreply@github.com>2018-09-05 12:09:44 -0700
commit30c10cc77cd3a6d9583c2339ade689d06585aba4 (patch)
tree147471d49a23a7fbefc65330b8c2026dc287d853 /checker-framework
parent0ecdfd01dbe325690c60b124709cba4b04167172 (diff)
downloadopencensus-java-30c10cc77cd3a6d9583c2339ade689d06585aba4.tar.gz
Spring sleuth (#1378)
* Initial import of OpenCensus/Sleuth integration. * Minor fixes for integration with master. * Adds a README. * Removes hardcoded dependencies in build file. * Adds contrib to spring_sleuth file path. * Updates package names appropriately based on file renames. * Fixes build paths. * Fixes for build checks. * Mark as experimental. * Minor fixes for build files (space vs tab). * Minor fixes for build files (space vs tab). * Update README to absolve Spring Sleuth team of any responsibility for this spring_sleuth plugin. * Minor fixes for import control (space vs tab). * Tag public classes @since 0.16 * Adds javadoc for public methods not already documented. * Updates OpenCensusSleuthTracer to pass nullness checks. * Fixes for formatting issues. * Fixes for typos. * Suppresses the check return value warning added by gRPC. * Suppresses the check return value warning added by gRPC.
Diffstat (limited to 'checker-framework')
-rw-r--r--checker-framework/stubs/org-springframework-cloud-sleuth.astub19
-rw-r--r--checker-framework/stubs/org-springframework-cloud-sleuth.log.astub9
2 files changed, 28 insertions, 0 deletions
diff --git a/checker-framework/stubs/org-springframework-cloud-sleuth.astub b/checker-framework/stubs/org-springframework-cloud-sleuth.astub
new file mode 100644
index 00000000..61d2fa11
--- /dev/null
+++ b/checker-framework/stubs/org-springframework-cloud-sleuth.astub
@@ -0,0 +1,19 @@
+package org.springframework.cloud.sleuth;
+
+import org.checkerframework.checker.nullness.qual.Nullable;
+import org.springframework.cloud.sleuth.Sampler;
+import org.springframework.cloud.sleuth.Span;
+
+interface Tracer {
+ @Nullable Span close(@Nullable Span span);
+ @Nullable Span continueSpan(@Nullable Span span);
+ @Nullable Span createSpan(String name);
+ @Nullable Span createSpan(String name, @Nullable Sampler sampler);
+ @Nullable Span createSpan(String name, @Nullable Span parent);
+ @Nullable Span detach(@Nullable Span span);
+ @Nullable Span getCurrentSpan();
+}
+
+class Span {
+ Span (Span span, @Nullable Span parent);
+}
diff --git a/checker-framework/stubs/org-springframework-cloud-sleuth.log.astub b/checker-framework/stubs/org-springframework-cloud-sleuth.log.astub
new file mode 100644
index 00000000..9497f6f2
--- /dev/null
+++ b/checker-framework/stubs/org-springframework-cloud-sleuth.log.astub
@@ -0,0 +1,9 @@
+package org.springframework.cloud.sleuth.log;
+
+import org.checkerframework.checker.nullness.qual.Nullable;
+import org.springframework.cloud.sleuth.Span;
+
+interface SpanLogger {
+ void logStartedSpan(@Nullable Span parent, Span span);
+ void logStoppedSpan(@Nullable Span parent, Span span);
+}