couchbase 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/ext/CMakeLists.txt +4 -1
- data/ext/cache/extconf_include.rb +4 -3
- data/ext/cache/mozilla-ca-bundle.crt +66 -93
- data/ext/cache/mozilla-ca-bundle.sha256 +1 -1
- data/ext/couchbase/CMakeLists.txt +24 -11
- data/ext/couchbase/cmake/APKBUILD.in +17 -1
- data/ext/couchbase/cmake/Bundler.cmake +9 -1
- data/ext/couchbase/cmake/Cache.cmake +48 -19
- data/ext/couchbase/cmake/CompilerOptions.cmake +3 -1
- data/ext/couchbase/cmake/OpenSSL.cmake +10 -2
- data/ext/couchbase/cmake/Packaging.cmake +48 -8
- data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +43 -1
- data/ext/couchbase/cmake/build_config.hxx.in +2 -0
- data/ext/couchbase/cmake/couchbase-cxx-client.spec.in +18 -0
- data/ext/couchbase/cmake/tarball_glob.txt +10 -0
- data/ext/couchbase/core/app_telemetry_meter.cxx +1 -0
- data/ext/couchbase/core/app_telemetry_reporter.cxx +45 -43
- data/ext/couchbase/core/app_telemetry_reporter.hxx +4 -3
- data/ext/couchbase/core/bucket.cxx +128 -13
- data/ext/couchbase/core/bucket.hxx +12 -2
- data/ext/couchbase/core/cluster.cxx +304 -152
- data/ext/couchbase/core/cluster.hxx +32 -0
- data/ext/couchbase/core/cluster_credentials.cxx +25 -0
- data/ext/couchbase/core/cluster_credentials.hxx +5 -0
- data/ext/couchbase/core/cluster_label_listener.cxx +72 -0
- data/ext/couchbase/core/cluster_label_listener.hxx +46 -0
- data/ext/couchbase/core/cluster_options.hxx +4 -0
- data/ext/couchbase/core/deprecation_utils.hxx +26 -0
- data/ext/couchbase/core/error.hxx +27 -0
- data/ext/couchbase/core/free_form_http_request.hxx +0 -2
- data/ext/couchbase/core/http_component.cxx +12 -48
- data/ext/couchbase/core/impl/analytics.cxx +3 -2
- data/ext/couchbase/core/impl/analytics.hxx +2 -1
- data/ext/couchbase/core/impl/analytics_index_manager.cxx +249 -137
- data/ext/couchbase/core/impl/binary_collection.cxx +134 -58
- data/ext/couchbase/core/impl/bucket_manager.cxx +87 -35
- data/ext/couchbase/core/impl/collection.cxx +560 -245
- data/ext/couchbase/core/impl/collection_manager.cxx +89 -49
- data/ext/couchbase/core/impl/dns_srv_tracker.cxx +4 -4
- data/ext/couchbase/core/impl/error.cxx +20 -13
- data/ext/couchbase/core/impl/error.hxx +15 -10
- data/ext/couchbase/core/impl/get_all_replicas.hxx +1 -1
- data/ext/couchbase/core/impl/get_any_replica.hxx +2 -1
- data/ext/couchbase/core/impl/get_replica.hxx +2 -0
- data/ext/couchbase/core/impl/lookup_in_replica.hxx +1 -1
- data/ext/couchbase/core/impl/observability_recorder.cxx +161 -0
- data/ext/couchbase/core/impl/observability_recorder.hxx +77 -0
- data/ext/couchbase/core/impl/observe_seqno.hxx +2 -0
- data/ext/couchbase/core/impl/public_bucket.cxx +31 -7
- data/ext/couchbase/core/impl/public_cluster.cxx +107 -19
- data/ext/couchbase/core/impl/query.cxx +6 -3
- data/ext/couchbase/core/impl/query.hxx +3 -1
- data/ext/couchbase/core/impl/query_index_manager.cxx +267 -102
- data/ext/couchbase/core/impl/scope.cxx +53 -11
- data/ext/couchbase/core/impl/search.cxx +8 -4
- data/ext/couchbase/core/impl/search.hxx +6 -2
- data/ext/couchbase/core/impl/search_index_manager.cxx +131 -41
- data/ext/couchbase/core/impl/with_cancellation.hxx +75 -0
- data/ext/couchbase/core/io/config_tracker.cxx +9 -9
- data/ext/couchbase/core/io/config_tracker.hxx +2 -1
- data/ext/couchbase/core/io/http_command.hxx +98 -49
- data/ext/couchbase/core/io/http_context.hxx +2 -0
- data/ext/couchbase/core/io/http_session.cxx +23 -10
- data/ext/couchbase/core/io/http_session.hxx +17 -9
- data/ext/couchbase/core/io/http_session_manager.hxx +163 -228
- data/ext/couchbase/core/io/http_traits.hxx +0 -7
- data/ext/couchbase/core/io/mcbp_command.hxx +123 -44
- data/ext/couchbase/core/io/mcbp_session.cxx +251 -26
- data/ext/couchbase/core/io/mcbp_session.hxx +9 -1
- data/ext/couchbase/core/io/mcbp_traits.hxx +0 -8
- data/ext/couchbase/core/io/streams.cxx +3 -3
- data/ext/couchbase/core/io/streams.hxx +3 -2
- data/ext/couchbase/core/meta/features.hxx +15 -0
- data/ext/couchbase/core/meta/version.cxx +13 -0
- data/ext/couchbase/core/meta/version.hxx +3 -0
- data/ext/couchbase/core/metrics/constants.hxx +23 -0
- data/ext/couchbase/core/metrics/logging_meter.cxx +5 -5
- data/ext/couchbase/core/metrics/meter_wrapper.cxx +65 -63
- data/ext/couchbase/core/metrics/meter_wrapper.hxx +12 -10
- data/ext/couchbase/core/operations/document_analytics.hxx +0 -5
- data/ext/couchbase/core/operations/document_append.hxx +0 -4
- data/ext/couchbase/core/operations/document_decrement.hxx +0 -5
- data/ext/couchbase/core/operations/document_exists.hxx +0 -7
- data/ext/couchbase/core/operations/document_get.hxx +0 -7
- data/ext/couchbase/core/operations/document_get_all_replicas.hxx +77 -27
- data/ext/couchbase/core/operations/document_get_and_lock.hxx +0 -9
- data/ext/couchbase/core/operations/document_get_and_touch.hxx +0 -9
- data/ext/couchbase/core/operations/document_get_any_replica.hxx +83 -2
- data/ext/couchbase/core/operations/document_get_projected.hxx +0 -9
- data/ext/couchbase/core/operations/document_increment.hxx +0 -5
- data/ext/couchbase/core/operations/document_insert.hxx +0 -4
- data/ext/couchbase/core/operations/document_lookup_in.hxx +0 -9
- data/ext/couchbase/core/operations/document_lookup_in_all_replicas.hxx +46 -4
- data/ext/couchbase/core/operations/document_lookup_in_any_replica.hxx +121 -43
- data/ext/couchbase/core/operations/document_mutate_in.hxx +0 -5
- data/ext/couchbase/core/operations/document_prepend.hxx +0 -4
- data/ext/couchbase/core/operations/document_query.hxx +0 -4
- data/ext/couchbase/core/operations/document_remove.hxx +0 -4
- data/ext/couchbase/core/operations/document_replace.hxx +0 -4
- data/ext/couchbase/core/operations/document_search.hxx +0 -7
- data/ext/couchbase/core/operations/document_touch.hxx +0 -7
- data/ext/couchbase/core/operations/document_unlock.hxx +0 -6
- data/ext/couchbase/core/operations/document_upsert.hxx +0 -4
- data/ext/couchbase/core/operations/document_view.cxx +2 -0
- data/ext/couchbase/core/operations/document_view.hxx +10 -13
- data/ext/couchbase/core/operations/http_noop.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_dataset_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_dataset_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_dataset_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_dataverse_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_dataverse_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_index_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_index_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_index_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_link_connect.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_link_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_link_disconnect.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_link_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_link_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_link_replace.hxx +2 -0
- data/ext/couchbase/core/operations/management/bucket_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/bucket_describe.hxx +2 -0
- data/ext/couchbase/core/operations/management/bucket_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/bucket_flush.hxx +2 -0
- data/ext/couchbase/core/operations/management/bucket_get.hxx +2 -0
- data/ext/couchbase/core/operations/management/bucket_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/bucket_update.hxx +2 -0
- data/ext/couchbase/core/operations/management/change_password.hxx +2 -0
- data/ext/couchbase/core/operations/management/cluster_describe.hxx +2 -0
- data/ext/couchbase/core/operations/management/cluster_developer_preview_enable.hxx +2 -0
- data/ext/couchbase/core/operations/management/collection_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/collection_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/collection_update.hxx +2 -0
- data/ext/couchbase/core/operations/management/collections_manifest_get.hxx +2 -0
- data/ext/couchbase/core/operations/management/error_utils.cxx +4 -1
- data/ext/couchbase/core/operations/management/eventing_deploy_function.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_drop_function.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_get_all_functions.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_get_function.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_get_status.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_pause_function.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_resume_function.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_undeploy_function.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_upsert_function.hxx +2 -0
- data/ext/couchbase/core/operations/management/freeform.hxx +2 -0
- data/ext/couchbase/core/operations/management/group_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/group_get.hxx +2 -0
- data/ext/couchbase/core/operations/management/group_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/group_upsert.hxx +2 -0
- data/ext/couchbase/core/operations/management/query_index_build.hxx +2 -0
- data/ext/couchbase/core/operations/management/query_index_build_deferred.hxx +68 -30
- data/ext/couchbase/core/operations/management/query_index_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/query_index_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/query_index_get_all.hxx +4 -3
- data/ext/couchbase/core/operations/management/query_index_get_all_deferred.hxx +2 -1
- data/ext/couchbase/core/operations/management/role_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/scope_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/scope_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/scope_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_get_stats.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_analyze_document.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_control_ingest.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_control_plan_freeze.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_control_query.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_get.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_get_documents_count.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_get_stats.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_upsert.hxx +2 -0
- data/ext/couchbase/core/operations/management/user_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/user_get.hxx +2 -0
- data/ext/couchbase/core/operations/management/user_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/user_upsert.hxx +2 -0
- data/ext/couchbase/core/operations/management/view_index_drop.hxx +2 -0
- data/ext/couchbase/core/operations/management/view_index_get.hxx +2 -0
- data/ext/couchbase/core/operations/management/view_index_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/view_index_upsert.hxx +2 -0
- data/ext/couchbase/core/operations/operation_traits.hxx +6 -0
- data/ext/couchbase/core/operations.hxx +0 -1
- data/ext/couchbase/core/operations_fwd.hxx +8 -0
- data/ext/couchbase/core/origin.cxx +67 -12
- data/ext/couchbase/core/origin.hxx +13 -8
- data/ext/couchbase/core/orphan_reporter.cxx +164 -0
- data/ext/couchbase/core/orphan_reporter.hxx +65 -0
- data/ext/couchbase/core/sasl/CMakeLists.txt +1 -0
- data/ext/couchbase/core/sasl/client.cc +6 -0
- data/ext/couchbase/core/sasl/mechanism.cc +2 -1
- data/ext/couchbase/core/sasl/mechanism.h +2 -1
- data/ext/couchbase/core/sasl/oauthbearer/oauthbearer.cc +41 -0
- data/ext/couchbase/core/sasl/oauthbearer/oauthbearer.h +47 -0
- data/ext/couchbase/core/tls_context_provider.cxx +44 -0
- data/ext/couchbase/core/tls_context_provider.hxx +44 -0
- data/ext/couchbase/core/tracing/attribute_helpers.hxx +45 -0
- data/ext/couchbase/core/tracing/constants.hxx +148 -68
- data/ext/couchbase/core/tracing/threshold_logging_options.hxx +0 -3
- data/ext/couchbase/core/tracing/threshold_logging_tracer.cxx +122 -170
- data/ext/couchbase/core/tracing/tracer_wrapper.cxx +17 -24
- data/ext/couchbase/core/tracing/tracer_wrapper.hxx +8 -10
- data/ext/couchbase/core/tracing/wrapper_sdk_tracer.cxx +114 -0
- data/ext/couchbase/core/tracing/wrapper_sdk_tracer.hxx +85 -0
- data/ext/couchbase/core/transactions/attempt_context_impl.cxx +16 -14
- data/ext/couchbase/core/transactions/attempt_context_impl.hxx +4 -4
- data/ext/couchbase/core/transactions/transactions.cxx +1 -1
- data/ext/couchbase/core/transactions/transactions_cleanup.cxx +1 -2
- data/ext/couchbase/core/utils/byteswap.hxx +12 -0
- data/ext/couchbase/core/utils/concurrent_fixed_priority_queue.hxx +102 -0
- data/ext/couchbase/core/utils/connection_string.cxx +2 -0
- data/ext/couchbase/couchbase/certificate_authenticator.hxx +1 -0
- data/ext/couchbase/couchbase/cluster.hxx +47 -0
- data/ext/couchbase/couchbase/cluster_options.hxx +16 -0
- data/ext/couchbase/couchbase/collection.hxx +60 -15
- data/ext/couchbase/couchbase/error_codes.hxx +48 -48
- data/ext/couchbase/couchbase/jwt_authenticator.hxx +52 -0
- data/ext/couchbase/couchbase/metrics/meter.hxx +2 -1
- data/ext/couchbase/couchbase/metrics/otel_meter.hxx +75 -80
- data/ext/couchbase/couchbase/network_options.hxx +19 -0
- data/ext/couchbase/couchbase/password_authenticator.hxx +1 -0
- data/ext/couchbase/couchbase/tracing/otel_tracer.hxx +15 -17
- data/ext/couchbase/couchbase/tracing/request_span.hxx +2 -2
- data/ext/couchbase.cxx +4 -0
- data/ext/extconf.rb +1 -0
- data/ext/rcb_analytics.cxx +157 -47
- data/ext/rcb_backend.cxx +118 -71
- data/ext/rcb_buckets.cxx +39 -16
- data/ext/rcb_collections.cxx +36 -12
- data/ext/rcb_crud.cxx +587 -294
- data/ext/rcb_hdr_histogram.cxx +219 -0
- data/ext/rcb_hdr_histogram.hxx +28 -0
- data/ext/rcb_multi.cxx +142 -59
- data/ext/rcb_observability.cxx +132 -0
- data/ext/rcb_observability.hxx +49 -0
- data/ext/rcb_query.cxx +77 -27
- data/ext/rcb_search.cxx +92 -31
- data/ext/rcb_users.cxx +69 -26
- data/ext/rcb_utils.cxx +91 -0
- data/ext/rcb_utils.hxx +141 -168
- data/ext/rcb_views.cxx +36 -12
- data/lib/active_support/cache/couchbase_store.rb +6 -6
- data/lib/couchbase/authenticator.rb +14 -0
- data/lib/couchbase/binary_collection.rb +37 -22
- data/lib/couchbase/bucket.rb +46 -31
- data/lib/couchbase/cluster.rb +146 -61
- data/lib/couchbase/collection.rb +257 -186
- data/lib/couchbase/datastructures/couchbase_list.rb +81 -50
- data/lib/couchbase/datastructures/couchbase_map.rb +86 -50
- data/lib/couchbase/datastructures/couchbase_queue.rb +64 -38
- data/lib/couchbase/datastructures/couchbase_set.rb +57 -41
- data/lib/couchbase/deprecations.rb +1 -1
- data/lib/couchbase/diagnostics.rb +8 -8
- data/lib/couchbase/errors.rb +6 -0
- data/lib/couchbase/management/analytics_index_manager.rb +90 -59
- data/lib/couchbase/management/bucket_manager.rb +73 -45
- data/lib/couchbase/management/collection_manager.rb +86 -43
- data/lib/couchbase/management/collection_query_index_manager.rb +56 -33
- data/lib/couchbase/management/query_index_manager.rb +88 -36
- data/lib/couchbase/management/scope_search_index_manager.rb +119 -52
- data/lib/couchbase/management/search_index_manager.rb +401 -178
- data/lib/couchbase/management/user_manager.rb +343 -174
- data/lib/couchbase/management/view_index_manager.rb +166 -73
- data/lib/couchbase/metrics/logging_meter.rb +108 -0
- data/lib/couchbase/metrics/logging_value_recorder.rb +50 -0
- data/lib/couchbase/metrics/meter.rb +27 -0
- data/lib/couchbase/metrics/noop_meter.rb +30 -0
- data/lib/couchbase/metrics/noop_value_recorder.rb +27 -0
- data/lib/couchbase/metrics/value_recorder.rb +25 -0
- data/lib/couchbase/options.rb +69 -3
- data/lib/couchbase/protostellar/cluster.rb +3 -0
- data/lib/couchbase/scope.rb +62 -48
- data/lib/couchbase/search_options.rb +18 -18
- data/lib/couchbase/tracing/noop_span.rb +29 -0
- data/lib/couchbase/tracing/noop_tracer.rb +29 -0
- data/lib/couchbase/tracing/request_span.rb +34 -0
- data/lib/couchbase/tracing/request_tracer.rb +28 -0
- data/lib/couchbase/tracing/threshold_logging_span.rb +112 -0
- data/lib/couchbase/tracing/threshold_logging_tracer.rb +231 -0
- data/lib/couchbase/utils/hdr_histogram.rb +55 -0
- data/lib/couchbase/utils/observability.rb +257 -0
- data/lib/couchbase/utils/observability_constants.rb +200 -0
- data/lib/couchbase/utils/stdlib_logger_adapter.rb +1 -3
- data/lib/couchbase/version.rb +1 -1
- data/lib/couchbase.rb +2 -2
- metadata +58 -6
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
#include "core/cluster.hxx"
|
|
19
19
|
#include "core/impl/error.hxx"
|
|
20
|
+
#include "core/impl/observability_recorder.hxx"
|
|
20
21
|
#include "core/logger/logger.hxx"
|
|
21
|
-
|
|
22
22
|
#include "core/management/analytics_link_azure_blob_external.hxx"
|
|
23
23
|
#include "core/management/analytics_link_couchbase_remote.hxx"
|
|
24
24
|
#include "core/management/analytics_link_s3_external.hxx"
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
#include "core/operations/management/analytics_link_drop.hxx"
|
|
38
38
|
#include "core/operations/management/analytics_link_get_all.hxx"
|
|
39
39
|
#include "core/operations/management/analytics_link_replace.hxx"
|
|
40
|
+
#include "core/tracing/constants.hxx"
|
|
41
|
+
#include "core/tracing/tracer_wrapper.hxx"
|
|
40
42
|
|
|
41
43
|
#include <couchbase/analytics_index_manager.hxx>
|
|
42
44
|
#include <couchbase/connect_link_analytics_options.hxx>
|
|
@@ -152,32 +154,35 @@ public:
|
|
|
152
154
|
const create_dataverse_analytics_options::built& options,
|
|
153
155
|
create_dataverse_analytics_handler&& handler) const
|
|
154
156
|
{
|
|
155
|
-
|
|
156
|
-
core::
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
157
|
+
auto obs_rec = create_observability_recorder(
|
|
158
|
+
core::tracing::operation::mgr_analytics_create_dataverse, options.parent_span);
|
|
159
|
+
|
|
160
|
+
core::operations::management::analytics_dataverse_create_request request{
|
|
161
|
+
dataverse_name, options.ignore_if_exists, {}, options.timeout, obs_rec->operation_span(),
|
|
162
|
+
};
|
|
163
|
+
return core_.execute(std::move(request),
|
|
164
|
+
[dataverse_name,
|
|
165
|
+
obs_rec = std::move(obs_rec),
|
|
166
|
+
handler = std::move(handler)](const auto& resp) {
|
|
167
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
168
|
+
handler(core::impl::make_error(resp.ctx));
|
|
169
|
+
});
|
|
167
170
|
}
|
|
168
171
|
|
|
169
172
|
void drop_dataverse(const std::string& dataverse_name,
|
|
170
173
|
const drop_dataverse_analytics_options::built& options,
|
|
171
174
|
drop_dataverse_analytics_handler&& handler) const
|
|
172
175
|
{
|
|
176
|
+
auto obs_rec = create_observability_recorder(
|
|
177
|
+
core::tracing::operation::mgr_analytics_drop_dataverse, options.parent_span);
|
|
178
|
+
|
|
179
|
+
core::operations::management::analytics_dataverse_drop_request request{
|
|
180
|
+
dataverse_name, options.ignore_if_not_exists, {}, options.timeout, obs_rec->operation_span(),
|
|
181
|
+
};
|
|
173
182
|
return core_.execute(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
{},
|
|
178
|
-
options.timeout,
|
|
179
|
-
},
|
|
180
|
-
[handler = std::move(handler)](const auto& resp) {
|
|
183
|
+
std::move(request),
|
|
184
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
185
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
181
186
|
handler(core::impl::make_error(resp.ctx));
|
|
182
187
|
});
|
|
183
188
|
}
|
|
@@ -187,17 +192,23 @@ public:
|
|
|
187
192
|
const create_dataset_analytics_options::built& options,
|
|
188
193
|
create_dataset_analytics_handler&& handler) const
|
|
189
194
|
{
|
|
195
|
+
auto obs_rec = create_observability_recorder(
|
|
196
|
+
core::tracing::operation::mgr_analytics_create_dataset, options.parent_span);
|
|
197
|
+
|
|
198
|
+
core::operations::management::analytics_dataset_create_request request{
|
|
199
|
+
options.dataverse_name.value_or(DEFAULT_DATAVERSE_NAME),
|
|
200
|
+
dataset_name,
|
|
201
|
+
bucket_name,
|
|
202
|
+
options.condition,
|
|
203
|
+
{},
|
|
204
|
+
options.timeout,
|
|
205
|
+
options.ignore_if_exists,
|
|
206
|
+
obs_rec->operation_span(),
|
|
207
|
+
};
|
|
190
208
|
return core_.execute(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
bucket_name,
|
|
195
|
-
options.condition,
|
|
196
|
-
{},
|
|
197
|
-
options.timeout,
|
|
198
|
-
options.ignore_if_exists,
|
|
199
|
-
},
|
|
200
|
-
[handler = std::move(handler)](const auto& resp) {
|
|
209
|
+
std::move(request),
|
|
210
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
211
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
201
212
|
handler(core::impl::make_error(resp.ctx));
|
|
202
213
|
});
|
|
203
214
|
}
|
|
@@ -206,15 +217,21 @@ public:
|
|
|
206
217
|
const drop_dataset_analytics_options::built& options,
|
|
207
218
|
drop_dataset_analytics_handler&& handler) const
|
|
208
219
|
{
|
|
220
|
+
auto obs_rec = create_observability_recorder(
|
|
221
|
+
core::tracing::operation::mgr_analytics_drop_dataset, options.parent_span);
|
|
222
|
+
|
|
223
|
+
core::operations::management::analytics_dataset_drop_request request{
|
|
224
|
+
options.dataverse_name.value_or(DEFAULT_DATAVERSE_NAME),
|
|
225
|
+
dataset_name,
|
|
226
|
+
options.ignore_if_not_exists,
|
|
227
|
+
{},
|
|
228
|
+
options.timeout,
|
|
229
|
+
obs_rec->operation_span(),
|
|
230
|
+
};
|
|
209
231
|
return core_.execute(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
options.ignore_if_not_exists,
|
|
214
|
-
{},
|
|
215
|
-
options.timeout,
|
|
216
|
-
},
|
|
217
|
-
[handler = std::move(handler)](const auto& resp) {
|
|
232
|
+
std::move(request),
|
|
233
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
234
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
218
235
|
handler(core::impl::make_error(resp.ctx));
|
|
219
236
|
});
|
|
220
237
|
}
|
|
@@ -222,14 +239,20 @@ public:
|
|
|
222
239
|
void get_all_datasets(const get_all_datasets_analytics_options::built& options,
|
|
223
240
|
get_all_datasets_analytics_handler&& handler) const
|
|
224
241
|
{
|
|
242
|
+
auto obs_rec = create_observability_recorder(
|
|
243
|
+
core::tracing::operation::mgr_analytics_get_all_datasets, options.parent_span);
|
|
244
|
+
|
|
245
|
+
core::operations::management::analytics_dataset_get_all_request request{
|
|
246
|
+
{},
|
|
247
|
+
options.timeout,
|
|
248
|
+
obs_rec->operation_span(),
|
|
249
|
+
};
|
|
225
250
|
return core_.execute(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
options.timeout,
|
|
229
|
-
},
|
|
230
|
-
[handler = std::move(handler)](
|
|
251
|
+
std::move(request),
|
|
252
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](
|
|
231
253
|
const core::operations::management::analytics_dataset_get_all_response& resp) {
|
|
232
254
|
if (resp.ctx.ec) {
|
|
255
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
233
256
|
return handler(core::impl::make_error(resp.ctx), {});
|
|
234
257
|
}
|
|
235
258
|
std::vector<management::analytics_dataset> datasets{};
|
|
@@ -242,6 +265,7 @@ public:
|
|
|
242
265
|
d.bucket_name,
|
|
243
266
|
});
|
|
244
267
|
}
|
|
268
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
245
269
|
handler(core::impl::make_error(resp.ctx), datasets);
|
|
246
270
|
});
|
|
247
271
|
}
|
|
@@ -252,17 +276,23 @@ public:
|
|
|
252
276
|
const create_index_analytics_options::built& options,
|
|
253
277
|
create_index_analytics_handler&& handler) const
|
|
254
278
|
{
|
|
279
|
+
auto obs_rec = create_observability_recorder(
|
|
280
|
+
core::tracing::operation::mgr_analytics_create_index, options.parent_span);
|
|
281
|
+
|
|
282
|
+
core::operations::management::analytics_index_create_request request{
|
|
283
|
+
options.dataverse_name.value_or(DEFAULT_DATAVERSE_NAME),
|
|
284
|
+
dataset_name,
|
|
285
|
+
index_name,
|
|
286
|
+
fields,
|
|
287
|
+
options.ignore_if_exists,
|
|
288
|
+
{},
|
|
289
|
+
options.timeout,
|
|
290
|
+
obs_rec->operation_span(),
|
|
291
|
+
};
|
|
255
292
|
return core_.execute(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
index_name,
|
|
260
|
-
fields,
|
|
261
|
-
options.ignore_if_exists,
|
|
262
|
-
{},
|
|
263
|
-
options.timeout,
|
|
264
|
-
},
|
|
265
|
-
[handler = std::move(handler)](const auto& resp) {
|
|
293
|
+
std::move(request),
|
|
294
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
295
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
266
296
|
handler(core::impl::make_error(resp.ctx));
|
|
267
297
|
});
|
|
268
298
|
}
|
|
@@ -272,16 +302,22 @@ public:
|
|
|
272
302
|
const drop_index_analytics_options::built& options,
|
|
273
303
|
drop_index_analytics_handler&& handler) const
|
|
274
304
|
{
|
|
305
|
+
auto obs_rec = create_observability_recorder(core::tracing::operation::mgr_analytics_drop_index,
|
|
306
|
+
options.parent_span);
|
|
307
|
+
|
|
308
|
+
core::operations::management::analytics_index_drop_request request{
|
|
309
|
+
options.dataverse_name.value_or(DEFAULT_DATAVERSE_NAME),
|
|
310
|
+
dataset_name,
|
|
311
|
+
index_name,
|
|
312
|
+
options.ignore_if_not_exists,
|
|
313
|
+
{},
|
|
314
|
+
options.timeout,
|
|
315
|
+
obs_rec->operation_span(),
|
|
316
|
+
};
|
|
275
317
|
return core_.execute(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
index_name,
|
|
280
|
-
options.ignore_if_not_exists,
|
|
281
|
-
{},
|
|
282
|
-
options.timeout,
|
|
283
|
-
},
|
|
284
|
-
[handler = std::move(handler)](const auto& resp) {
|
|
318
|
+
std::move(request),
|
|
319
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
320
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
285
321
|
handler(core::impl::make_error(resp.ctx));
|
|
286
322
|
});
|
|
287
323
|
}
|
|
@@ -289,14 +325,20 @@ public:
|
|
|
289
325
|
void get_all_indexes(const get_all_indexes_analytics_options::built& options,
|
|
290
326
|
get_all_indexes_analytics_handler&& handler) const
|
|
291
327
|
{
|
|
328
|
+
auto obs_rec = create_observability_recorder(
|
|
329
|
+
core::tracing::operation::mgr_analytics_get_all_indexes, options.parent_span);
|
|
330
|
+
|
|
331
|
+
core::operations::management::analytics_index_get_all_request request{
|
|
332
|
+
{},
|
|
333
|
+
options.timeout,
|
|
334
|
+
obs_rec->operation_span(),
|
|
335
|
+
};
|
|
292
336
|
return core_.execute(
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
options.timeout,
|
|
296
|
-
},
|
|
297
|
-
[handler = std::move(handler)](
|
|
337
|
+
std::move(request),
|
|
338
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](
|
|
298
339
|
const core::operations::management::analytics_index_get_all_response& resp) {
|
|
299
340
|
if (resp.ctx.ec) {
|
|
341
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
300
342
|
return handler(core::impl::make_error(resp.ctx), {});
|
|
301
343
|
}
|
|
302
344
|
std::vector<management::analytics_index> indexes{};
|
|
@@ -309,6 +351,7 @@ public:
|
|
|
309
351
|
idx.is_primary,
|
|
310
352
|
});
|
|
311
353
|
}
|
|
354
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
312
355
|
handler(core::impl::make_error(resp.ctx), indexes);
|
|
313
356
|
});
|
|
314
357
|
}
|
|
@@ -316,15 +359,21 @@ public:
|
|
|
316
359
|
void connect_link(const connect_link_analytics_options::built& options,
|
|
317
360
|
connect_link_analytics_handler&& handler) const
|
|
318
361
|
{
|
|
362
|
+
auto obs_rec = create_observability_recorder(
|
|
363
|
+
core::tracing::operation::mgr_analytics_connect_link, options.parent_span);
|
|
364
|
+
|
|
365
|
+
core::operations::management::analytics_link_connect_request request{
|
|
366
|
+
options.dataverse_name.value_or(DEFAULT_DATAVERSE_NAME),
|
|
367
|
+
options.link_name.value_or(DEFAULT_LINK_NAME),
|
|
368
|
+
options.force,
|
|
369
|
+
{},
|
|
370
|
+
options.timeout,
|
|
371
|
+
obs_rec->operation_span(),
|
|
372
|
+
};
|
|
319
373
|
return core_.execute(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
options.force,
|
|
324
|
-
{},
|
|
325
|
-
options.timeout,
|
|
326
|
-
},
|
|
327
|
-
[handler = std::move(handler)](const auto& resp) {
|
|
374
|
+
std::move(request),
|
|
375
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
376
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
328
377
|
handler(core::impl::make_error(resp.ctx));
|
|
329
378
|
});
|
|
330
379
|
}
|
|
@@ -332,14 +381,20 @@ public:
|
|
|
332
381
|
void disconnect_link(const disconnect_link_analytics_options::built& options,
|
|
333
382
|
disconnect_link_analytics_handler&& handler) const
|
|
334
383
|
{
|
|
384
|
+
auto obs_rec = create_observability_recorder(
|
|
385
|
+
core::tracing::operation::mgr_analytics_disconnect_link, options.parent_span);
|
|
386
|
+
|
|
387
|
+
core::operations::management::analytics_link_disconnect_request request{
|
|
388
|
+
options.dataverse_name.value_or(DEFAULT_DATAVERSE_NAME),
|
|
389
|
+
options.link_name.value_or(DEFAULT_LINK_NAME),
|
|
390
|
+
{},
|
|
391
|
+
options.timeout,
|
|
392
|
+
obs_rec->operation_span(),
|
|
393
|
+
};
|
|
335
394
|
return core_.execute(
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
{},
|
|
340
|
-
options.timeout,
|
|
341
|
-
},
|
|
342
|
-
[handler = std::move(handler)](const auto& resp) {
|
|
395
|
+
std::move(request),
|
|
396
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
397
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
343
398
|
handler(core::impl::make_error(resp.ctx));
|
|
344
399
|
});
|
|
345
400
|
}
|
|
@@ -347,14 +402,20 @@ public:
|
|
|
347
402
|
void get_pending_mutations(const get_pending_mutations_analytics_options::built& options,
|
|
348
403
|
get_pending_mutations_analytics_handler&& handler) const
|
|
349
404
|
{
|
|
405
|
+
auto obs_rec = create_observability_recorder(
|
|
406
|
+
core::tracing::operation::mgr_analytics_get_pending_mutations, options.parent_span);
|
|
407
|
+
|
|
408
|
+
core::operations::management::analytics_get_pending_mutations_request request{
|
|
409
|
+
{},
|
|
410
|
+
options.timeout,
|
|
411
|
+
obs_rec->operation_span(),
|
|
412
|
+
};
|
|
350
413
|
return core_.execute(
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
options.timeout,
|
|
354
|
-
},
|
|
355
|
-
[handler = std::move(handler)](
|
|
414
|
+
std::move(request),
|
|
415
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](
|
|
356
416
|
const core::operations::management::analytics_get_pending_mutations_response& resp) {
|
|
357
417
|
if (resp.ctx.ec) {
|
|
418
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
358
419
|
return handler(core::impl::make_error(resp.ctx), {});
|
|
359
420
|
}
|
|
360
421
|
std::map<std::string, std::map<std::string, std::int64_t>> pending_mutations{};
|
|
@@ -369,6 +430,7 @@ public:
|
|
|
369
430
|
}
|
|
370
431
|
pending_mutations.at(dataverse_name).insert({ dataset_name, mutation_count });
|
|
371
432
|
}
|
|
433
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
372
434
|
handler(core::impl::make_error(resp.ctx), pending_mutations);
|
|
373
435
|
});
|
|
374
436
|
}
|
|
@@ -377,42 +439,58 @@ public:
|
|
|
377
439
|
const create_link_analytics_options::built& options,
|
|
378
440
|
create_link_analytics_handler&& handler) const
|
|
379
441
|
{
|
|
442
|
+
auto obs_rec = create_observability_recorder(
|
|
443
|
+
core::tracing::operation::mgr_analytics_create_link, options.parent_span);
|
|
444
|
+
|
|
380
445
|
switch (link.link_type()) {
|
|
381
|
-
case management::s3_external:
|
|
382
|
-
|
|
383
|
-
core::
|
|
384
|
-
|
|
446
|
+
case management::s3_external: {
|
|
447
|
+
core::operations::management::analytics_link_create_request<
|
|
448
|
+
core::management::analytics::s3_external_link>
|
|
449
|
+
request{
|
|
385
450
|
to_core_s3_external_link(link),
|
|
386
451
|
{},
|
|
387
452
|
options.timeout,
|
|
388
|
-
|
|
389
|
-
|
|
453
|
+
obs_rec->operation_span(),
|
|
454
|
+
};
|
|
455
|
+
return core_.execute(
|
|
456
|
+
std::move(request),
|
|
457
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
458
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
390
459
|
handler(core::impl::make_error(resp.ctx));
|
|
391
460
|
});
|
|
392
|
-
|
|
393
|
-
case management::azure_external:
|
|
394
|
-
|
|
395
|
-
core::
|
|
396
|
-
|
|
461
|
+
}
|
|
462
|
+
case management::azure_external: {
|
|
463
|
+
core::operations::management::analytics_link_create_request<
|
|
464
|
+
core::management::analytics::azure_blob_external_link>
|
|
465
|
+
request{
|
|
397
466
|
to_core_azure_blob_external_link(link),
|
|
398
467
|
{},
|
|
399
468
|
options.timeout,
|
|
400
|
-
|
|
401
|
-
|
|
469
|
+
obs_rec->operation_span(),
|
|
470
|
+
};
|
|
471
|
+
return core_.execute(
|
|
472
|
+
std::move(request),
|
|
473
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
474
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
402
475
|
handler(core::impl::make_error(resp.ctx));
|
|
403
476
|
});
|
|
404
|
-
|
|
405
|
-
case management::couchbase_remote:
|
|
406
|
-
|
|
407
|
-
core::
|
|
408
|
-
|
|
477
|
+
}
|
|
478
|
+
case management::couchbase_remote: {
|
|
479
|
+
core::operations::management::analytics_link_create_request<
|
|
480
|
+
core::management::analytics::couchbase_remote_link>
|
|
481
|
+
request{
|
|
409
482
|
to_core_couchbase_remote_link(link),
|
|
410
483
|
{},
|
|
411
484
|
options.timeout,
|
|
412
|
-
|
|
413
|
-
|
|
485
|
+
obs_rec->operation_span(),
|
|
486
|
+
};
|
|
487
|
+
return core_.execute(
|
|
488
|
+
std::move(request),
|
|
489
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
490
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
414
491
|
handler(core::impl::make_error(resp.ctx));
|
|
415
492
|
});
|
|
493
|
+
}
|
|
416
494
|
}
|
|
417
495
|
}
|
|
418
496
|
|
|
@@ -420,42 +498,58 @@ public:
|
|
|
420
498
|
const replace_link_analytics_options::built& options,
|
|
421
499
|
replace_link_analytics_handler&& handler) const
|
|
422
500
|
{
|
|
501
|
+
auto obs_rec = create_observability_recorder(
|
|
502
|
+
core::tracing::operation::mgr_analytics_replace_link, options.parent_span);
|
|
503
|
+
|
|
423
504
|
switch (link.link_type()) {
|
|
424
|
-
case management::s3_external:
|
|
425
|
-
|
|
426
|
-
core::
|
|
427
|
-
|
|
505
|
+
case management::s3_external: {
|
|
506
|
+
core::operations::management::analytics_link_replace_request<
|
|
507
|
+
core::management::analytics::s3_external_link>
|
|
508
|
+
request{
|
|
428
509
|
to_core_s3_external_link(link),
|
|
429
510
|
{},
|
|
430
511
|
options.timeout,
|
|
431
|
-
|
|
432
|
-
|
|
512
|
+
obs_rec->operation_span(),
|
|
513
|
+
};
|
|
514
|
+
return core_.execute(
|
|
515
|
+
std::move(request),
|
|
516
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
517
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
433
518
|
handler(core::impl::make_error(resp.ctx));
|
|
434
519
|
});
|
|
435
|
-
|
|
436
|
-
case management::azure_external:
|
|
437
|
-
|
|
438
|
-
core::
|
|
439
|
-
|
|
520
|
+
}
|
|
521
|
+
case management::azure_external: {
|
|
522
|
+
core::operations::management::analytics_link_replace_request<
|
|
523
|
+
core::management::analytics::azure_blob_external_link>
|
|
524
|
+
request{
|
|
440
525
|
to_core_azure_blob_external_link(link),
|
|
441
526
|
{},
|
|
442
527
|
options.timeout,
|
|
443
|
-
|
|
444
|
-
|
|
528
|
+
obs_rec->operation_span(),
|
|
529
|
+
};
|
|
530
|
+
return core_.execute(
|
|
531
|
+
std::move(request),
|
|
532
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
533
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
445
534
|
handler(core::impl::make_error(resp.ctx));
|
|
446
535
|
});
|
|
447
|
-
|
|
448
|
-
case management::couchbase_remote:
|
|
449
|
-
|
|
450
|
-
core::
|
|
451
|
-
|
|
536
|
+
}
|
|
537
|
+
case management::couchbase_remote: {
|
|
538
|
+
core::operations::management::analytics_link_replace_request<
|
|
539
|
+
core::management::analytics::couchbase_remote_link>
|
|
540
|
+
request{
|
|
452
541
|
to_core_couchbase_remote_link(link),
|
|
453
542
|
{},
|
|
454
543
|
options.timeout,
|
|
455
|
-
|
|
456
|
-
|
|
544
|
+
obs_rec->operation_span(),
|
|
545
|
+
};
|
|
546
|
+
return core_.execute(
|
|
547
|
+
std::move(request),
|
|
548
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
549
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
457
550
|
handler(core::impl::make_error(resp.ctx));
|
|
458
551
|
});
|
|
552
|
+
}
|
|
459
553
|
}
|
|
460
554
|
}
|
|
461
555
|
|
|
@@ -464,14 +558,16 @@ public:
|
|
|
464
558
|
const drop_link_analytics_options::built& options,
|
|
465
559
|
drop_link_analytics_handler&& handler) const
|
|
466
560
|
{
|
|
561
|
+
auto obs_rec = create_observability_recorder(core::tracing::operation::mgr_analytics_drop_link,
|
|
562
|
+
options.parent_span);
|
|
563
|
+
|
|
564
|
+
core::operations::management::analytics_link_drop_request request{
|
|
565
|
+
link_name, dataverse_name, {}, options.timeout, obs_rec->operation_span(),
|
|
566
|
+
};
|
|
467
567
|
return core_.execute(
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
{},
|
|
472
|
-
options.timeout,
|
|
473
|
-
},
|
|
474
|
-
[handler = std::move(handler)](const auto& resp) {
|
|
568
|
+
std::move(request),
|
|
569
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](const auto& resp) {
|
|
570
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
475
571
|
handler(core::impl::make_error(resp.ctx));
|
|
476
572
|
});
|
|
477
573
|
}
|
|
@@ -479,8 +575,11 @@ public:
|
|
|
479
575
|
void get_links(const get_links_analytics_options::built& options,
|
|
480
576
|
get_links_analytics_handler&& handler) const
|
|
481
577
|
{
|
|
578
|
+
auto obs_rec = create_observability_recorder(core::tracing::operation::mgr_analytics_get_links,
|
|
579
|
+
options.parent_span);
|
|
580
|
+
|
|
482
581
|
core::operations::management::analytics_link_get_all_request req{
|
|
483
|
-
{}, {}, {}, {}, options.timeout,
|
|
582
|
+
{}, {}, {}, {}, options.timeout, obs_rec->operation_span(),
|
|
484
583
|
};
|
|
485
584
|
if (options.name.has_value()) {
|
|
486
585
|
req.link_name = options.name.value();
|
|
@@ -502,10 +601,11 @@ public:
|
|
|
502
601
|
}
|
|
503
602
|
}
|
|
504
603
|
return core_.execute(
|
|
505
|
-
req,
|
|
506
|
-
[handler = std::move(handler)](
|
|
604
|
+
std::move(req),
|
|
605
|
+
[obs_rec = std::move(obs_rec), handler = std::move(handler)](
|
|
507
606
|
const core::operations::management::analytics_link_get_all_response& resp) {
|
|
508
607
|
if (resp.ctx.ec) {
|
|
608
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
509
609
|
return handler(core::impl::make_error(resp.ctx), {});
|
|
510
610
|
}
|
|
511
611
|
std::vector<std::unique_ptr<management::analytics_link>> links{};
|
|
@@ -552,11 +652,23 @@ public:
|
|
|
552
652
|
links.push_back(std::move(azure_link));
|
|
553
653
|
}
|
|
554
654
|
|
|
655
|
+
obs_rec->finish(resp.ctx.retry_attempts, resp.ctx.ec);
|
|
555
656
|
handler(core::impl::make_error(resp.ctx), std::move(links));
|
|
556
657
|
});
|
|
557
658
|
}
|
|
558
659
|
|
|
559
660
|
private:
|
|
661
|
+
[[nodiscard]] auto create_observability_recorder(
|
|
662
|
+
const std::string& operation_name,
|
|
663
|
+
const std::shared_ptr<tracing::request_span>& parent_span) const
|
|
664
|
+
-> std::unique_ptr<core::impl::observability_recorder>
|
|
665
|
+
{
|
|
666
|
+
auto rec = core::impl::observability_recorder::create(
|
|
667
|
+
operation_name, parent_span, core_.tracer(), core_.meter());
|
|
668
|
+
rec->with_service(core::tracing::service::analytics);
|
|
669
|
+
return rec;
|
|
670
|
+
}
|
|
671
|
+
|
|
560
672
|
core::cluster core_;
|
|
561
673
|
};
|
|
562
674
|
|