diff options
author | soniachrn <soniachrn@yandex-team.com> | 2023-07-28 14:39:58 +0300 |
---|---|---|
committer | soniachrn <soniachrn@yandex-team.com> | 2023-07-28 14:39:58 +0300 |
commit | 8f1427a2b0ca7e19329ea7b7d59ea83ee9461464 (patch) | |
tree | 74b082a45d58d22ac15d6422b2ff89a037e16afb | |
parent | f426d70a542364c74202cf846a43991e847c4ab0 (diff) | |
download | ydb-8f1427a2b0ca7e19329ea7b7d59ea83ee9461464.tar.gz |
replace wilson/protos with PEERDIR to contrib/libs/opentelemetry-proto
remove duplicate protos
41 files changed, 2594 insertions, 473 deletions
diff --git a/contrib/libs/CMakeLists.darwin-x86_64.txt b/contrib/libs/CMakeLists.darwin-x86_64.txt index dbdaed7276..faa28913b3 100644 --- a/contrib/libs/CMakeLists.darwin-x86_64.txt +++ b/contrib/libs/CMakeLists.darwin-x86_64.txt @@ -45,6 +45,7 @@ add_subdirectory(lzmasdk) add_subdirectory(miniselect) add_subdirectory(nayuki_md5) add_subdirectory(nghttp2) +add_subdirectory(opentelemetry-proto) add_subdirectory(pcre) add_subdirectory(pdqsort) add_subdirectory(poco) diff --git a/contrib/libs/CMakeLists.linux-aarch64.txt b/contrib/libs/CMakeLists.linux-aarch64.txt index c67d278e53..42d45c16a3 100644 --- a/contrib/libs/CMakeLists.linux-aarch64.txt +++ b/contrib/libs/CMakeLists.linux-aarch64.txt @@ -45,6 +45,7 @@ add_subdirectory(lzmasdk) add_subdirectory(miniselect) add_subdirectory(nayuki_md5) add_subdirectory(nghttp2) +add_subdirectory(opentelemetry-proto) add_subdirectory(pcre) add_subdirectory(pdqsort) add_subdirectory(poco) diff --git a/contrib/libs/CMakeLists.linux-x86_64.txt b/contrib/libs/CMakeLists.linux-x86_64.txt index 185d96e891..37bac16209 100644 --- a/contrib/libs/CMakeLists.linux-x86_64.txt +++ b/contrib/libs/CMakeLists.linux-x86_64.txt @@ -46,6 +46,7 @@ add_subdirectory(lzmasdk) add_subdirectory(miniselect) add_subdirectory(nayuki_md5) add_subdirectory(nghttp2) +add_subdirectory(opentelemetry-proto) add_subdirectory(pcre) add_subdirectory(pdqsort) add_subdirectory(poco) diff --git a/contrib/libs/CMakeLists.windows-x86_64.txt b/contrib/libs/CMakeLists.windows-x86_64.txt index 96f605c258..910254ddc7 100644 --- a/contrib/libs/CMakeLists.windows-x86_64.txt +++ b/contrib/libs/CMakeLists.windows-x86_64.txt @@ -41,6 +41,7 @@ add_subdirectory(lzma) add_subdirectory(lzmasdk) add_subdirectory(miniselect) add_subdirectory(nayuki_md5) +add_subdirectory(opentelemetry-proto) add_subdirectory(pcre) add_subdirectory(poco) add_subdirectory(protobuf) diff --git a/contrib/libs/opentelemetry-proto/CHANGELOG.md b/contrib/libs/opentelemetry-proto/CHANGELOG.md new file mode 100644 index 0000000000..bca0bb7ae3 --- /dev/null +++ b/contrib/libs/opentelemetry-proto/CHANGELOG.md @@ -0,0 +1,326 @@ +# Changelog + +## Unreleased + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.20.0...main). + +## 0.20.0 - 2023-06-06 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.19.0...v0.20.0). + +### Maturity + +* Declare OTLP/JSON Stable. + [#436](https://github.com/open-telemetry/opentelemetry-proto/pull/436) + [#435](https://github.com/open-telemetry/opentelemetry-proto/pull/435) +* Provide stronger symbolic stability guarantees. + [#432](https://github.com/open-telemetry/opentelemetry-proto/pull/432) +* Clarify how additive changes are handled. + [#455](https://github.com/open-telemetry/opentelemetry-proto/pull/455) + +### Changed + +* Change the exponential histogram boundary condition. + [#409](https://github.com/open-telemetry/opentelemetry-proto/pull/409) +* Clarify behavior for empty/not present/invalid trace_id and span_id fields. + [#442](https://github.com/open-telemetry/opentelemetry-proto/pull/442) +* Change the collector trace endpoint to /v1/traces. + [#449](https://github.com/open-telemetry/opentelemetry-proto/pull/449) + +### Added + +* Introduce `zero_threshold` field to `ExponentialHistogramDataPoint`. + [#441](https://github.com/open-telemetry/opentelemetry-proto/pull/441) + [#453](https://github.com/open-telemetry/opentelemetry-proto/pull/453) + +### Removed + +* Delete requirement to generate new trace/span id if an invalid id is received. + [#444](https://github.com/open-telemetry/opentelemetry-proto/pull/444) + +## 0.19.0 - 2022-08-03 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.18.0...v0.19.0). + +### Changed + +* Add `csharp_namespace` option to protos. + ([#399](https://github.com/open-telemetry/opentelemetry-proto/pull/399)) +* Fix some out-of-date urls which link to [specification](https://github.com/open-telemetry/opentelemetry-specification). ([#402](https://github.com/open-telemetry/opentelemetry-proto/pull/402)) +* :stop_sign: [BREAKING] Delete deprecated InstrumentationLibrary, + InstrumentationLibraryLogs, InstrumentationLibrarySpans and + InstrumentationLibraryMetrics messages. Delete deprecated + instrumentation_library_logs, instrumentation_library_spans and + instrumentation_library_metrics fields. + +### 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) + +## 0.18.0 - 2022-05-17 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.17.0...v0.18.0). + +### Changed + +* Declare logs Stable. + [(#376)](https://github.com/open-telemetry/opentelemetry-proto/pull/376) +* Metrics ExponentialHistogramDataPoint makes the `sum` optional + (follows the same change in HistogramDataPOint in 0.15). [#392](https://github.com/open-telemetry/opentelemetry-proto/pull/392) + +## 0.17.0 - 2022-05-06 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.16.0...v0.17.0). + +### Changed + +* Introduce optional `min` and `max` fields to the Histogram and ExponentialHistogram data points. + [(#279)](https://github.com/open-telemetry/opentelemetry-proto/pull/279) + +## 0.16.0 - 2022-03-31 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.15.0...v0.16.0). + +### Removed + +* Remove deprecated LogRecord.Name field (#373). + +## 0.15.0 - 2022-03-19 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.14.0...v0.15.0). + +### Changed + +* Rename InstrumentationLibrary to InstrumentationScope (#362) + +### Added + +* Use optional for `sum` field to mark presence (#366) + +## 0.14.0 - 2022-03-08 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.13.0...v0.14.0). + +### Removed + +* Deprecate LogRecord.Name field (#357) + +## 0.13.0 - 2022-02-10 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.12.0...v0.13.0). + +### Changed + +* `Swagger` generation updated to `openapiv2` due to the use of an updated version of protoc in `otel/build-protobuf` +* Clarify attribute key uniqueness requirement (#350) +* Fix path to Go packages (#360) + +### Added + +* Add ObservedTimestamp to LogRecord. (#351) +* Add native kotlin support (#337) + +### Removed + +* Remove unused deprecated message StringKeyValue (#358) +* Remove experimental metrics config service (#359) + +## 0.12.0 - 2022-01-19 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.11.0...v0.12.0). + +### Changed + +* Rename logs to log_records in InstrumentationLibraryLogs. (#352) + +### Removed + +* Remove deprecated messages and fields from traces. (#341) +* Remove deprecated messages and fields from metrics. (#342) + +## 0.11.0 - 2021-10-07 + +Full list of differences found in [this compare](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.10.0...v0.11.0). + +### Added + +* ExponentialHistogram is a base-2 exponential histogram described in [OTEP 149](https://github.com/open-telemetry/oteps/pull/149). (#322) +* Adds `TracesData`, `MetricsData`, and `LogsData` container types for common use + in transporting multiple `ResourceSpans`, `ResourceMetrics`, and `ResourceLogs`. (#332) + +## 0.10.0 - 2021-09-07 + +Full list of differences found in [this compare.](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.9.0...v0.10.0) + +### Maturity + +* `collector/logs/*` is now considered `Beta`. (#311) +* `logs/*` is now considered `Beta`. (#311) + +### Added + +* Metrics data points add a `flags` field with one bit to represent explicitly missing data. (#316) + +## 0.9.0 - 2021-04-12 + +Full list of differences found in [this compare.](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.8.0...v0.9.0) + +### Maturity + +* `collector/metrics/*` is now considered `stable`. (#305) + +### Changed: Metrics + +* :stop_sign: [DATA MODEL CHANGE] Histogram/Summary sums must be monotonic counters of events (#302) +* :stop_sign: [DATA MODEL CHANGE] Clarify requirements and semantics for start time (#295) +* :stop_sign: [BREAKING] Deprecate `labels` field from NumberDataPoint, HistogramDataPoint, SummaryDataPoint and add equivalent `attributes` field (#283) +* :stop_sign: [BREAKING] Deprecate `filtered_labels` field from Exemplars and add equivalent `filtered_attributes` field (#283) + +### Added + +- Common - Add bytes (binary) as data type to AnyValue (#297) +- Common - Add schema_url fields as described in OTEP 0152 (#298) + +### Removed + +* Remove if no changes for this section before release. + +## 0.8.0 - 2021-03-23 + +Full list of differences found in [this compare.](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.7.0...v0.8.0) + +### Historical breaking change notice + +Release 0.8 was the last in the line of releases marked as "unstable". +This release broke compatibility in more ways than were recognized and +documented at the time of its release. In particular, #278 created +the `NumberDataPoint` type and used it in several locations in place +of the former `DoubleDataPoint`. The new `oneof` in `NumberDataPoint` +re-used the former `DoubleDataPoint` tag number, which means that +pre-0.8 `DoubleSum` and `DoubleGauge` points would parse correctly as +a 0.8 `Sum` and `Gauge` points containing double-valued numbers. + +However, by virtue of a `syntax = "proto3"` declaration, the protocol +compiler for all versions of OTLP have not included field presence, +which means 0 values are not serialized. **The result is that valid +OTLP 0.7 `DoubleSum` and `DoubleGauge` points would not parse +correctly as OTLP 0.8 data.** Instead, they parse as +`NumberDataPoint` with a missing value in the `oneof` field. + +### Changed: Metrics + +* :stop_sign: [DEPRECATION] Deprecate IntSum, IntGauge, and IntDataPoint (#278) +* :stop_sign: [DEPRECATION] Deprecate IntExemplar (#281) +* :stop_sign: [DEPRECATION] Deprecate IntHistogram (#270) +* :stop_sign: [BREAKING] Rename DoubleGauge to Gauge (#278) +* :stop_sign: [BREAKING] Rename DoubleSum to Sum (#278) +* :stop_sign: [BREAKING] Rename DoubleDataPoint to NumberDataPoint (#278) +* :stop_sign: [BREAKING] Rename DoubleSummary to Summary (#269) +* :stop_sign: [BREAKING] Rename DoubleExemplar to Exemplar (#281) +* :stop_sign: [BREAKING] Rename DoubleHistogram to Histogram (#270) +* :stop_sign: [DATA MODEL CHANGE] Make explicit bounds compatible with OM/Prometheus (#262) + +## 0.7.0 - 2021-01-28 + +Full list of differences found in [this compare.](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.6.0...v0.7.0) + +### Maturity + +$$$Protobuf Encodings:** + +* `collector/metrics/*` is now considered `Beta`. (#223) +* `collector/logs/*` is now considered `Alpha`. (#228) +* `logs/*` is now considered `Alpha`. (#228) +* `metrics/*` is now considered `Beta`. (#223) + +### Changed + +* Common/Logs/Metrics/Traces - Clarify empty instrumentation (#245) + +### Added + +* Metrics - Add SummaryDataPoint support to Metrics proto (#227) + +## 0.6.0 - 2020-10-28 + +Full list of differences found in [this compare.](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.5.0...v0.6.0) + +### Maturity + +* Clarify maturity guarantees (#225) + +### Changed + +* Traces - Deprecated old Span status code and added a new status code according to specification (#224) +** Marked for removal `2021-10-22` given Stability Guarantees. +* Rename ProbabilitySampler to TraceIdRatioBased (#221) + +## 0.5.0 - 2020-08-31 + +Full list of differences found in [this compare.](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.4.0...v0.5.0) + +### Maturity Changes + +**Protobuf Encodings:** + +* `collector/trace/*` is now `Stable`. +* `common/*` is now `Stable`. +* `resource/*` is now `Stable`. +* `trace/trace.proto` is now `Stable`. (#160) + +**JSON Encodings:** + +* All messages are now `Alpha`. + +### Changed + +* :stop_sign: [BREAKING] Metrics - protocol was refactored, and lots of breaking changes. +** Removed MetricDescriptor and embedded into Metric and the new data types. +** Add new data types Gauge/Sum/Histogram. +** Make use of the "AggregationTemporality" into the data types that allow that support. +* Rename enum values to follow the proto3 style guide. + +### Added + +* Enable build to use docker image otel/build-protobuf to be used in CI. +** Can also be used by the languages to generate protos. + +### Removed + +* :stop_sign: [BREAKING] Remove generated golang structs from the repository + +### Errata + +The following was announced in the release, but has not yet been considered stable. Please see the latest +README.md for actual status. + +> This is a Release Candidate to declare Metrics part of the protocol Stable. + +## 0.4.0 - 2020-06-23 + +Full list of differences found in [this compare.](https://github.com/open-telemetry/opentelemetry-proto/compare/v0.3.0...v0.4.0) + +### Changed + +* Metrics - Add temporality to MetricDescriptor (#140). + +### Added + +* Metrics - Add Monotonic Types (#145) +* Common/Traces - Added support for arrays and maps for attribute values (AnyValue) (#157). + +### Removed + +* :stop_sign: [BREAKING] Metrics - Removed common labels from MetricDescriptor (#144). + +### Errata + +The following was announced in the release, but this was not considered Stable until `v0.5.0` + +> This is a Release Candidate to declare Traces part of the protocol Stable. + +## 0.3.0 - 2020-03-23 + +* Initial protos for trace, metrics, resource and OTLP. diff --git a/contrib/libs/opentelemetry-proto/CMakeLists.darwin-x86_64.txt b/contrib/libs/opentelemetry-proto/CMakeLists.darwin-x86_64.txt new file mode 100644 index 0000000000..c26ac9dfec --- /dev/null +++ b/contrib/libs/opentelemetry-proto/CMakeLists.darwin-x86_64.txt @@ -0,0 +1,155 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +get_built_tool_path( + TOOL_grpc_cpp_bin + TOOL_grpc_cpp_dependency + contrib/tools/protoc/plugins/grpc_cpp + grpc_cpp +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) + +add_library(contrib-libs-opentelemetry-proto) +set_property(TARGET contrib-libs-opentelemetry-proto PROPERTY + PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h +) +set_property(TARGET contrib-libs-opentelemetry-proto PROPERTY + PROTO_NAMESPACE contrib/libs/opentelemetry-proto +) +target_include_directories(contrib-libs-opentelemetry-proto PUBLIC + ${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto +) +target_link_libraries(contrib-libs-opentelemetry-proto PUBLIC + contrib-libs-cxxsupp + yutil + contrib-libs-grpc + contrib-libs-protobuf +) +target_proto_messages(contrib-libs-opentelemetry-proto PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto +) +target_proto_addincls(contrib-libs-opentelemetry-proto + ./contrib/libs/opentelemetry-proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src +) +target_proto_outs(contrib-libs-opentelemetry-proto + --cpp_out=${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto + --cpp_styleguide_out=${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto +) +target_proto_plugin(contrib-libs-opentelemetry-proto + grpc_cpp + grpc_cpp +) diff --git a/contrib/libs/opentelemetry-proto/CMakeLists.linux-aarch64.txt b/contrib/libs/opentelemetry-proto/CMakeLists.linux-aarch64.txt new file mode 100644 index 0000000000..3379498d0e --- /dev/null +++ b/contrib/libs/opentelemetry-proto/CMakeLists.linux-aarch64.txt @@ -0,0 +1,156 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +get_built_tool_path( + TOOL_grpc_cpp_bin + TOOL_grpc_cpp_dependency + contrib/tools/protoc/plugins/grpc_cpp + grpc_cpp +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) + +add_library(contrib-libs-opentelemetry-proto) +set_property(TARGET contrib-libs-opentelemetry-proto PROPERTY + PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h +) +set_property(TARGET contrib-libs-opentelemetry-proto PROPERTY + PROTO_NAMESPACE contrib/libs/opentelemetry-proto +) +target_include_directories(contrib-libs-opentelemetry-proto PUBLIC + ${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto +) +target_link_libraries(contrib-libs-opentelemetry-proto PUBLIC + contrib-libs-linux-headers + contrib-libs-cxxsupp + yutil + contrib-libs-grpc + contrib-libs-protobuf +) +target_proto_messages(contrib-libs-opentelemetry-proto PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto +) +target_proto_addincls(contrib-libs-opentelemetry-proto + ./contrib/libs/opentelemetry-proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src +) +target_proto_outs(contrib-libs-opentelemetry-proto + --cpp_out=${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto + --cpp_styleguide_out=${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto +) +target_proto_plugin(contrib-libs-opentelemetry-proto + grpc_cpp + grpc_cpp +) diff --git a/contrib/libs/opentelemetry-proto/CMakeLists.linux-x86_64.txt b/contrib/libs/opentelemetry-proto/CMakeLists.linux-x86_64.txt new file mode 100644 index 0000000000..3379498d0e --- /dev/null +++ b/contrib/libs/opentelemetry-proto/CMakeLists.linux-x86_64.txt @@ -0,0 +1,156 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +get_built_tool_path( + TOOL_grpc_cpp_bin + TOOL_grpc_cpp_dependency + contrib/tools/protoc/plugins/grpc_cpp + grpc_cpp +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) + +add_library(contrib-libs-opentelemetry-proto) +set_property(TARGET contrib-libs-opentelemetry-proto PROPERTY + PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h +) +set_property(TARGET contrib-libs-opentelemetry-proto PROPERTY + PROTO_NAMESPACE contrib/libs/opentelemetry-proto +) +target_include_directories(contrib-libs-opentelemetry-proto PUBLIC + ${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto +) +target_link_libraries(contrib-libs-opentelemetry-proto PUBLIC + contrib-libs-linux-headers + contrib-libs-cxxsupp + yutil + contrib-libs-grpc + contrib-libs-protobuf +) +target_proto_messages(contrib-libs-opentelemetry-proto PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto +) +target_proto_addincls(contrib-libs-opentelemetry-proto + ./contrib/libs/opentelemetry-proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src +) +target_proto_outs(contrib-libs-opentelemetry-proto + --cpp_out=${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto + --cpp_styleguide_out=${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto +) +target_proto_plugin(contrib-libs-opentelemetry-proto + grpc_cpp + grpc_cpp +) diff --git a/contrib/libs/opentelemetry-proto/CMakeLists.txt b/contrib/libs/opentelemetry-proto/CMakeLists.txt new file mode 100644 index 0000000000..f8b31df0c1 --- /dev/null +++ b/contrib/libs/opentelemetry-proto/CMakeLists.txt @@ -0,0 +1,17 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT HAVE_CUDA) + include(CMakeLists.linux-aarch64.txt) +elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + include(CMakeLists.darwin-x86_64.txt) +elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) + include(CMakeLists.windows-x86_64.txt) +elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA) + include(CMakeLists.linux-x86_64.txt) +endif() diff --git a/contrib/libs/opentelemetry-proto/CMakeLists.windows-x86_64.txt b/contrib/libs/opentelemetry-proto/CMakeLists.windows-x86_64.txt new file mode 100644 index 0000000000..c26ac9dfec --- /dev/null +++ b/contrib/libs/opentelemetry-proto/CMakeLists.windows-x86_64.txt @@ -0,0 +1,155 @@ + +# This file was generated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + +get_built_tool_path( + TOOL_grpc_cpp_bin + TOOL_grpc_cpp_dependency + contrib/tools/protoc/plugins/grpc_cpp + grpc_cpp +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) +get_built_tool_path( + TOOL_protoc_bin + TOOL_protoc_dependency + contrib/tools/protoc/bin + protoc +) +get_built_tool_path( + TOOL_cpp_styleguide_bin + TOOL_cpp_styleguide_dependency + contrib/tools/protoc/plugins/cpp_styleguide + cpp_styleguide +) + +add_library(contrib-libs-opentelemetry-proto) +set_property(TARGET contrib-libs-opentelemetry-proto PROPERTY + PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h +) +set_property(TARGET contrib-libs-opentelemetry-proto PROPERTY + PROTO_NAMESPACE contrib/libs/opentelemetry-proto +) +target_include_directories(contrib-libs-opentelemetry-proto PUBLIC + ${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto +) +target_link_libraries(contrib-libs-opentelemetry-proto PUBLIC + contrib-libs-cxxsupp + yutil + contrib-libs-grpc + contrib-libs-protobuf +) +target_proto_messages(contrib-libs-opentelemetry-proto PRIVATE + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto +) +target_proto_addincls(contrib-libs-opentelemetry-proto + ./contrib/libs/opentelemetry-proto + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src +) +target_proto_outs(contrib-libs-opentelemetry-proto + --cpp_out=${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto + --cpp_styleguide_out=${CMAKE_BINARY_DIR}/contrib/libs/opentelemetry-proto +) +target_proto_plugin(contrib-libs-opentelemetry-proto + grpc_cpp + grpc_cpp +) diff --git a/contrib/libs/opentelemetry-proto/CONTRIBUTING.md b/contrib/libs/opentelemetry-proto/CONTRIBUTING.md new file mode 100644 index 0000000000..426dafe3ae --- /dev/null +++ b/contrib/libs/opentelemetry-proto/CONTRIBUTING.md @@ -0,0 +1,14 @@ +# Contributing + +Read OpenTelemetry project [contributing +guide](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md) +for general information about the project. + +## Prerequisites + +- `Docker` + +## Making changes to the .proto files + +After making any changes to .proto files make sure to generate all +implementation by running `make gen-all`. diff --git a/contrib/libs/opentelemetry-proto/LICENSE b/contrib/libs/opentelemetry-proto/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/contrib/libs/opentelemetry-proto/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/contrib/libs/opentelemetry-proto/README.md b/contrib/libs/opentelemetry-proto/README.md new file mode 100644 index 0000000000..d22b11899f --- /dev/null +++ b/contrib/libs/opentelemetry-proto/README.md @@ -0,0 +1,95 @@ +# OpenTelemetry Protocol (OTLP) Specification + +[](https://github.com/open-telemetry/opentelemetry-proto/actions?query=workflow%3A%22Build+Check%22+branch%3Amain) + +This repository contains the [OTLP protocol specification](docs/specification.md) +and the corresponding Language Independent Interface Types ([.proto files](opentelemetry/proto)). + +## Language Independent Interface Types + +The proto files can be consumed as GIT submodules or copied and built directly in the consumer project. + +The compiled files are published to central repositories (Maven, ...) from OpenTelemetry client libraries. + +See [contribution guidelines](CONTRIBUTING.md) if you would like to make any changes. + +## OTLP/JSON + +See additional requirements for [OTLP/JSON wire representation here](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#json-protobuf-encoding). + +## Generate gRPC Client Libraries + +To generate the raw gRPC client libraries, use `make gen-${LANGUAGE}`. Currently supported languages are: + +* cpp +* csharp +* go +* java +* objc +* openapi (swagger) +* php +* python +* ruby + +## Maturity Level + +1.0.0 and newer releases from this repository may contain unstable (alpha or beta) +components as indicated by the Maturity table below. + +| Component | Binary Protobuf Maturity | JSON Maturity | +| --------- |--------------- | ------------- | +| common/* | Stable | [Stable](docs/specification.md#json-protobuf-encoding) | +| resource/* | Stable | [Stable](docs/specification.md#json-protobuf-encoding) | +| metrics/\*<br>collector/metrics/* | Stable | [Stable](docs/specification.md#json-protobuf-encoding) | +| trace/\*<br>collector/trace/* | Stable | [Stable](docs/specification.md#json-protobuf-encoding) | +| logs/\*<br>collector/logs/* | Stable | [Stable](docs/specification.md#json-protobuf-encoding) | + +(See [maturity-matrix.yaml](https://github.com/open-telemetry/community/blob/47813530864b9fe5a5146f466a58bd2bb94edc72/maturity-matrix.yaml#L57) +for definition of maturity levels). + +## Stability Definition + +Components marked `Stable` provide the following guarantees: + +- Field types, numbers and names will not change. +- Service names and service package names will not change. +- Service method names will not change. [from 1.0.0] +- Service method parameter names will not change. [from 1.0.0] +- Service method parameter types and return types will not change. [from 1.0.0] +- Service method kind (unary vs streaming) will not change. +- Names of messages and enums will not change. [from 1.0.0] +- Numbers assigned to enum choices will not change. +- Names of enum choices will not change. [from 1.0.0] +- The location of messages and enums, i.e. whether they are declared at the top lexical + scope or nested inside another message will not change. [from 1.0.0] +- Package names and directory structure will not change. [from 1.0.0] +- `optional` and `repeated` declarators of existing fields will not change. [from 1.0.0] +- No existing symbol will be deleted. [from 1.0.0] + +Note: guarantees marked [from 1.0.0] will go into effect when this repository is tagged +with version number 1.0.0. + +The following additive changes are allowed: + +- Adding new fields to existing messages. +- Adding new messages or enums. +- Adding new choices to existing enums. +- Adding new choices to existing oneof fields. +- Adding new services. +- Adding new methods to existing services. + +All the additive changes above must be accompanied by an explanation about how +new and old senders and receivers that implement the version of the protocol +before and after the change interoperate. + +No guarantees are provided whatsoever about the stability of the code that +is generated from the .proto files by any particular code generator. + +## Experiments + +In some cases we are trying to experiment with different features. In this case, +we recommend using an "experimental" sub-directory instead of adding them to any +protocol version. These protocols should not be used, except for +development/testing purposes. + +Another review must be conducted for experimental protocols to join the main project. diff --git a/contrib/libs/opentelemetry-proto/RELEASING.md b/contrib/libs/opentelemetry-proto/RELEASING.md new file mode 100644 index 0000000000..207d234a90 --- /dev/null +++ b/contrib/libs/opentelemetry-proto/RELEASING.md @@ -0,0 +1,89 @@ +# How to Create a Release of OpenTelemetry Proto (for Maintainers Only) + +## Tagging the Release + +Our release branches follow the naming convention of `v<major>.<minor>.x`, while +the tags include the patch version `v<major>.<minor>.<patch>`. For example, the +same branch `v0.3.x` would be used to create all `v0.3` tags (e.g. `v0.3.0`, +`v0.3.1`). + +In this section upstream repository refers to the main opentelemetry-proto +github repository. + +Before any push to the upstream repository you need to create a [personal access +token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/). + +1. Create the release branch and push it to GitHub: + + ```bash + MAJOR=0 MINOR=3 PATCH=0 # Set appropriately for new release + git checkout -b v$MAJOR.$MINOR.x main + git push upstream v$MAJOR.$MINOR.x + ``` + +2. Enable branch protection for the new branch, if you have admin access. + Otherwise, let someone with admin access know that there is a new release + branch. + + - Open the branch protection settings for the new branch, by following + [Github's instructions](https://help.github.com/articles/configuring-protected-branches/). + - Copy the settings from a previous branch, i.e., check + - `Protect this branch` + - `Require pull request reviews before merging` + - `Require status checks to pass before merging` + - `Include administrators` + + Enable the following required status checks: + - `cla/linuxfoundation` + - `ci/circleci: build` + - Uncheck everything else. + - Click "Save changes". + +3. For `vMajor.Minor.x` branch: + + - Create and push a tag: + + ```bash + git checkout v$MAJOR.$MINOR.x + git pull upstream v$MAJOR.$MINOR.x + git tag -a v$MAJOR.$MINOR.$PATCH -m "Version $MAJOR.$MINOR.$PATCH" + git push upstream v$MAJOR.$MINOR.$PATCH + ``` + +## Patch Release + +All patch releases should include only bug-fixes, and must avoid +adding/modifying the public APIs. To cherry-pick one commit use the following +instructions: + +- Create and push a tag: + +```bash +COMMIT=1224f0a # Set the right commit hash. +git checkout -b cherrypick v$MAJOR.$MINOR.x +git cherry-pick -x $COMMIT +git commit -a -m "Cherry-pick commit $COMMIT" +``` + +- Go through PR review and merge it to GitHub v$MAJOR.$MINOR.x branch. + +- Tag a new patch release when all commits are merged. + +## Announcement + +Once deployment is done, go to Github [release +page](https://github.com/open-telemetry/opentelemetry-proto/releases), press +`Draft a new release` to write release notes about the new release. + +You can use `git log upstream/v$MAJOR.$((MINOR-1)).x..upstream/v$MAJOR.$MINOR.x --graph --first-parent` +or the Github [compare tool](https://github.com/open-telemetry/opentelemetry-proto/compare/) +to view a summary of all commits since last release as a reference. + +In addition, you can refer to [CHANGELOG.md](CHANGELOG.md) +for a list of major changes since last release. + +## Update release versions in documentations and CHANGELOG files + +After releasing is done, you need to update [README.md](README.md) and [CHANGELOG.md](CHANGELOG.md). + +Create a PR to mark the new release in [CHANGELOG.md](CHANGELOG.md) on main branch. diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/README.md b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/README.md new file mode 100644 index 0000000000..f82dbb0278 --- /dev/null +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/README.md @@ -0,0 +1,10 @@ +# OpenTelemetry Collector Proto + +This package describes the OpenTelemetry collector protocol. + +## Packages + +1. `common` package contains the common messages shared between different services. +2. `trace` package contains the Trace Service protos. +3. `metrics` package contains the Metrics Service protos. +4. `logs` package contains the Logs Service protos. diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto new file mode 100644 index 0000000000..8260d8aaeb --- /dev/null +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/logs/v1/logs_service.proto @@ -0,0 +1,79 @@ +// Copyright 2020, 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.logs.v1; + +import "opentelemetry/proto/logs/v1/logs.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Collector.Logs.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.collector.logs.v1"; +option java_outer_classname = "LogsServiceProto"; +option go_package = "go.opentelemetry.io/proto/otlp/collector/logs/v1"; + +// Service that can be used to push logs between one Application instrumented with +// OpenTelemetry and an collector, or between an collector and a central collector (in this +// case logs are sent/received to/from multiple Applications). +service LogsService { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + rpc Export(ExportLogsServiceRequest) returns (ExportLogsServiceResponse) {} +} + +message ExportLogsServiceRequest { + // An array of ResourceLogs. + // 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.logs.v1.ResourceLogs resource_logs = 1; +} + +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_<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. + ExportLogsPartialSuccess partial_success = 1; +} + +message ExportLogsPartialSuccess { + // The number of rejected log records. + // + // A `rejected_<signal>` field holding a `0` value indicates that the + // request was fully accepted. + int64 rejected_log_records = 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; +} diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto new file mode 100644 index 0000000000..dd48f1ad3a --- /dev/null +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto @@ -0,0 +1,79 @@ +// Copyright 2019, 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.metrics.v1; + +import "opentelemetry/proto/metrics/v1/metrics.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Collector.Metrics.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.collector.metrics.v1"; +option java_outer_classname = "MetricsServiceProto"; +option go_package = "go.opentelemetry.io/proto/otlp/collector/metrics/v1"; + +// Service that can be used to push metrics between one Application +// instrumented with OpenTelemetry and a collector, or between a collector and a +// central collector. +service MetricsService { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + rpc Export(ExportMetricsServiceRequest) returns (ExportMetricsServiceResponse) {} +} + +message ExportMetricsServiceRequest { + // An array of ResourceMetrics. + // 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.metrics.v1.ResourceMetrics resource_metrics = 1; +} + +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_<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. + ExportMetricsPartialSuccess partial_success = 1; +} + +message ExportMetricsPartialSuccess { + // The number of rejected data points. + // + // A `rejected_<signal>` field holding a `0` value indicates that the + // request was fully accepted. + int64 rejected_data_points = 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; +} diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto new file mode 100644 index 0000000000..d6fe67f9e5 --- /dev/null +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.proto @@ -0,0 +1,79 @@ +// Copyright 2019, 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.trace.v1; + +import "opentelemetry/proto/trace/v1/trace.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Collector.Trace.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.collector.trace.v1"; +option java_outer_classname = "TraceServiceProto"; +option go_package = "go.opentelemetry.io/proto/otlp/collector/trace/v1"; + +// Service that can be used to push spans between one Application instrumented with +// OpenTelemetry and a collector, or between a collector and a central collector (in this +// case spans are sent/received to/from multiple Applications). +service TraceService { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + rpc Export(ExportTraceServiceRequest) returns (ExportTraceServiceResponse) {} +} + +message ExportTraceServiceRequest { + // An array of ResourceSpans. + // 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.trace.v1.ResourceSpans resource_spans = 1; +} + +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_<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. + ExportTracePartialSuccess partial_success = 1; +} + +message ExportTracePartialSuccess { + // The number of rejected spans. + // + // A `rejected_<signal>` field holding a `0` value indicates that the + // request was fully accepted. + int64 rejected_spans = 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; +} diff --git a/library/cpp/actors/wilson/protos/common.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto index 8562ee6d1e..ff8a21a1fa 100644 --- a/library/cpp/actors/wilson/protos/common.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/common/v1/common.proto @@ -16,6 +16,12 @@ syntax = "proto3"; package opentelemetry.proto.common.v1; +option csharp_namespace = "OpenTelemetry.Proto.Common.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.common.v1"; +option java_outer_classname = "CommonProto"; +option go_package = "go.opentelemetry.io/proto/otlp/common/v1"; + // AnyValue is used to represent any type of attribute value. AnyValue may contain a // primitive value such as a string or integer or it may contain an arbitrary nested // object containing arrays, key-value lists and primitives. @@ -60,25 +66,16 @@ message KeyValue { AnyValue value = 2; } -// InstrumentationLibrary is a message representing the instrumentation library information -// such as the fully qualified name and version. -// InstrumentationLibrary is wire-compatible with InstrumentationScope for binary -// Protobuf format. -// This message is deprecated and will be removed on June 15, 2022. -message InstrumentationLibrary { - option deprecated = true; - - // An empty instrumentation library name means the name is unknown. - string name = 1; - string version = 2; -} - // InstrumentationScope is a message representing the instrumentation scope information // such as the fully qualified name and version. message InstrumentationScope { // An empty instrumentation scope name means the name is unknown. string name = 1; string version = 2; + + // Additional attributes that describe the scope. [Optional]. + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). repeated KeyValue attributes = 3; uint32 dropped_attributes_count = 4; } diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto new file mode 100644 index 0000000000..0b4b649729 --- /dev/null +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto @@ -0,0 +1,203 @@ +// Copyright 2020, 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.logs.v1; + +import "opentelemetry/proto/common/v1/common.proto"; +import "opentelemetry/proto/resource/v1/resource.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Logs.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.logs.v1"; +option java_outer_classname = "LogsProto"; +option go_package = "go.opentelemetry.io/proto/otlp/logs/v1"; + +// LogsData represents the logs data that can be stored in a persistent storage, +// OR can be embedded by other protocols that transfer OTLP logs data but do not +// implement the OTLP protocol. +// +// The main difference between this message and collector protocol is that +// in this message there will not be any "control" or "metadata" specific to +// OTLP protocol. +// +// When new fields are added into this message, the OTLP request MUST be updated +// as well. +message LogsData { + // An array of ResourceLogs. + // For data coming from a single resource this array will typically contain + // one element. Intermediary nodes that receive data from multiple origins + // typically batch the data before forwarding further and in that case this + // array will contain multiple elements. + repeated ResourceLogs resource_logs = 1; +} + +// A collection of ScopeLogs from a Resource. +message ResourceLogs { + reserved 1000; + + // The resource for the logs in this message. + // If this field is not set then resource info is unknown. + opentelemetry.proto.resource.v1.Resource resource = 1; + + // A list of ScopeLogs that originate from a resource. + repeated ScopeLogs scope_logs = 2; + + // This schema_url applies to the data in the "resource" field. It does not apply + // to the data in the "scope_logs" field which have their own schema_url field. + string schema_url = 3; +} + +// A collection of Logs produced by a Scope. +message ScopeLogs { + // The instrumentation scope information for the logs in this message. + // Semantically when InstrumentationScope isn't set, it is equivalent with + // an empty instrumentation scope name (unknown). + opentelemetry.proto.common.v1.InstrumentationScope scope = 1; + + // A list of log records. + repeated LogRecord log_records = 2; + + // This schema_url applies to all logs in the "logs" field. + string schema_url = 3; +} + +// Possible values for LogRecord.SeverityNumber. +enum SeverityNumber { + // UNSPECIFIED is the default SeverityNumber, it MUST NOT be used. + SEVERITY_NUMBER_UNSPECIFIED = 0; + SEVERITY_NUMBER_TRACE = 1; + SEVERITY_NUMBER_TRACE2 = 2; + SEVERITY_NUMBER_TRACE3 = 3; + SEVERITY_NUMBER_TRACE4 = 4; + SEVERITY_NUMBER_DEBUG = 5; + SEVERITY_NUMBER_DEBUG2 = 6; + SEVERITY_NUMBER_DEBUG3 = 7; + SEVERITY_NUMBER_DEBUG4 = 8; + SEVERITY_NUMBER_INFO = 9; + SEVERITY_NUMBER_INFO2 = 10; + SEVERITY_NUMBER_INFO3 = 11; + SEVERITY_NUMBER_INFO4 = 12; + SEVERITY_NUMBER_WARN = 13; + SEVERITY_NUMBER_WARN2 = 14; + SEVERITY_NUMBER_WARN3 = 15; + SEVERITY_NUMBER_WARN4 = 16; + SEVERITY_NUMBER_ERROR = 17; + SEVERITY_NUMBER_ERROR2 = 18; + SEVERITY_NUMBER_ERROR3 = 19; + SEVERITY_NUMBER_ERROR4 = 20; + SEVERITY_NUMBER_FATAL = 21; + SEVERITY_NUMBER_FATAL2 = 22; + SEVERITY_NUMBER_FATAL3 = 23; + SEVERITY_NUMBER_FATAL4 = 24; +} + +// LogRecordFlags is defined as a protobuf 'uint32' type and is to be used as +// bit-fields. Each non-zero value defined in this enum is a bit-mask. +// To extract the bit-field, for example, use an expression like: +// +// (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK) +// +enum LogRecordFlags { + // The zero value for the enum. Should not be used for comparisons. + // Instead use bitwise "and" with the appropriate mask as shown above. + LOG_RECORD_FLAGS_DO_NOT_USE = 0; + + // Bits 0-7 are used for trace flags. + LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 0x000000FF; + + // Bits 8-31 are reserved for future use. +} + +// A log record according to OpenTelemetry Log Data Model: +// https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md +message LogRecord { + reserved 4; + + // time_unix_nano is the time when the event occurred. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // Value of 0 indicates unknown or missing timestamp. + fixed64 time_unix_nano = 1; + + // Time when the event was observed by the collection system. + // For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK) + // this timestamp is typically set at the generation time and is equal to Timestamp. + // For events originating externally and collected by OpenTelemetry (e.g. using + // Collector) this is the time when OpenTelemetry's code observed the event measured + // by the clock of the OpenTelemetry code. This field MUST be set once the event is + // observed by OpenTelemetry. + // + // For converting OpenTelemetry log data to formats that support only one timestamp or + // when receiving OpenTelemetry log data by recipients that support only one timestamp + // internally the following logic is recommended: + // - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // Value of 0 indicates unknown or missing timestamp. + fixed64 observed_time_unix_nano = 11; + + // Numerical value of the severity, normalized to values described in Log Data Model. + // [Optional]. + SeverityNumber severity_number = 2; + + // The severity text (also known as log level). The original string representation as + // it is known at the source. [Optional]. + string severity_text = 3; + + // A value containing the body of the log record. Can be for example a human-readable + // string message (including multi-line) describing the event in a free form or it can + // be a structured data composed of arrays and maps of other values. [Optional]. + opentelemetry.proto.common.v1.AnyValue body = 5; + + // Additional attributes that describe the specific event occurrence. [Optional]. + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + repeated opentelemetry.proto.common.v1.KeyValue attributes = 6; + uint32 dropped_attributes_count = 7; + + // Flags, a bit field. 8 least significant bits are the trace flags as + // defined in W3C Trace Context specification. 24 most significant bits are reserved + // and must be set to 0. Readers must not assume that 24 most significant bits + // will be zero and must correctly mask the bits when reading 8-bit trace flag (use + // flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional]. + fixed32 flags = 8; + + // A unique identifier for a trace. All logs from the same trace share + // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR + // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON + // is zero-length and thus is also invalid). + // + // This field is optional. + // + // The receivers SHOULD assume that the log record is not associated with a + // trace if any of the following is true: + // - the field is not present, + // - the field contains an invalid value. + bytes trace_id = 9; + + // A unique identifier for a span within a trace, assigned when the span + // is created. The ID is an 8-byte array. An ID with all zeroes OR of length + // other than 8 bytes is considered invalid (empty string in OTLP/JSON + // is zero-length and thus is also invalid). + // + // This field is optional. If the sender specifies a valid span_id then it SHOULD also + // specify a valid trace_id. + // + // The receivers SHOULD assume that the log record is not associated with a + // span if any of the following is true: + // - the field is not present, + // - the field contains an invalid value. + bytes span_id = 10; +} diff --git a/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto new file mode 100644 index 0000000000..da986dda18 --- /dev/null +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/metrics/v1/metrics.proto @@ -0,0 +1,676 @@ +// Copyright 2019, 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.metrics.v1; + +import "opentelemetry/proto/common/v1/common.proto"; +import "opentelemetry/proto/resource/v1/resource.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Metrics.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.metrics.v1"; +option java_outer_classname = "MetricsProto"; +option go_package = "go.opentelemetry.io/proto/otlp/metrics/v1"; + +// MetricsData represents the metrics data that can be stored in a persistent +// storage, OR can be embedded by other protocols that transfer OTLP metrics +// data but do not implement the OTLP protocol. +// +// The main difference between this message and collector protocol is that +// in this message there will not be any "control" or "metadata" specific to +// OTLP protocol. +// +// When new fields are added into this message, the OTLP request MUST be updated +// as well. +message MetricsData { + // An array of ResourceMetrics. + // For data coming from a single resource this array will typically contain + // one element. Intermediary nodes that receive data from multiple origins + // typically batch the data before forwarding further and in that case this + // array will contain multiple elements. + repeated ResourceMetrics resource_metrics = 1; +} + +// A collection of ScopeMetrics from a Resource. +message ResourceMetrics { + reserved 1000; + + // The resource for the metrics in this message. + // If this field is not set then no resource info is known. + opentelemetry.proto.resource.v1.Resource resource = 1; + + // A list of metrics that originate from a resource. + repeated ScopeMetrics scope_metrics = 2; + + // This schema_url applies to the data in the "resource" field. It does not apply + // to the data in the "scope_metrics" field which have their own schema_url field. + string schema_url = 3; +} + +// A collection of Metrics produced by an Scope. +message ScopeMetrics { + // The instrumentation scope information for the metrics in this message. + // Semantically when InstrumentationScope isn't set, it is equivalent with + // an empty instrumentation scope name (unknown). + opentelemetry.proto.common.v1.InstrumentationScope scope = 1; + + // A list of metrics that originate from an instrumentation library. + repeated Metric metrics = 2; + + // This schema_url applies to all metrics in the "metrics" field. + string schema_url = 3; +} + +// Defines a Metric which has one or more timeseries. The following is a +// brief summary of the Metric data model. For more details, see: +// +// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md +// +// +// The data model and relation between entities is shown in the +// diagram below. Here, "DataPoint" is the term used to refer to any +// one of the specific data point value types, and "points" is the term used +// to refer to any one of the lists of points contained in the Metric. +// +// - Metric is composed of a metadata and data. +// - Metadata part contains a name, description, unit. +// - Data is one of the possible types (Sum, Gauge, Histogram, Summary). +// - DataPoint contains timestamps, attributes, and one of the possible value type +// fields. +// +// Metric +// +------------+ +// |name | +// |description | +// |unit | +------------------------------------+ +// |data |---> |Gauge, Sum, Histogram, Summary, ... | +// +------------+ +------------------------------------+ +// +// Data [One of Gauge, Sum, Histogram, Summary, ...] +// +-----------+ +// |... | // Metadata about the Data. +// |points |--+ +// +-----------+ | +// | +---------------------------+ +// | |DataPoint 1 | +// v |+------+------+ +------+ | +// +-----+ ||label |label |...|label | | +// | 1 |-->||value1|value2|...|valueN| | +// +-----+ |+------+------+ +------+ | +// | . | |+-----+ | +// | . | ||value| | +// | . | |+-----+ | +// | . | +---------------------------+ +// | . | . +// | . | . +// | . | . +// | . | +---------------------------+ +// | . | |DataPoint M | +// +-----+ |+------+------+ +------+ | +// | M |-->||label |label |...|label | | +// +-----+ ||value1|value2|...|valueN| | +// |+------+------+ +------+ | +// |+-----+ | +// ||value| | +// |+-----+ | +// +---------------------------+ +// +// Each distinct type of DataPoint represents the output of a specific +// aggregation function, the result of applying the DataPoint's +// associated function of to one or more measurements. +// +// All DataPoint types have three common fields: +// - Attributes includes key-value pairs associated with the data point +// - TimeUnixNano is required, set to the end time of the aggregation +// - StartTimeUnixNano is optional, but strongly encouraged for DataPoints +// having an AggregationTemporality field, as discussed below. +// +// Both TimeUnixNano and StartTimeUnixNano values are expressed as +// UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. +// +// # TimeUnixNano +// +// This field is required, having consistent interpretation across +// DataPoint types. TimeUnixNano is the moment corresponding to when +// the data point's aggregate value was captured. +// +// Data points with the 0 value for TimeUnixNano SHOULD be rejected +// by consumers. +// +// # StartTimeUnixNano +// +// StartTimeUnixNano in general allows detecting when a sequence of +// observations is unbroken. This field indicates to consumers the +// start time for points with cumulative and delta +// AggregationTemporality, and it should be included whenever possible +// to support correct rate calculation. Although it may be omitted +// when the start time is truly unknown, setting StartTimeUnixNano is +// strongly encouraged. +message Metric { + reserved 4, 6, 8; + + // name of the metric, including its DNS name prefix. It must be unique. + string name = 1; + + // description of the metric, which can be used in documentation. + string description = 2; + + // unit in which the metric value is reported. Follows the format + // described by http://unitsofmeasure.org/ucum.html. + string unit = 3; + + // Data determines the aggregation type (if any) of the metric, what is the + // reported value type for the data points, as well as the relatationship to + // the time interval over which they are reported. + oneof data { + Gauge gauge = 5; + Sum sum = 7; + Histogram histogram = 9; + ExponentialHistogram exponential_histogram = 10; + Summary summary = 11; + } +} + +// Gauge represents the type of a scalar metric that always exports the +// "current value" for every data point. It should be used for an "unknown" +// aggregation. +// +// A Gauge does not support different aggregation temporalities. Given the +// aggregation is unknown, points cannot be combined using the same +// aggregation, regardless of aggregation temporalities. Therefore, +// AggregationTemporality is not included. Consequently, this also means +// "StartTimeUnixNano" is ignored for all data points. +message Gauge { + repeated NumberDataPoint data_points = 1; +} + +// Sum represents the type of a scalar metric that is calculated as a sum of all +// reported measurements over a time interval. +message Sum { + repeated NumberDataPoint data_points = 1; + + // aggregation_temporality describes if the aggregator reports delta changes + // since last report time, or cumulative changes since a fixed start time. + AggregationTemporality aggregation_temporality = 2; + + // If "true" means that the sum is monotonic. + bool is_monotonic = 3; +} + +// Histogram represents the type of a metric that is calculated by aggregating +// as a Histogram of all reported measurements over a time interval. +message Histogram { + repeated HistogramDataPoint data_points = 1; + + // aggregation_temporality describes if the aggregator reports delta changes + // since last report time, or cumulative changes since a fixed start time. + AggregationTemporality aggregation_temporality = 2; +} + +// ExponentialHistogram represents the type of a metric that is calculated by aggregating +// as a ExponentialHistogram of all reported double measurements over a time interval. +message ExponentialHistogram { + repeated ExponentialHistogramDataPoint data_points = 1; + + // aggregation_temporality describes if the aggregator reports delta changes + // since last report time, or cumulative changes since a fixed start time. + AggregationTemporality aggregation_temporality = 2; +} + +// Summary metric data are used to convey quantile summaries, +// a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary) +// and OpenMetrics (see: https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45) +// data type. These data points cannot always be merged in a meaningful way. +// While they can be useful in some applications, histogram data points are +// recommended for new applications. +message Summary { + repeated SummaryDataPoint data_points = 1; +} + +// AggregationTemporality defines how a metric aggregator reports aggregated +// values. It describes how those values relate to the time interval over +// which they are aggregated. +enum AggregationTemporality { + // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. + AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; + + // DELTA is an AggregationTemporality for a metric aggregator which reports + // changes since last report time. Successive metrics contain aggregation of + // values from continuous and non-overlapping intervals. + // + // The values for a DELTA metric are based only on the time interval + // associated with one measurement cycle. There is no dependency on + // previous measurements like is the case for CUMULATIVE metrics. + // + // For example, consider a system measuring the number of requests that + // it receives and reports the sum of these requests every second as a + // DELTA metric: + // + // 1. The system starts receiving at time=t_0. + // 2. A request is received, the system measures 1 request. + // 3. A request is received, the system measures 1 request. + // 4. A request is received, the system measures 1 request. + // 5. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+1 with a value of 3. + // 6. A request is received, the system measures 1 request. + // 7. A request is received, the system measures 1 request. + // 8. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0+1 to + // t_0+2 with a value of 2. + AGGREGATION_TEMPORALITY_DELTA = 1; + + // CUMULATIVE is an AggregationTemporality for a metric aggregator which + // reports changes since a fixed start time. This means that current values + // of a CUMULATIVE metric depend on all previous measurements since the + // start time. Because of this, the sender is required to retain this state + // in some form. If this state is lost or invalidated, the CUMULATIVE metric + // values MUST be reset and a new fixed start time following the last + // reported measurement time sent MUST be used. + // + // For example, consider a system measuring the number of requests that + // it receives and reports the sum of these requests every second as a + // CUMULATIVE metric: + // + // 1. The system starts receiving at time=t_0. + // 2. A request is received, the system measures 1 request. + // 3. A request is received, the system measures 1 request. + // 4. A request is received, the system measures 1 request. + // 5. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+1 with a value of 3. + // 6. A request is received, the system measures 1 request. + // 7. A request is received, the system measures 1 request. + // 8. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_0 to + // t_0+2 with a value of 5. + // 9. The system experiences a fault and loses state. + // 10. The system recovers and resumes receiving at time=t_1. + // 11. A request is received, the system measures 1 request. + // 12. The 1 second collection cycle ends. A metric is exported for the + // number of requests received over the interval of time t_1 to + // t_0+1 with a value of 1. + // + // Note: Even though, when reporting changes since last report time, using + // CUMULATIVE is valid, it is not recommended. This may cause problems for + // systems that do not use start_time to determine when the aggregation + // value was reset (e.g. Prometheus). + AGGREGATION_TEMPORALITY_CUMULATIVE = 2; +} + +// DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a +// bit-field representing 32 distinct boolean flags. Each flag defined in this +// enum is a bit-mask. To test the presence of a single flag in the flags of +// a data point, for example, use an expression like: +// +// (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK +// +enum DataPointFlags { + // The zero value for the enum. Should not be used for comparisons. + // Instead use bitwise "and" with the appropriate mask as shown above. + DATA_POINT_FLAGS_DO_NOT_USE = 0; + + // This DataPoint is valid but has no recorded value. This value + // SHOULD be used to reflect explicitly missing data in a series, as + // for an equivalent to the Prometheus "staleness marker". + DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1; + + // Bits 2-31 are reserved for future use. +} + +// NumberDataPoint is a single data point in a timeseries that describes the +// time-varying scalar value of a metric. +message NumberDataPoint { + reserved 1; + + // The set of key/value pairs that uniquely identify the timeseries from + // where this point belongs. The list may be empty (may contain 0 elements). + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; + + // StartTimeUnixNano is optional but strongly encouraged, see the + // the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 start_time_unix_nano = 2; + + // TimeUnixNano is required, see the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 time_unix_nano = 3; + + // The value itself. A point is considered invalid when one of the recognized + // value fields is not present inside this oneof. + oneof value { + double as_double = 4; + sfixed64 as_int = 6; + } + + // (Optional) List of exemplars collected from + // measurements that were used to form the data point + repeated Exemplar exemplars = 5; + + // Flags that apply to this specific data point. See DataPointFlags + // for the available flags and their meaning. + uint32 flags = 8; +} + +// HistogramDataPoint is a single data point in a timeseries that describes the +// time-varying values of a Histogram. A Histogram contains summary statistics +// for a population of values, it may optionally contain the distribution of +// those values across a set of buckets. +// +// If the histogram contains the distribution of values, then both +// "explicit_bounds" and "bucket counts" fields must be defined. +// If the histogram does not contain the distribution of values, then both +// "explicit_bounds" and "bucket_counts" must be omitted and only "count" and +// "sum" are known. +message HistogramDataPoint { + reserved 1; + + // The set of key/value pairs that uniquely identify the timeseries from + // where this point belongs. The list may be empty (may contain 0 elements). + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; + + // StartTimeUnixNano is optional but strongly encouraged, see the + // the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 start_time_unix_nano = 2; + + // TimeUnixNano is required, see the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 time_unix_nano = 3; + + // count is the number of values in the population. Must be non-negative. This + // value must be equal to the sum of the "count" fields in buckets if a + // histogram is provided. + fixed64 count = 4; + + // sum of the values in the population. If count is zero then this field + // must be zero. + // + // Note: Sum should only be filled out when measuring non-negative discrete + // events, and is assumed to be monotonic over the values of these events. + // Negative events *can* be recorded, but sum should not be filled out when + // doing so. This is specifically to enforce compatibility w/ OpenMetrics, + // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram + optional double sum = 5; + + // bucket_counts is an optional field contains the count values of histogram + // for each bucket. + // + // The sum of the bucket_counts must equal the value in the count field. + // + // The number of elements in bucket_counts array must be by one greater than + // the number of elements in explicit_bounds array. + repeated fixed64 bucket_counts = 6; + + // explicit_bounds specifies buckets with explicitly defined bounds for values. + // + // The boundaries for bucket at index i are: + // + // (-infinity, explicit_bounds[i]] for i == 0 + // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds) + // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds) + // + // The values in the explicit_bounds array must be strictly increasing. + // + // Histogram buckets are inclusive of their upper boundary, except the last + // bucket where the boundary is at infinity. This format is intentionally + // compatible with the OpenMetrics histogram definition. + repeated double explicit_bounds = 7; + + // (Optional) List of exemplars collected from + // measurements that were used to form the data point + repeated Exemplar exemplars = 8; + + // Flags that apply to this specific data point. See DataPointFlags + // for the available flags and their meaning. + uint32 flags = 10; + + // min is the minimum value over (start_time, end_time]. + optional double min = 11; + + // max is the maximum value over (start_time, end_time]. + optional double max = 12; +} + +// ExponentialHistogramDataPoint is a single data point in a timeseries that describes the +// time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains +// summary statistics for a population of values, it may optionally contain the +// distribution of those values across a set of buckets. +// +message ExponentialHistogramDataPoint { + // The set of key/value pairs that uniquely identify the timeseries from + // where this point belongs. The list may be empty (may contain 0 elements). + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; + + // StartTimeUnixNano is optional but strongly encouraged, see the + // the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 start_time_unix_nano = 2; + + // TimeUnixNano is required, see the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 time_unix_nano = 3; + + // count is the number of values in the population. Must be + // non-negative. This value must be equal to the sum of the "bucket_counts" + // values in the positive and negative Buckets plus the "zero_count" field. + fixed64 count = 4; + + // sum of the values in the population. If count is zero then this field + // must be zero. + // + // Note: Sum should only be filled out when measuring non-negative discrete + // events, and is assumed to be monotonic over the values of these events. + // Negative events *can* be recorded, but sum should not be filled out when + // doing so. This is specifically to enforce compatibility w/ OpenMetrics, + // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram + optional double sum = 5; + + // scale describes the resolution of the histogram. Boundaries are + // located at powers of the base, where: + // + // base = (2^(2^-scale)) + // + // The histogram bucket identified by `index`, a signed integer, + // contains values that are greater than (base^index) and + // less than or equal to (base^(index+1)). + // + // The positive and negative ranges of the histogram are expressed + // separately. Negative values are mapped by their absolute value + // into the negative range using the same scale as the positive range. + // + // scale is not restricted by the protocol, as the permissible + // values depend on the range of the data. + sint32 scale = 6; + + // zero_count is the count of values that are either exactly zero or + // within the region considered zero by the instrumentation at the + // tolerated degree of precision. This bucket stores values that + // cannot be expressed using the standard exponential formula as + // well as values that have been rounded to zero. + // + // Implementations MAY consider the zero bucket to have probability + // mass equal to (zero_count / count). + fixed64 zero_count = 7; + + // positive carries the positive range of exponential bucket counts. + Buckets positive = 8; + + // negative carries the negative range of exponential bucket counts. + Buckets negative = 9; + + // Buckets are a set of bucket counts, encoded in a contiguous array + // of counts. + message Buckets { + // Offset is the bucket index of the first entry in the bucket_counts array. + // + // Note: This uses a varint encoding as a simple form of compression. + sint32 offset = 1; + + // bucket_counts is an array of count values, where bucket_counts[i] carries + // the count of the bucket at index (offset+i). bucket_counts[i] is the count + // of values greater than base^(offset+i) and less than or equal to + // base^(offset+i+1). + // + // Note: By contrast, the explicit HistogramDataPoint uses + // fixed64. This field is expected to have many buckets, + // especially zeros, so uint64 has been selected to ensure + // varint encoding. + repeated uint64 bucket_counts = 2; + } + + // Flags that apply to this specific data point. See DataPointFlags + // for the available flags and their meaning. + uint32 flags = 10; + + // (Optional) List of exemplars collected from + // measurements that were used to form the data point + repeated Exemplar exemplars = 11; + + // min is the minimum value over (start_time, end_time]. + optional double min = 12; + + // max is the maximum value over (start_time, end_time]. + optional double max = 13; + + // ZeroThreshold may be optionally set to convey the width of the zero + // region. Where the zero region is defined as the closed interval + // [-ZeroThreshold, ZeroThreshold]. + // When ZeroThreshold is 0, zero count bucket stores values that cannot be + // expressed using the standard exponential formula as well as values that + // have been rounded to zero. + double zero_threshold = 14; +} + +// SummaryDataPoint is a single data point in a timeseries that describes the +// time-varying values of a Summary metric. +message SummaryDataPoint { + reserved 1; + + // The set of key/value pairs that uniquely identify the timeseries from + // where this point belongs. The list may be empty (may contain 0 elements). + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; + + // StartTimeUnixNano is optional but strongly encouraged, see the + // the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 start_time_unix_nano = 2; + + // TimeUnixNano is required, see the detailed comments above Metric. + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 time_unix_nano = 3; + + // count is the number of values in the population. Must be non-negative. + fixed64 count = 4; + + // sum of the values in the population. If count is zero then this field + // must be zero. + // + // Note: Sum should only be filled out when measuring non-negative discrete + // events, and is assumed to be monotonic over the values of these events. + // Negative events *can* be recorded, but sum should not be filled out when + // doing so. This is specifically to enforce compatibility w/ OpenMetrics, + // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary + double sum = 5; + + // Represents the value at a given quantile of a distribution. + // + // To record Min and Max values following conventions are used: + // - The 1.0 quantile is equivalent to the maximum value observed. + // - The 0.0 quantile is equivalent to the minimum value observed. + // + // See the following issue for more context: + // https://github.com/open-telemetry/opentelemetry-proto/issues/125 + message ValueAtQuantile { + // The quantile of a distribution. Must be in the interval + // [0.0, 1.0]. + double quantile = 1; + + // The value at the given quantile of a distribution. + // + // Quantile values must NOT be negative. + double value = 2; + } + + // (Optional) list of values at different quantiles of the distribution calculated + // from the current snapshot. The quantiles must be strictly increasing. + repeated ValueAtQuantile quantile_values = 6; + + // Flags that apply to this specific data point. See DataPointFlags + // for the available flags and their meaning. + uint32 flags = 8; +} + +// A representation of an exemplar, which is a sample input measurement. +// Exemplars also hold information about the environment when the measurement +// was recorded, for example the span and trace ID of the active span when the +// exemplar was recorded. +message Exemplar { + reserved 1; + + // The set of key/value pairs that were filtered out by the aggregator, but + // recorded alongside the original measurement. Only key/value pairs that were + // filtered out by the aggregator should be included + repeated opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7; + + // time_unix_nano is the exact time when this exemplar was recorded + // + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January + // 1970. + fixed64 time_unix_nano = 2; + + // The value of the measurement that was recorded. An exemplar is + // considered invalid when one of the recognized value fields is not present + // inside this oneof. + oneof value { + double as_double = 3; + sfixed64 as_int = 6; + } + + // (Optional) Span ID of the exemplar trace. + // span_id may be missing if the measurement is not recorded inside a trace + // or if the trace is not sampled. + bytes span_id = 4; + + // (Optional) Trace ID of the exemplar trace. + // trace_id may be missing if the measurement is not recorded inside a trace + // or if the trace is not sampled. + bytes trace_id = 5; +} diff --git a/library/cpp/actors/wilson/protos/resource.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto index 752bf287ea..6637560bc3 100644 --- a/library/cpp/actors/wilson/protos/resource.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.proto @@ -16,7 +16,13 @@ syntax = "proto3"; package opentelemetry.proto.resource.v1; -import "library/cpp/actors/wilson/protos/common.proto"; +import "opentelemetry/proto/common/v1/common.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Resource.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.resource.v1"; +option java_outer_classname = "ResourceProto"; +option go_package = "go.opentelemetry.io/proto/otlp/resource/v1"; // Resource information. message Resource { diff --git a/library/cpp/actors/wilson/protos/trace.proto b/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto index 0b645cf8ad..b2869edc42 100644 --- a/library/cpp/actors/wilson/protos/trace.proto +++ b/contrib/libs/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.proto @@ -16,8 +16,14 @@ syntax = "proto3"; package opentelemetry.proto.trace.v1; -import "library/cpp/actors/wilson/protos/common.proto"; -import "library/cpp/actors/wilson/protos/resource.proto"; +import "opentelemetry/proto/common/v1/common.proto"; +import "opentelemetry/proto/resource/v1/resource.proto"; + +option csharp_namespace = "OpenTelemetry.Proto.Trace.V1"; +option java_multiple_files = true; +option java_package = "io.opentelemetry.proto.trace.v1"; +option java_outer_classname = "TraceProto"; +option go_package = "go.opentelemetry.io/proto/otlp/trace/v1"; // TracesData represents the traces data that can be stored in a persistent storage, // OR can be embedded by other protocols that transfer OTLP traces data but do @@ -40,6 +46,8 @@ message TracesData { // A collection of ScopeSpans from a Resource. message ResourceSpans { + reserved 1000; + // The resource for the spans in this message. // If this field is not set then no resource info is known. opentelemetry.proto.resource.v1.Resource resource = 1; @@ -47,35 +55,6 @@ message ResourceSpans { // A list of ScopeSpans that originate from a resource. repeated ScopeSpans scope_spans = 2; - // A list of InstrumentationLibrarySpans that originate from a resource. - // This field is deprecated and will be removed after grace period expires on June 15, 2022. - // - // During the grace period the following rules SHOULD be followed: - // - // For Binary Protobufs - // ==================== - // Binary Protobuf senders SHOULD NOT set instrumentation_library_spans. Instead - // scope_spans SHOULD be set. - // - // Binary Protobuf receivers SHOULD check if instrumentation_library_spans is set - // and scope_spans is not set then the value in instrumentation_library_spans - // SHOULD be used instead by converting InstrumentationLibrarySpans into ScopeSpans. - // If scope_spans is set then instrumentation_library_spans SHOULD be ignored. - // - // For JSON - // ======== - // JSON senders that set instrumentation_library_spans field MAY also set - // scope_spans to carry the same spans, essentially double-publishing the same data. - // Such double-publishing MAY be controlled by a user-settable option. - // If double-publishing is not used then the senders SHOULD set scope_spans and - // SHOULD NOT set instrumentation_library_spans. - // - // JSON receivers SHOULD check if instrumentation_library_spans is set and - // scope_spans is not set then the value in instrumentation_library_spans - // SHOULD be used instead by converting InstrumentationLibrarySpans into ScopeSpans. - // If scope_spans is set then instrumentation_library_spans field SHOULD be ignored. - repeated InstrumentationLibrarySpans instrumentation_library_spans = 1000 [deprecated = true]; - // This schema_url applies to the data in the "resource" field. It does not apply // to the data in the "scope_spans" field which have their own schema_url field. string schema_url = 3; @@ -95,51 +74,22 @@ message ScopeSpans { string schema_url = 3; } -// A collection of Spans produced by an InstrumentationLibrary. -// InstrumentationLibrarySpans is wire-compatible with ScopeSpans for binary -// Protobuf format. -// This message is deprecated and will be removed on June 15, 2022. -message InstrumentationLibrarySpans { - option deprecated = true; - - // The instrumentation library information for the spans in this message. - // Semantically when InstrumentationLibrary isn't set, it is equivalent with - // an empty instrumentation library name (unknown). - opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1; - - // A list of Spans that originate from an instrumentation library. - repeated Span spans = 2; - - // This schema_url applies to all spans and span events in the "spans" field. - string schema_url = 3; -} - -// Span represents a single operation within a trace. Spans can be -// nested to form a trace tree. Spans may also be linked to other spans -// from the same or different trace and form graphs. Often, a trace -// contains a root span that describes the end-to-end latency, and one -// or more subspans for its sub-operations. A trace can also contain -// multiple root spans, or none at all. Spans do not need to be -// contiguous - there may be gaps or overlaps between spans in a trace. +// A Span represents a single operation performed by a single component of the system. // // The next available field id is 17. message Span { // A unique identifier for a trace. All spans from the same trace share - // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes - // is considered invalid. - // - // This field is semantically required. Receiver should generate new - // random trace_id if empty or invalid trace_id was received. + // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR + // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON + // is zero-length and thus is also invalid). // // This field is required. bytes trace_id = 1; // A unique identifier for a span within a trace, assigned when the span - // is created. The ID is an 8-byte array. An ID with all zeroes is considered - // invalid. - // - // This field is semantically required. Receiver should generate new - // random span_id if empty or invalid span_id was received. + // is created. The ID is an 8-byte array. An ID with all zeroes OR of length + // other than 8 bytes is considered invalid (empty string in OTLP/JSON + // is zero-length and thus is also invalid). // // This field is required. bytes span_id = 2; @@ -222,11 +172,11 @@ message Span { // // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" // "/http/server_latency": 300 - // "abc.com/myattribute": true - // "abc.com/score": 10.239 + // "example.com/myattribute": true + // "example.com/score": 10.239 // // The OpenTelemetry API specification further restricts the allowed value types: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/common.md#attributes + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; @@ -314,8 +264,8 @@ message Status { enum StatusCode { // The default status. STATUS_CODE_UNSET = 0; - // The Span has been validated by an Application developers or Operator to have - // completed successfully. + // The Span has been validated by an Application developer or Operator to + // have completed successfully. STATUS_CODE_OK = 1; // The Span contains an error. STATUS_CODE_ERROR = 2; diff --git a/contrib/libs/opentelemetry-proto/ya.make b/contrib/libs/opentelemetry-proto/ya.make new file mode 100644 index 0000000000..84c5759554 --- /dev/null +++ b/contrib/libs/opentelemetry-proto/ya.make @@ -0,0 +1,35 @@ +# Generated by devtools/yamaker from nixpkgs 22.11. + +PROTO_LIBRARY() + +LICENSE(Apache-2.0) + +LICENSE_TEXTS(.yandex_meta/licenses.list.txt) + +VERSION(1.0.0) + +ORIGINAL_SOURCE(https://github.com/open-telemetry/opentelemetry-proto/archive/v1.0.0.tar.gz) + +PY_NAMESPACE(.) + +PROTO_NAMESPACE( + GLOBAL + contrib/libs/opentelemetry-proto +) + +GRPC() + +SRCS( + opentelemetry/proto/collector/logs/v1/logs_service.proto + opentelemetry/proto/collector/metrics/v1/metrics_service.proto + opentelemetry/proto/collector/trace/v1/trace_service.proto + opentelemetry/proto/common/v1/common.proto + opentelemetry/proto/logs/v1/logs.proto + opentelemetry/proto/metrics/v1/metrics.proto + opentelemetry/proto/resource/v1/resource.proto + opentelemetry/proto/trace/v1/trace.proto +) + +EXCLUDE_TAGS(GO_PROTO) + +END() diff --git a/library/cpp/actors/examples/02_discovery/CMakeLists.darwin-x86_64.txt b/library/cpp/actors/examples/02_discovery/CMakeLists.darwin-x86_64.txt index 6d3a2ddc54..1003ca94c5 100644 --- a/library/cpp/actors/examples/02_discovery/CMakeLists.darwin-x86_64.txt +++ b/library/cpp/actors/examples/02_discovery/CMakeLists.darwin-x86_64.txt @@ -56,6 +56,7 @@ target_proto_addincls(example_02_discovery ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src ) diff --git a/library/cpp/actors/examples/02_discovery/CMakeLists.linux-aarch64.txt b/library/cpp/actors/examples/02_discovery/CMakeLists.linux-aarch64.txt index 8bfd344301..564892d9f7 100644 --- a/library/cpp/actors/examples/02_discovery/CMakeLists.linux-aarch64.txt +++ b/library/cpp/actors/examples/02_discovery/CMakeLists.linux-aarch64.txt @@ -59,6 +59,7 @@ target_proto_addincls(example_02_discovery ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src ) diff --git a/library/cpp/actors/examples/02_discovery/CMakeLists.linux-x86_64.txt b/library/cpp/actors/examples/02_discovery/CMakeLists.linux-x86_64.txt index 34d2610a7d..aed3404cb8 100644 --- a/library/cpp/actors/examples/02_discovery/CMakeLists.linux-x86_64.txt +++ b/library/cpp/actors/examples/02_discovery/CMakeLists.linux-x86_64.txt @@ -60,6 +60,7 @@ target_proto_addincls(example_02_discovery ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src ) diff --git a/library/cpp/actors/examples/02_discovery/CMakeLists.windows-x86_64.txt b/library/cpp/actors/examples/02_discovery/CMakeLists.windows-x86_64.txt index 2168520e19..6bf59ae8c9 100644 --- a/library/cpp/actors/examples/02_discovery/CMakeLists.windows-x86_64.txt +++ b/library/cpp/actors/examples/02_discovery/CMakeLists.windows-x86_64.txt @@ -49,6 +49,7 @@ target_proto_addincls(example_02_discovery ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src ) diff --git a/library/cpp/actors/wilson/protos/CMakeLists.darwin-x86_64.txt b/library/cpp/actors/wilson/protos/CMakeLists.darwin-x86_64.txt index 5e21c8ffc3..92afc01bb4 100644 --- a/library/cpp/actors/wilson/protos/CMakeLists.darwin-x86_64.txt +++ b/library/cpp/actors/wilson/protos/CMakeLists.darwin-x86_64.txt @@ -6,91 +6,10 @@ # original buildsystem will not be accepted. -get_built_tool_path( - TOOL_grpc_cpp_bin - TOOL_grpc_cpp_dependency - contrib/tools/protoc/plugins/grpc_cpp - grpc_cpp -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -add_library(actors-wilson-protos) -set_property(TARGET actors-wilson-protos PROPERTY - PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h -) -target_link_libraries(actors-wilson-protos PUBLIC +add_library(actors-wilson-protos INTERFACE) +target_link_libraries(actors-wilson-protos INTERFACE contrib-libs-cxxsupp yutil - contrib-libs-grpc - contrib-libs-protobuf -) -target_proto_messages(actors-wilson-protos PRIVATE - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/common.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/resource.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/service.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/trace.proto -) -target_proto_addincls(actors-wilson-protos - ./ - ${CMAKE_SOURCE_DIR}/ - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src -) -target_proto_outs(actors-wilson-protos - --cpp_out=${CMAKE_BINARY_DIR}/ - --cpp_styleguide_out=${CMAKE_BINARY_DIR}/ -) -target_proto_plugin(actors-wilson-protos - grpc_cpp - grpc_cpp + contrib-libs-opentelemetry-proto ) diff --git a/library/cpp/actors/wilson/protos/CMakeLists.linux-aarch64.txt b/library/cpp/actors/wilson/protos/CMakeLists.linux-aarch64.txt index d12c55767a..101316f4fc 100644 --- a/library/cpp/actors/wilson/protos/CMakeLists.linux-aarch64.txt +++ b/library/cpp/actors/wilson/protos/CMakeLists.linux-aarch64.txt @@ -6,92 +6,11 @@ # original buildsystem will not be accepted. -get_built_tool_path( - TOOL_grpc_cpp_bin - TOOL_grpc_cpp_dependency - contrib/tools/protoc/plugins/grpc_cpp - grpc_cpp -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -add_library(actors-wilson-protos) -set_property(TARGET actors-wilson-protos PROPERTY - PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h -) -target_link_libraries(actors-wilson-protos PUBLIC +add_library(actors-wilson-protos INTERFACE) +target_link_libraries(actors-wilson-protos INTERFACE contrib-libs-linux-headers contrib-libs-cxxsupp yutil - contrib-libs-grpc - contrib-libs-protobuf -) -target_proto_messages(actors-wilson-protos PRIVATE - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/common.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/resource.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/service.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/trace.proto -) -target_proto_addincls(actors-wilson-protos - ./ - ${CMAKE_SOURCE_DIR}/ - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src -) -target_proto_outs(actors-wilson-protos - --cpp_out=${CMAKE_BINARY_DIR}/ - --cpp_styleguide_out=${CMAKE_BINARY_DIR}/ -) -target_proto_plugin(actors-wilson-protos - grpc_cpp - grpc_cpp + contrib-libs-opentelemetry-proto ) diff --git a/library/cpp/actors/wilson/protos/CMakeLists.linux-x86_64.txt b/library/cpp/actors/wilson/protos/CMakeLists.linux-x86_64.txt index d12c55767a..101316f4fc 100644 --- a/library/cpp/actors/wilson/protos/CMakeLists.linux-x86_64.txt +++ b/library/cpp/actors/wilson/protos/CMakeLists.linux-x86_64.txt @@ -6,92 +6,11 @@ # original buildsystem will not be accepted. -get_built_tool_path( - TOOL_grpc_cpp_bin - TOOL_grpc_cpp_dependency - contrib/tools/protoc/plugins/grpc_cpp - grpc_cpp -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -add_library(actors-wilson-protos) -set_property(TARGET actors-wilson-protos PROPERTY - PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h -) -target_link_libraries(actors-wilson-protos PUBLIC +add_library(actors-wilson-protos INTERFACE) +target_link_libraries(actors-wilson-protos INTERFACE contrib-libs-linux-headers contrib-libs-cxxsupp yutil - contrib-libs-grpc - contrib-libs-protobuf -) -target_proto_messages(actors-wilson-protos PRIVATE - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/common.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/resource.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/service.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/trace.proto -) -target_proto_addincls(actors-wilson-protos - ./ - ${CMAKE_SOURCE_DIR}/ - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src -) -target_proto_outs(actors-wilson-protos - --cpp_out=${CMAKE_BINARY_DIR}/ - --cpp_styleguide_out=${CMAKE_BINARY_DIR}/ -) -target_proto_plugin(actors-wilson-protos - grpc_cpp - grpc_cpp + contrib-libs-opentelemetry-proto ) diff --git a/library/cpp/actors/wilson/protos/CMakeLists.windows-x86_64.txt b/library/cpp/actors/wilson/protos/CMakeLists.windows-x86_64.txt index 5e21c8ffc3..92afc01bb4 100644 --- a/library/cpp/actors/wilson/protos/CMakeLists.windows-x86_64.txt +++ b/library/cpp/actors/wilson/protos/CMakeLists.windows-x86_64.txt @@ -6,91 +6,10 @@ # original buildsystem will not be accepted. -get_built_tool_path( - TOOL_grpc_cpp_bin - TOOL_grpc_cpp_dependency - contrib/tools/protoc/plugins/grpc_cpp - grpc_cpp -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -get_built_tool_path( - TOOL_protoc_bin - TOOL_protoc_dependency - contrib/tools/protoc/bin - protoc -) -get_built_tool_path( - TOOL_cpp_styleguide_bin - TOOL_cpp_styleguide_dependency - contrib/tools/protoc/plugins/cpp_styleguide - cpp_styleguide -) -add_library(actors-wilson-protos) -set_property(TARGET actors-wilson-protos PROPERTY - PROTOC_EXTRA_OUTS .grpc.pb.cc .grpc.pb.h -) -target_link_libraries(actors-wilson-protos PUBLIC +add_library(actors-wilson-protos INTERFACE) +target_link_libraries(actors-wilson-protos INTERFACE contrib-libs-cxxsupp yutil - contrib-libs-grpc - contrib-libs-protobuf -) -target_proto_messages(actors-wilson-protos PRIVATE - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/common.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/resource.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/service.proto - ${CMAKE_SOURCE_DIR}/library/cpp/actors/wilson/protos/trace.proto -) -target_proto_addincls(actors-wilson-protos - ./ - ${CMAKE_SOURCE_DIR}/ - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src -) -target_proto_outs(actors-wilson-protos - --cpp_out=${CMAKE_BINARY_DIR}/ - --cpp_styleguide_out=${CMAKE_BINARY_DIR}/ -) -target_proto_plugin(actors-wilson-protos - grpc_cpp - grpc_cpp + contrib-libs-opentelemetry-proto ) diff --git a/library/cpp/actors/wilson/protos/service.proto b/library/cpp/actors/wilson/protos/service.proto deleted file mode 100644 index 7a40af39c8..0000000000 --- a/library/cpp/actors/wilson/protos/service.proto +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2019, 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.trace.v1; - -import "library/cpp/actors/wilson/protos/trace.proto"; - -// Service that can be used to push spans between one Application instrumented with -// OpenTelemetry and a collector, or between a collector and a central collector (in this -// case spans are sent/received to/from multiple Applications). -service TraceService { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - rpc Export(ExportTraceServiceRequest) returns (ExportTraceServiceResponse) {} -} - -message ExportTraceServiceRequest { - // An array of ResourceSpans. - // 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.trace.v1.ResourceSpans resource_spans = 1; -} - -message ExportTraceServiceResponse { -} diff --git a/library/cpp/actors/wilson/protos/ya.make b/library/cpp/actors/wilson/protos/ya.make index 9a756e8da0..e9db290efd 100644 --- a/library/cpp/actors/wilson/protos/ya.make +++ b/library/cpp/actors/wilson/protos/ya.make @@ -1,12 +1,7 @@ PROTO_LIBRARY() - GRPC() - - SRCS( - common.proto - resource.proto - service.proto - trace.proto + PEERDIR( + contrib/libs/opentelemetry-proto ) EXCLUDE_TAGS( diff --git a/library/cpp/actors/wilson/wilson_span.h b/library/cpp/actors/wilson/wilson_span.h index d470c02c0e..bf9b5bcf61 100644 --- a/library/cpp/actors/wilson/wilson_span.h +++ b/library/cpp/actors/wilson/wilson_span.h @@ -2,7 +2,7 @@ #include <library/cpp/actors/core/actor.h> #include <library/cpp/actors/core/actorsystem.h> -#include <library/cpp/actors/wilson/protos/trace.pb.h> +#include <opentelemetry/proto/trace/v1/trace.pb.h> #include <util/generic/hash.h> #include <util/datetime/cputimer.h> diff --git a/library/cpp/actors/wilson/wilson_uploader.cpp b/library/cpp/actors/wilson/wilson_uploader.cpp index 3a08eb4205..2390d5a376 100644 --- a/library/cpp/actors/wilson/wilson_uploader.cpp +++ b/library/cpp/actors/wilson/wilson_uploader.cpp @@ -2,8 +2,8 @@ #include <library/cpp/actors/core/actor_bootstrapped.h> #include <library/cpp/actors/core/hfunc.h> #include <library/cpp/actors/core/log.h> -#include <library/cpp/actors/wilson/protos/service.pb.h> -#include <library/cpp/actors/wilson/protos/service.grpc.pb.h> +#include <opentelemetry/proto/collector/trace/v1/trace_service.pb.h> +#include <opentelemetry/proto/collector/trace/v1/trace_service.grpc.pb.h> #include <util/stream/file.h> #include <util/string/hex.h> #include <grpc++/grpc++.h> diff --git a/library/cpp/actors/wilson/wilson_uploader.h b/library/cpp/actors/wilson/wilson_uploader.h index bc02fc1aaa..86c23ccefe 100644 --- a/library/cpp/actors/wilson/wilson_uploader.h +++ b/library/cpp/actors/wilson/wilson_uploader.h @@ -3,7 +3,7 @@ #include <library/cpp/actors/core/actor.h> #include <library/cpp/actors/core/event_local.h> #include <library/cpp/actors/core/events.h> -#include <library/cpp/actors/wilson/protos/trace.pb.h> +#include <opentelemetry/proto/trace/v1/trace.pb.h> namespace NWilson { diff --git a/ydb/core/tablet_flat/CMakeLists.darwin-x86_64.txt b/ydb/core/tablet_flat/CMakeLists.darwin-x86_64.txt index 1efa4f738a..530d862a82 100644 --- a/ydb/core/tablet_flat/CMakeLists.darwin-x86_64.txt +++ b/ydb/core/tablet_flat/CMakeLists.darwin-x86_64.txt @@ -165,6 +165,7 @@ target_proto_addincls(ydb-core-tablet_flat ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src ) diff --git a/ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt b/ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt index e7ee474cc4..86c314f302 100644 --- a/ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt +++ b/ydb/core/tablet_flat/CMakeLists.linux-aarch64.txt @@ -166,6 +166,7 @@ target_proto_addincls(ydb-core-tablet_flat ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src ) diff --git a/ydb/core/tablet_flat/CMakeLists.linux-x86_64.txt b/ydb/core/tablet_flat/CMakeLists.linux-x86_64.txt index e7ee474cc4..86c314f302 100644 --- a/ydb/core/tablet_flat/CMakeLists.linux-x86_64.txt +++ b/ydb/core/tablet_flat/CMakeLists.linux-x86_64.txt @@ -166,6 +166,7 @@ target_proto_addincls(ydb-core-tablet_flat ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src ) diff --git a/ydb/core/tablet_flat/CMakeLists.windows-x86_64.txt b/ydb/core/tablet_flat/CMakeLists.windows-x86_64.txt index 1efa4f738a..530d862a82 100644 --- a/ydb/core/tablet_flat/CMakeLists.windows-x86_64.txt +++ b/ydb/core/tablet_flat/CMakeLists.windows-x86_64.txt @@ -165,6 +165,7 @@ target_proto_addincls(ydb-core-tablet_flat ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src + ${CMAKE_SOURCE_DIR}/contrib/libs/opentelemetry-proto ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/contrib/libs/protobuf/src ) |