1 load("//:opencensus_workspace.bzl", "opencensus_java_libraries") 2 load("@grpc_java//:java_grpc_library.bzl", "java_grpc_library") 3 4 opencensus_java_libraries() 5 6 proto_library( 7 name = "helloworld_proto", 8 srcs = ["src/main/proto/helloworld.proto"], 9 ) 10 11 java_proto_library( 12 name = "helloworld_java_proto", 13 deps = [":helloworld_proto"], 14 ) 15 16 java_grpc_library( 17 name = "helloworld_java_grpc", 18 srcs = [":helloworld_proto"], 19 deps = [":helloworld_java_proto"], 20 ) 21 22 java_library( 23 name = "opencensus_examples", 24 srcs = glob( 25 ["src/main/java/**/*.java"], 26 ), 27 deps = [ 28 ":helloworld_java_grpc", 29 ":helloworld_java_proto", 30 "@com_google_guava_guava//jar", 31 "@com_google_code_findbugs_jsr305//jar", 32 "@io_opencensus_opencensus_api//jar", 33 "@io_opencensus_opencensus_contrib_grpc_metrics//jar", 34 "@io_opencensus_opencensus_contrib_zpages//jar", 35 "@io_opencensus_opencensus_exporter_stats_prometheus//jar", 36 "@io_opencensus_opencensus_exporter_stats_stackdriver//jar", 37 "@io_opencensus_opencensus_exporter_trace_logging//jar", 38 "@io_opencensus_opencensus_exporter_trace_stackdriver//jar", 39 "@io_grpc_grpc_core//jar", 40 "@io_grpc_grpc_netty//jar", 41 "@io_grpc_grpc_protobuf//jar", 42 "@io_grpc_grpc_stub//jar", 43 "@io_prometheus_simpleclient//jar", 44 "@io_prometheus_simpleclient_httpserver//jar", 45 ], 46 runtime_deps = [ 47 "@com_google_api_api_common//jar", 48 "@com_google_api_gax//jar", 49 "@com_google_api_gax_grpc//jar", 50 "@com_google_api_grpc_proto_google_cloud_trace_v1//jar", 51 "@com_google_api_grpc_proto_google_cloud_trace_v2//jar", 52 "@com_google_api_grpc_proto_google_iam_v1//jar", 53 "@com_google_api_grpc_proto_google_cloud_monitoring_v3//jar", 54 "@com_google_api_grpc_proto_google_common_protos//jar", 55 "@com_google_auth_google_auth_library_credentials//jar", 56 "@com_google_auth_google_auth_library_oauth2_http//jar", 57 "@com_google_cloud_google_cloud_core//jar", 58 "@com_google_cloud_google_cloud_core_grpc//jar", 59 "@com_google_cloud_google_cloud_monitoring//jar", 60 "@com_google_cloud_google_cloud_trace//jar", 61 "@com_google_http_client_google_http_client//jar", 62 "@com_google_http_client_google_http_client_jackson2//jar", 63 "@com_google_instrumentation_instrumentation_api//jar", 64 "@com_google_protobuf_protobuf_java//jar", 65 "@com_google_protobuf_protobuf_java_util//jar", 66 "@commons_codec_commons_codec//jar", 67 "@commons_logging_commons_logging//jar", 68 69 "@com_lmax_disruptor//jar", 70 "@io_grpc_grpc_context//jar", 71 "@io_grpc_grpc_auth//jar", 72 "@io_grpc_grpc_protobuf_lite//jar", 73 "@io_netty_netty_buffer//jar", 74 "@io_netty_netty_common//jar", 75 "@io_netty_netty_codec//jar", 76 "@io_netty_netty_codec_socks//jar", 77 "@io_netty_netty_codec_http//jar", 78 "@io_netty_netty_codec_http2//jar", 79 "@io_netty_netty_handler//jar", 80 "@io_netty_netty_handler_proxy//jar", 81 "@io_netty_netty_resolver//jar", 82 "@io_netty_netty_tcnative_boringssl_static//jar", 83 "@io_netty_netty_transport//jar", 84 "@io_opencensus_opencensus_impl//jar", 85 "@io_opencensus_opencensus_impl_core//jar", 86 "@joda_time_joda_time//jar", 87 "@org_apache_httpcomponents_httpclient//jar", 88 "@org_apache_httpcomponents_httpcore//jar", 89 "@org_threeten_threetenbp//jar", 90 ], 91 ) 92 93 java_binary( 94 name = "TagContextExample", 95 main_class = "io.opencensus.examples.tags.TagContextExample", 96 runtime_deps = [ 97 ":opencensus_examples", 98 ], 99 ) 100 101 java_binary( 102 name = "MultiSpansTracing", 103 main_class = "io.opencensus.examples.trace.MultiSpansTracing", 104 runtime_deps = [ 105 ":opencensus_examples", 106 ], 107 ) 108 109 java_binary( 110 name = "MultiSpansScopedTracing", 111 main_class = "io.opencensus.examples.trace.MultiSpansScopedTracing", 112 runtime_deps = [ 113 ":opencensus_examples", 114 ], 115 ) 116 117 java_binary( 118 name = "MultiSpansContextTracing", 119 main_class = "io.opencensus.examples.trace.MultiSpansContextTracing", 120 runtime_deps = [ 121 ":opencensus_examples", 122 ], 123 ) 124 125 java_binary( 126 name = "ZPagesTester", 127 main_class = "io.opencensus.examples.zpages.ZPagesTester", 128 runtime_deps = [ 129 ":opencensus_examples", 130 ], 131 ) 132 133 java_binary( 134 name = "QuickStart", 135 main_class = "io.opencensus.examples.helloworld.QuickStart", 136 runtime_deps = [ 137 ":opencensus_examples", 138 ], 139 ) 140 141 java_binary( 142 name = "HelloWorldClient", 143 main_class = "io.opencensus.examples.grpc.helloworld.HelloWorldClient", 144 runtime_deps = [ 145 ":opencensus_examples", 146 ], 147 ) 148 149 java_binary( 150 name = "HelloWorldServer", 151 main_class = "io.opencensus.examples.grpc.helloworld.HelloWorldServer", 152 runtime_deps = [ 153 ":opencensus_examples", 154 ], 155 ) 156