diff --git a/sdk/include/opentelemetry/sdk/metrics/exporter.h b/sdk/include/opentelemetry/sdk/metrics/exporter.h index d1708e56c1..5a66f11815 100644 --- a/sdk/include/opentelemetry/sdk/metrics/exporter.h +++ b/sdk/include/opentelemetry/sdk/metrics/exporter.h @@ -1,3 +1,19 @@ +/* + * Copyright The 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. + */ + #pragma once #include @@ -22,7 +38,17 @@ enum class ExportResult * Exporting failed. The caller must not retry exporting the same batch; the * batch must be dropped. */ - kFailure + kFailure = 1, + + /** + * The collection does not have enough space to receive the export batch. + */ + kFailureFull = 2, + + /** + * The export() function was passed an invalid argument. + */ + kFailureInvalidArgument = 3, }; /** * MetricsExporter defines the interface that protocol-specific span exporters must @@ -39,12 +65,6 @@ class MetricsExporter * @param records a vector of unique pointers to metric records */ virtual ExportResult Export(const std::vector &records) noexcept = 0; - - /** - * In the Metrics specification, there is no Shutdown function required for exporters - * The Shutdown function can be implemented within exporters that wish to have one, - * but will not be enforced through this header - */ }; } // namespace metrics } // namespace sdk