commit | f656f466c9bd94acf82705be7ee255f5d988a1a2 | [log] [tgz] |
---|---|---|
author | Yang Song <songy23@users.noreply.github.com> | Fri Nov 02 18:24:35 2018 |
committer | GitHub <noreply@github.com> | Fri Nov 02 18:24:35 2018 |
tree | 425b1dd9e8f110a4bc79b8b8332eb3dd96aa34c3 | |
parent | fc93f641b09cb3f7fc15fd17e420ad65d99fc4fc [diff] |
Add resource and metrics_service proto to mkgogen. Re-generate gen-go files. (#147) * Add resource and metrics_service proto to mkgogen. * Update gen-go files.
Census provides a framework to define and collect stats against metrics and to break those stats down across user-defined dimensions.
The Census framework is natively available in many languages (e.g. C++, Go, and Java). The API interface types are defined using protos to ensure consistency and interoperability for the different implementations.
$ go get -u github.com/census-instrumentation/opencensus-proto
In most cases you should depend on the gen-go files directly. If you are building with Bazel, there are also go_proto_library build rules available. See PR/132 for details. However, please note that Bazel doesn't generate the final artifacts.
For Maven add to pom.xml
:
<dependency> <groupId>io.opencensus</groupId> <artifactId>opencensus-proto</artifactId> <version>0.0.2</version> </dependency>
For Gradle add to dependencies:
compile 'io.opencensus:opencensus-proto:0.0.2'
In WORKSPACE, add:
git_repository( name = "io_opencensus_proto", strip_prefix = "src", tag = "v0.0.2", # CURRENT_OPENCENSUS_PROTO_VERSION remote = "https://github.com/census-instrumentation/opencensus-proto", )
or
http_archive( name = "io_opencensus_proto", strip_prefix = "opencensus-proto-master/src", urls = ["https://github.com/census-instrumentation/opencensus-proto/archive/master.zip"], )
In BUILD.bazel:
proto_library( name = "foo_proto", srcs = ["foo.proto"], deps = [ "@io_opencensus_proto//opencensus/proto/metrics/v1:metrics_proto", "@io_opencensus_proto//opencensus/proto/trace/v1:trace_proto", # etc. ], )