Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 00edb4d

Browse files
authored
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.
1 parent ab82e5f commit 00edb4d

2 files changed

Lines changed: 82 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2018, OpenCensus Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
package(default_visibility = ["//visibility:public"])
16+
17+
proto_library(
18+
name = "exporter_proto",
19+
srcs = ["exporter.proto"],
20+
deps = [
21+
"//opencensus/proto/trace:trace_proto",
22+
"//opencensus/proto/stats/metrics:metrics_proto"
23+
],
24+
)
25+
26+
cc_proto_library(
27+
name = "exporter_proto_cc",
28+
deps = [":exporter_proto"],
29+
)
30+
31+
java_proto_library(
32+
name = "exporter_proto_java",
33+
deps = [":exporter_proto"],
34+
)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright 2018, OpenCensus Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
// NOTE: This proto is experimental and is subject to change at this point.
18+
// Please do not use it at the moment.
19+
20+
package opencensus.proto.exporter;
21+
22+
import "opencensus/proto/trace/trace.proto";
23+
import "opencensus/proto/stats/metrics/metrics.proto";
24+
25+
option java_multiple_files = true;
26+
option java_package = "io.opencensus.proto.exporter";
27+
option java_outer_classname = "ExporterProto";
28+
29+
option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/exporterproto";
30+
31+
message ExportSpanRequest {
32+
repeated opencensus.proto.trace.Span spans = 1;
33+
}
34+
35+
message ExportSpanResponse {
36+
}
37+
38+
message ExportMetricsRequest {
39+
repeated opencensus.proto.stats.metrics.Metric metrics = 1;
40+
}
41+
42+
message ExportMetricsResponse {
43+
}
44+
45+
service Export {
46+
rpc ExportSpan (stream ExportSpanRequest) returns (stream ExportSpanResponse) {}
47+
rpc ExportMetrics (stream ExportMetricsRequest) returns (stream ExportMetricsResponse) {}
48+
}

0 commit comments

Comments
 (0)