|
| 1 | +// Copyright 2023, OpenTelemetry 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 | +package opentelemetry.proto.collector.profiles.v1experimental; |
| 18 | + |
| 19 | +import "opentelemetry/proto/profiles/v1experimental/profiles.proto"; |
| 20 | + |
| 21 | +option csharp_namespace = "OpenTelemetry.Proto.Collector.Profiles.V1Experimental"; |
| 22 | +option java_multiple_files = true; |
| 23 | +option java_package = "io.opentelemetry.proto.collector.profiles.v1experimental"; |
| 24 | +option java_outer_classname = "ProfilesServiceProto"; |
| 25 | +option go_package = "go.opentelemetry.io/proto/otlp/collector/profiles/v1experimental"; |
| 26 | + |
| 27 | +// Service that can be used to push profiles between one Application instrumented with |
| 28 | +// OpenTelemetry and a collector, or between a collector and a central collector. |
| 29 | +service ProfilesService { |
| 30 | + // For performance reasons, it is recommended to keep this RPC |
| 31 | + // alive for the entire life of the application. |
| 32 | + rpc Export(ExportProfilesServiceRequest) returns (ExportProfilesServiceResponse) {} |
| 33 | +} |
| 34 | + |
| 35 | +message ExportProfilesServiceRequest { |
| 36 | + // An array of ResourceProfiles. |
| 37 | + // For data coming from a single resource this array will typically contain one |
| 38 | + // element. Intermediary nodes (such as OpenTelemetry Collector) that receive |
| 39 | + // data from multiple origins typically batch the data before forwarding further and |
| 40 | + // in that case this array will contain multiple elements. |
| 41 | + repeated opentelemetry.proto.profiles.v1experimental.ResourceProfiles resource_profiles = 1; |
| 42 | +} |
| 43 | + |
| 44 | +message ExportProfilesServiceResponse { |
| 45 | + // The details of a partially successful export request. |
| 46 | + // |
| 47 | + // If the request is only partially accepted |
| 48 | + // (i.e. when the server accepts only parts of the data and rejects the rest) |
| 49 | + // the server MUST initialize the `partial_success` field and MUST |
| 50 | + // set the `rejected_<signal>` with the number of items it rejected. |
| 51 | + // |
| 52 | + // Servers MAY also make use of the `partial_success` field to convey |
| 53 | + // warnings/suggestions to senders even when the request was fully accepted. |
| 54 | + // In such cases, the `rejected_<signal>` MUST have a value of `0` and |
| 55 | + // the `error_message` MUST be non-empty. |
| 56 | + // |
| 57 | + // A `partial_success` message with an empty value (rejected_<signal> = 0 and |
| 58 | + // `error_message` = "") is equivalent to it not being set/present. Senders |
| 59 | + // SHOULD interpret it the same way as in the full success case. |
| 60 | + ExportProfilesPartialSuccess partial_success = 1; |
| 61 | +} |
| 62 | + |
| 63 | +message ExportProfilesPartialSuccess { |
| 64 | + // The number of rejected profiles. |
| 65 | + // |
| 66 | + // A `rejected_<signal>` field holding a `0` value indicates that the |
| 67 | + // request was fully accepted. |
| 68 | + int64 rejected_profiles = 1; |
| 69 | + |
| 70 | + // A developer-facing human-readable message in English. It should be used |
| 71 | + // either to explain why the server rejected parts of the data during a partial |
| 72 | + // success or to convey warnings/suggestions during a full success. The message |
| 73 | + // should offer guidance on how users can address such issues. |
| 74 | + // |
| 75 | + // error_message is an optional field. An error_message with an empty value |
| 76 | + // is equivalent to it not being set. |
| 77 | + string error_message = 2; |
| 78 | +} |
0 commit comments