Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to indicate partial success in an OTLP export response [2] #414

Merged
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Full list of differences found in [this compare](https://github.com/open-telemet
### Added

* Introduce Scope Attributes. [#395](https://github.com/open-telemetry/opentelemetry-proto/pull/395)
* Introduce partial success fields in `Export<signal>ServiceResponse`.
[#414](https://github.com/open-telemetry/opentelemetry-proto/pull/414)

### Removed

Expand Down
31 changes: 31 additions & 0 deletions opentelemetry/proto/collector/logs/v1/logs_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,35 @@ message ExportLogsServiceRequest {
}

message ExportLogsServiceResponse {
// 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_log_records` with the number of log records it rejected.
//
// The server MUST NOT set the `partial_success` field when the
// request was accepted in its entirety.
ExportLogsPartialSuccess partial_success = 1;
jmacd marked this conversation as resolved.
Show resolved Hide resolved
}

message ExportLogsPartialSuccess {
// The number of rejected log records.
//
// If the request is only partially accepted, the server MUST set
joaopgrassi marked this conversation as resolved.
Show resolved Hide resolved
// the `rejected_log_records` field.
//
// Given the server should only initialize the `partial_success` field
jmacd marked this conversation as resolved.
Show resolved Hide resolved
// when it rejects parts of the data, a `rejected_log_records` with
// value = '0' is considered an invalid result. Senders should
// interpret such responses from a server as if all log records were accepted.
int64 rejected_log_records = 1;

// A developer-facing human-readable error message in English. It should
// explain why the server rejected parts of the data,
// and might offer guidance on how users can address the issues.
//
// error_message is an optional field. An error_message with an empty value
// is equivalent of it not being set.
string error_message = 2;
}
31 changes: 31 additions & 0 deletions opentelemetry/proto/collector/metrics/v1/metrics_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,35 @@ message ExportMetricsServiceRequest {
}

message ExportMetricsServiceResponse {
// 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_data_points` with the number of data points it rejected.
//
// The server MUST NOT set the `partial_success` field when the
// request was accepted in its entirety.
ExportMetricsPartialSuccess partial_success = 1;
}

message ExportMetricsPartialSuccess {
// The number of rejected data points.
//
// If the request is only partially accepted, the server MUST set
// the `rejected_data_points` field.
//
// Given the server should only initialize the `partial_success` field
// when it rejects parts of the data, a `rejected_data_points` with
// value = '0' is considered an invalid result. Senders should
// interpret such responses from a server as if all data points were accepted.
int64 rejected_data_points = 1;

// A developer-facing human-readable error message in English. It should
// explain why the server rejected parts of the data,
// and might offer guidance on how users can address the issues.
//
// error_message is an optional field. An error_message with an empty value
// is equivalent of it not being set.
string error_message = 2;
}
31 changes: 31 additions & 0 deletions opentelemetry/proto/collector/trace/v1/trace_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,35 @@ message ExportTraceServiceRequest {
}

message ExportTraceServiceResponse {
// 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_spans` with the number of spans it rejected.
//
// The server MUST NOT set the `partial_success` field when the
// request was accepted in its entirety.
ExportTracePartialSuccess partial_success = 1;
}

message ExportTracePartialSuccess {
// The number of rejected spans.
//
// If the request is only partially accepted, the server MUST set
// the `rejected_spans` field.
//
// Given the server should only initialize the `partial_success` field
// when it rejects parts of the data, a `rejected_spans` with
// value = '0' is considered an invalid result. Senders should
// interpret such responses from a server as if all spans were accepted.
int64 rejected_spans = 1;

// A developer-facing human-readable error message in English. It should
// explain why the server rejected parts of the data,
// and might offer guidance on how users can address the issues.
//
// error_message is an optional field. An error_message with an empty value
// is equivalent of it not being set.
string error_message = 2;
}