Skip to content

Commit

Permalink
Implement Result Code as required by OTLP
Browse files Browse the repository at this point in the history
This change implements OTLP requirement of Result Code. OTLP describes
how it is used in the export responses:
https://github.com/open-telemetry/oteps/blob/master/text/0035-opentelemetry-protocol.md#result-code
  • Loading branch information
Tigran Najaryan committed Nov 11, 2019
1 parent 5578102 commit 5b60ff4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions opentelemetry/proto/agent/common/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,20 @@ message ServiceInfo {

// TODO(songya): add more fields as needed.
}

// ExportResultCode is the result code returned in the export responses.
enum ExportResultCode {
// Telemetry data is successfully processed by the server.
Success = 0;

// processing of telemetry data failed. The client MUST NOT retry
// sending the same telemetry data. The telemetry data MUST be dropped.
// This for example can happen when the request contains bad data and
// cannot be deserialized or otherwise processed by the server.
FailedNoneRetryable = 1;

// Processing of telemetry data failed. The client SHOULD record the
// error and MAY retry exporting the same data after some time. This
// for example can happen when the server is overloaded.
FailedRetryable = 2;
}
2 changes: 2 additions & 0 deletions opentelemetry/proto/agent/metrics/v1/metrics_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ message ExportMetricsServiceRequest {
}

message ExportMetricsServiceResponse {
// result_code indicates the result of processing the export request.
opentelemetry.proto.agent.common.v1.ExportResultCode result_code = 2;
}
2 changes: 2 additions & 0 deletions opentelemetry/proto/agent/trace/v1/trace_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@ message ExportTraceServiceRequest {
}

message ExportTraceServiceResponse {
// result_code indicates the result of processing the export request.
opentelemetry.proto.agent.common.v1.ExportResultCode result_code = 2;
}

0 comments on commit 5b60ff4

Please sign in to comment.