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 15syntax = "proto3"; 16 17package opencensus.proto.agent.metrics.v1; 18 19import "opencensus/proto/agent/common/v1/common.proto"; 20import "opencensus/proto/metrics/v1/metrics.proto"; 21import "opencensus/proto/resource/v1/resource.proto"; 22 23option java_multiple_files = true; 24option java_package = "io.opencensus.proto.agent.metrics.v1"; 25option java_outer_classname = "MetricsServiceProto"; 26 27option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1"; 28 29option ruby_package = "OpenCensus.Proto.Agent.Metrics.V1"; 30 31// Service that can be used to push metrics between one Application 32// instrumented with OpenCensus and an agent, or between an agent and a 33// central collector. 34service MetricsService { 35 // For performance reasons, it is recommended to keep this RPC 36 // alive for the entire life of the application. 37 rpc Export(stream ExportMetricsServiceRequest) returns (stream ExportMetricsServiceResponse) {} 38} 39 40message ExportMetricsServiceRequest { 41 // This is required only in the first message on the stream or if the 42 // previous sent ExportMetricsServiceRequest message has a different Node (e.g. 43 // when the same RPC is used to send Metrics from multiple Applications). 44 opencensus.proto.agent.common.v1.Node node = 1; 45 46 // A list of metrics that belong to the last received Node. 47 repeated opencensus.proto.metrics.v1.Metric metrics = 2; 48 49 // The resource for the metrics in this message that do not have an explicit 50 // resource set. 51 // If unset, the most recently set resource in the RPC stream applies. It is 52 // valid to never be set within a stream, e.g. when no resource info is known 53 // at all or when all sent metrics have an explicit resource set. 54 opencensus.proto.resource.v1.Resource resource = 3; 55} 56 57message ExportMetricsServiceResponse { 58} 59