diff --git a/opentelemetry/proto/agent/common/v1/common.proto b/opentelemetry/proto/agent/common/v1/common.proto index f5efff63e..500fe1491 100644 --- a/opentelemetry/proto/agent/common/v1/common.proto +++ b/opentelemetry/proto/agent/common/v1/common.proto @@ -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; +} diff --git a/opentelemetry/proto/agent/metrics/v1/metrics_service.proto b/opentelemetry/proto/agent/metrics/v1/metrics_service.proto index 89229e532..a8568ef9e 100644 --- a/opentelemetry/proto/agent/metrics/v1/metrics_service.proto +++ b/opentelemetry/proto/agent/metrics/v1/metrics_service.proto @@ -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; } diff --git a/opentelemetry/proto/agent/trace/v1/trace_service.proto b/opentelemetry/proto/agent/trace/v1/trace_service.proto index cf4df0d6e..1666aed5f 100644 --- a/opentelemetry/proto/agent/trace/v1/trace_service.proto +++ b/opentelemetry/proto/agent/trace/v1/trace_service.proto @@ -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; }