Skip to content

Commit

Permalink
Build the tracing library using bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Nov 17, 2018
1 parent 4acc09c commit 476b059
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 3 deletions.
17 changes: 17 additions & 0 deletions java/client/src/org/openqa/selenium/remote/tracing/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

java_library(
name = "tracing",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium/remote",
"//third_party/java/guava",
"//third_party/java/contrib:opentracing-tracerresolver",
"//third_party/java/opencensus:opencensus-api",
"//third_party/java/opentracing:opentracing-api",
"//third_party/java/opentracing:opentracing-noop",
"//third_party/java/opentracing:opentracing-util",
],
visibility = [

],
)
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ class OpenCensusSpan extends Span {

@Override
public Span activate() {
tracer.withSpan(span);
distributedTracer.setActiveSpan(this);
return this;
// TODO: Figure out the right way to do this.
throw new UnsupportedOperationException("activate");
}

@Override
Expand Down
18 changes: 18 additions & 0 deletions third_party/java/contrib/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
java_import(
name = "opentracing-tracerresolver",
tags = [
"maven_coordinates=io.opentracing.contrib:opentracing-tracerresolver:jar:0.1.5",
],
licenses = [
"notice", # Apache 2
],
jars = ["opentracing-tracerresolver-0.1.5.jar"],
srcjar = "opentracing-tracerresolver-0.1.5-sources.jar",
deps = [
"//third_party/java/opentracing:opentracing-api",
"//third_party/java/opentracing:opentracing-util",
],
visibility = [
"//java/client/src/org/openqa/selenium/remote/tracing:__pkg__",
],
)
12 changes: 12 additions & 0 deletions third_party/java/grpc/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
java_import(
name = "grpc-context",
tags = ["maven_coordinates=io.grpc:grpc-context:jar:1.14.0"],
licenses = [
"notice", # Apache 2
],
jars = ["grpc-context-1.14.0.jar"],
srcjar = "grpc-context-1.14.0-sources.jar",
visibility = [
"//third_party/java/opencensus:__pkg__",
],
)
17 changes: 17 additions & 0 deletions third_party/java/opencensus/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
java_import(
name = "opencensus-api",
tags = [
"maven_coordinates=io.opencensus:opencensus-api:jar:0.16.1",
],
licenses = [
"notice", # Apache 2
],
jars = ["opencensus-api-0.16.1.jar"],
srcjar = "opencensus-api-0.16.1-sources.jar",
deps = [
"//third_party/java/grpc:grpc-context",
],
visibility = [
"//java/client/src/org/openqa/selenium/remote/tracing:__pkg__",
],
)
55 changes: 55 additions & 0 deletions third_party/java/opentracing/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
java_import(
name = "opentracing-api",
tags = [
"maven_coordinates=io.opentracing:opentracing-api:jar:0.31.0",
],
licenses = [
"notice", # Apache 2
],
jars = ["opentracing-api-0.31.0.jar"],
srcjar = "opentracing-api-0.31.0-sources.jar",
visibility = [
"//third_party/java/contrib:__pkg__",
"//java/client/src/org/openqa/selenium/remote/tracing:__pkg__",
],
)

java_import(
name = "opentracing-noop",
tags = [
"maven_coordinates=io.opentracing:opentracing-noop:jar:0.31.0",
],
licenses = [
"notice", # Apache 2
],
jars = ["opentracing-noop-0.31.0.jar"],
srcjar = "opentracing-noop-0.31.0-sources.jar",
deps = [
":opentracing-api",
],
visibility = [
"//java/client/src/org/openqa/selenium/remote/tracing:__pkg__",
"//third_party/java/contrib:__pkg__",
],
)

java_import(
name = "opentracing-util",
tags = [
"maven_coordinates=io.opentracing:opentracing-util:jar:0.31.0",
],
licenses = [
"notice", # Apache 2
],
jars = ["opentracing-util-0.31.0.jar"],
srcjar = "opentracing-util-0.31.0-sources.jar",
deps = [
":opentracing-api",
":opentracing-noop",
],
visibility = [
"//java/client/src/org/openqa/selenium/remote/tracing:__pkg__",
"//java/client/test/org/openqa/selenium/remote/tracing/simple:__pkg__",
"//third_party/java/contrib:__pkg__",
],
)

0 comments on commit 476b059

Please sign in to comment.