Add export service proto (#60)
We are experimentally working on a an export service that will allow OpenCensus libraries to report collected data to an external service for processing and exporting. Some frameworks and ecosystems are now providing out-of-the-box instrumentation by using OpenCensus but the user is still expected to register an exporter in order to export data. This is a problem during an incident. Even though our users can benefit from having more diagnostics data coming out of services already instrumented with OpenCensus, they have to modify their code to register an exporter and redeploy. Asking our users recompile and redeploy is not an ideal at an incident time. This experiment might be a possible solution to eliminate this requirement. Updates opencensus-specs/#72.pull/64/head
parent
ab82e5fdec
commit
00edb4d4c5
2 changed files with 82 additions and 0 deletions
@ -0,0 +1,34 @@ |
||||
# Copyright 2018, OpenCensus Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
package(default_visibility = ["//visibility:public"]) |
||||
|
||||
proto_library( |
||||
name = "exporter_proto", |
||||
srcs = ["exporter.proto"], |
||||
deps = [ |
||||
"//opencensus/proto/trace:trace_proto", |
||||
"//opencensus/proto/stats/metrics:metrics_proto" |
||||
], |
||||
) |
||||
|
||||
cc_proto_library( |
||||
name = "exporter_proto_cc", |
||||
deps = [":exporter_proto"], |
||||
) |
||||
|
||||
java_proto_library( |
||||
name = "exporter_proto_java", |
||||
deps = [":exporter_proto"], |
||||
) |
@ -0,0 +1,48 @@ |
||||
// Copyright 2018, OpenCensus Authors |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
syntax = "proto3"; |
||||
|
||||
// NOTE: This proto is experimental and is subject to change at this point. |
||||
// Please do not use it at the moment. |
||||
|
||||
package opencensus.proto.exporter; |
||||
|
||||
import "opencensus/proto/trace/trace.proto"; |
||||
import "opencensus/proto/stats/metrics/metrics.proto"; |
||||
|
||||
option java_multiple_files = true; |
||||
option java_package = "io.opencensus.proto.exporter"; |
||||
option java_outer_classname = "ExporterProto"; |
||||
|
||||
option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/exporterproto"; |
||||
|
||||
message ExportSpanRequest { |
||||
repeated opencensus.proto.trace.Span spans = 1; |
||||
} |
||||
|
||||
message ExportSpanResponse { |
||||
} |
||||
|
||||
message ExportMetricsRequest { |
||||
repeated opencensus.proto.stats.metrics.Metric metrics = 1; |
||||
} |
||||
|
||||
message ExportMetricsResponse { |
||||
} |
||||
|
||||
service Export { |
||||
rpc ExportSpan (stream ExportSpanRequest) returns (stream ExportSpanResponse) {} |
||||
rpc ExportMetrics (stream ExportMetricsRequest) returns (stream ExportMetricsResponse) {} |
||||
} |
Loading…
Reference in new issue