-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a follow up to [OTEP 239: Introduces Profiling Data Model v2](open-telemetry/oteps#239) The main motivation behind this PR is that this will allow us to start experimenting with the profiles proto in opentelemetry-collector. I marked the profiles part as `Experimental` to indicate that this is not a final version of the data model. I copied the proto from the OTEP, and moved `pprofextended.proto` from `profiles/v1/alternatives/pprofextended.proto` to just `profiles/v1/pprofextended.proto`. I did this because I figured we no longer have alternative representations and this will reduce confusion for people outside of Profiling SIG. The rest of the proto stayed the same. I tested this file with a collector fork and I it compiles properly.
- Loading branch information
1 parent
342e1d4
commit 4b60b81
Showing
5 changed files
with
665 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Copyright 2023, OpenTelemetry 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"; | ||
|
||
package opentelemetry.proto.collector.profiles.v1experimental; | ||
|
||
import "opentelemetry/proto/profiles/v1experimental/profiles.proto"; | ||
|
||
option csharp_namespace = "OpenTelemetry.Proto.Collector.Profiles.V1Experimental"; | ||
option java_multiple_files = true; | ||
option java_package = "io.opentelemetry.proto.collector.profiles.v1experimental"; | ||
option java_outer_classname = "ProfilesServiceProto"; | ||
option go_package = "go.opentelemetry.io/proto/otlp/collector/profiles/v1experimental"; | ||
|
||
// Service that can be used to push profiles between one Application instrumented with | ||
// OpenTelemetry and a collector, or between a collector and a central collector. | ||
service ProfilesService { | ||
// For performance reasons, it is recommended to keep this RPC | ||
// alive for the entire life of the application. | ||
rpc Export(ExportProfilesServiceRequest) returns (ExportProfilesServiceResponse) {} | ||
} | ||
|
||
message ExportProfilesServiceRequest { | ||
// An array of ResourceProfiles. | ||
// For data coming from a single resource this array will typically contain one | ||
// element. Intermediary nodes (such as OpenTelemetry Collector) that receive | ||
// data from multiple origins typically batch the data before forwarding further and | ||
// in that case this array will contain multiple elements. | ||
repeated opentelemetry.proto.profiles.v1experimental.ResourceProfiles resource_profiles = 1; | ||
} | ||
|
||
message ExportProfilesServiceResponse { | ||
// The details of a partially successful export request. | ||
// | ||
// If the request is only partially accepted | ||
// (i.e. when the server accepts only parts of the data and rejects the rest) | ||
// the server MUST initialize the `partial_success` field and MUST | ||
// set the `rejected_<signal>` with the number of items it rejected. | ||
// | ||
// Servers MAY also make use of the `partial_success` field to convey | ||
// warnings/suggestions to senders even when the request was fully accepted. | ||
// In such cases, the `rejected_<signal>` MUST have a value of `0` and | ||
// the `error_message` MUST be non-empty. | ||
// | ||
// A `partial_success` message with an empty value (rejected_<signal> = 0 and | ||
// `error_message` = "") is equivalent to it not being set/present. Senders | ||
// SHOULD interpret it the same way as in the full success case. | ||
ExportProfilesPartialSuccess partial_success = 1; | ||
} | ||
|
||
message ExportProfilesPartialSuccess { | ||
// The number of rejected profiles. | ||
// | ||
// A `rejected_<signal>` field holding a `0` value indicates that the | ||
// request was fully accepted. | ||
int64 rejected_profiles = 1; | ||
|
||
// A developer-facing human-readable message in English. It should be used | ||
// either to explain why the server rejected parts of the data during a partial | ||
// success or to convey warnings/suggestions during a full success. The message | ||
// should offer guidance on how users can address such issues. | ||
// | ||
// error_message is an optional field. An error_message with an empty value | ||
// is equivalent to it not being set. | ||
string error_message = 2; | ||
} |
9 changes: 9 additions & 0 deletions
9
opentelemetry/proto/collector/profiles/v1experimental/profiles_service_http.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This is an API configuration to generate an HTTP/JSON -> gRPC gateway for the | ||
# OpenTelemetry service using github.com/grpc-ecosystem/grpc-gateway. | ||
type: google.api.Service | ||
config_version: 3 | ||
http: | ||
rules: | ||
- selector: opentelemetry.proto.collector.profiles.v1.ProfilesService.Export | ||
post: /v1experimental/profiles | ||
body: "*" |
Oops, something went wrong.