tasker-engine 1.0.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 +7 -0
- data/LICENSE +22 -0
- data/README.md +443 -0
- data/Rakefile +10 -0
- data/app/controllers/tasker/analytics_controller.rb +179 -0
- data/app/controllers/tasker/application_controller.rb +45 -0
- data/app/controllers/tasker/graphql_controller.rb +193 -0
- data/app/controllers/tasker/handlers_controller.rb +217 -0
- data/app/controllers/tasker/health_controller.rb +229 -0
- data/app/controllers/tasker/metrics_controller.rb +111 -0
- data/app/controllers/tasker/page_sort.rb +97 -0
- data/app/controllers/tasker/task_diagrams_controller.rb +30 -0
- data/app/controllers/tasker/tasks_controller.rb +123 -0
- data/app/controllers/tasker/workflow_steps_controller.rb +69 -0
- data/app/graphql/examples/all_tasks.graphql +22 -0
- data/app/graphql/examples/pending_tasks.graphql +23 -0
- data/app/graphql/tasker/graph_ql_types/annotation_type.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/base_argument.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_connection.rb +11 -0
- data/app/graphql/tasker/graph_ql_types/base_edge.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_enum.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_field.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_input_object.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_interface.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/base_object.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_scalar.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_union.rb +11 -0
- data/app/graphql/tasker/graph_ql_types/dependent_system_object_map_type.rb +18 -0
- data/app/graphql/tasker/graph_ql_types/dependent_system_type.rb +13 -0
- data/app/graphql/tasker/graph_ql_types/mutation_type.rb +16 -0
- data/app/graphql/tasker/graph_ql_types/named_step_type.rb +16 -0
- data/app/graphql/tasker/graph_ql_types/named_task_type.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/named_tasks_named_step_type.rb +19 -0
- data/app/graphql/tasker/graph_ql_types/node_type.rb +12 -0
- data/app/graphql/tasker/graph_ql_types/query_type.rb +20 -0
- data/app/graphql/tasker/graph_ql_types/task_annotation_type.rb +17 -0
- data/app/graphql/tasker/graph_ql_types/task_interface.rb +17 -0
- data/app/graphql/tasker/graph_ql_types/task_type.rb +26 -0
- data/app/graphql/tasker/graph_ql_types/workflow_step_type.rb +154 -0
- data/app/graphql/tasker/graph_ql_types.rb +42 -0
- data/app/graphql/tasker/mutations/base_mutation.rb +13 -0
- data/app/graphql/tasker/mutations/cancel_step.rb +29 -0
- data/app/graphql/tasker/mutations/cancel_task.rb +29 -0
- data/app/graphql/tasker/mutations/create_task.rb +52 -0
- data/app/graphql/tasker/mutations/update_step.rb +36 -0
- data/app/graphql/tasker/mutations/update_task.rb +41 -0
- data/app/graphql/tasker/queries/all_annotation_types.rb +17 -0
- data/app/graphql/tasker/queries/all_tasks.rb +23 -0
- data/app/graphql/tasker/queries/base_query.rb +9 -0
- data/app/graphql/tasker/queries/helpers.rb +16 -0
- data/app/graphql/tasker/queries/one_step.rb +24 -0
- data/app/graphql/tasker/queries/one_task.rb +18 -0
- data/app/graphql/tasker/queries/tasks_by_annotation.rb +31 -0
- data/app/graphql/tasker/queries/tasks_by_status.rb +30 -0
- data/app/graphql/tasker/tasker_rails_schema.rb +52 -0
- data/app/jobs/tasker/application_job.rb +8 -0
- data/app/jobs/tasker/metrics_export_job.rb +252 -0
- data/app/jobs/tasker/task_runner_job.rb +224 -0
- data/app/models/tasker/annotation_type.rb +26 -0
- data/app/models/tasker/application_record.rb +70 -0
- data/app/models/tasker/dependent_system.rb +26 -0
- data/app/models/tasker/dependent_system_object_map.rb +64 -0
- data/app/models/tasker/diagram/edge.rb +106 -0
- data/app/models/tasker/diagram/flowchart.rb +137 -0
- data/app/models/tasker/diagram/node.rb +99 -0
- data/app/models/tasker/named_step.rb +41 -0
- data/app/models/tasker/named_task.rb +121 -0
- data/app/models/tasker/named_tasks_named_step.rb +82 -0
- data/app/models/tasker/step_dag_relationship.rb +65 -0
- data/app/models/tasker/step_readiness_status.rb +59 -0
- data/app/models/tasker/task.rb +424 -0
- data/app/models/tasker/task_annotation.rb +36 -0
- data/app/models/tasker/task_diagram.rb +332 -0
- data/app/models/tasker/task_execution_context.rb +29 -0
- data/app/models/tasker/task_namespace.rb +41 -0
- data/app/models/tasker/task_transition.rb +235 -0
- data/app/models/tasker/workflow_step.rb +461 -0
- data/app/models/tasker/workflow_step_edge.rb +94 -0
- data/app/models/tasker/workflow_step_transition.rb +434 -0
- data/app/serializers/tasker/annotation_type_serializer.rb +8 -0
- data/app/serializers/tasker/handler_serializer.rb +109 -0
- data/app/serializers/tasker/task_annotation_serializer.rb +32 -0
- data/app/serializers/tasker/task_serializer.rb +168 -0
- data/app/serializers/tasker/workflow_step_serializer.rb +27 -0
- data/app/services/tasker/analytics_service.rb +409 -0
- data/app/views/tasker/task/_diagram.html.erb +32 -0
- data/config/initializers/dry_struct.rb +11 -0
- data/config/initializers/statesman.rb +6 -0
- data/config/initializers/tasker_orchestration.rb +17 -0
- data/config/initializers/time_formats.rb +4 -0
- data/config/routes.rb +34 -0
- data/config/tasker/subscriptions/example_integrations.yml +67 -0
- data/config/tasker/system_events.yml +305 -0
- data/db/functions/calculate_dependency_levels_v01.sql +45 -0
- data/db/functions/get_analytics_metrics_v01.sql +137 -0
- data/db/functions/get_slowest_steps_v01.sql +82 -0
- data/db/functions/get_slowest_tasks_v01.sql +96 -0
- data/db/functions/get_step_readiness_status_batch_v01.sql +140 -0
- data/db/functions/get_step_readiness_status_v01.sql +139 -0
- data/db/functions/get_system_health_counts_v01.sql +108 -0
- data/db/functions/get_task_execution_context_v01.sql +108 -0
- data/db/functions/get_task_execution_contexts_batch_v01.sql +104 -0
- data/db/init/schema.sql +2277 -0
- data/db/migrate/20250701165431_initial_tasker_schema.rb +116 -0
- data/db/views/tasker_step_dag_relationships_v01.sql +69 -0
- data/docs/APPLICATION_GENERATOR.md +384 -0
- data/docs/AUTH.md +1780 -0
- data/docs/CIRCUIT_BREAKER.md +224 -0
- data/docs/DEVELOPER_GUIDE.md +2665 -0
- data/docs/EVENT_SYSTEM.md +637 -0
- data/docs/EXECUTION_CONFIGURATION.md +341 -0
- data/docs/FLOW_CHART.md +149 -0
- data/docs/HEALTH.md +542 -0
- data/docs/METRICS.md +731 -0
- data/docs/OPTIMIZATION_PLAN.md +1479 -0
- data/docs/OVERVIEW.md +552 -0
- data/docs/QUICK_START.md +270 -0
- data/docs/REGISTRY_SYSTEMS.md +373 -0
- data/docs/REST_API.md +632 -0
- data/docs/ROADMAP.md +221 -0
- data/docs/SQL_FUNCTIONS.md +1408 -0
- data/docs/TASK_DIAGRAM.md +252 -0
- data/docs/TASK_EXECUTION_CONTROL_FLOW.md +237 -0
- data/docs/TELEMETRY.md +795 -0
- data/docs/TROUBLESHOOTING.md +756 -0
- data/docs/TaskHandlerGenerator.html +255 -0
- data/docs/Tasker/Analysis/RuntimeGraphAnalyzer.html +907 -0
- data/docs/Tasker/Analysis/TemplateGraphAnalyzer.html +1236 -0
- data/docs/Tasker/Analysis.html +117 -0
- data/docs/Tasker/AnalyticsController.html +450 -0
- data/docs/Tasker/AnalyticsService/BottleneckAnalytics.html +816 -0
- data/docs/Tasker/AnalyticsService/PerformanceAnalytics.html +586 -0
- data/docs/Tasker/AnalyticsService.html +2221 -0
- data/docs/Tasker/AnnotationType.html +137 -0
- data/docs/Tasker/AnnotationTypeSerializer.html +124 -0
- data/docs/Tasker/ApplicationController.html +147 -0
- data/docs/Tasker/ApplicationJob.html +128 -0
- data/docs/Tasker/ApplicationRecord.html +378 -0
- data/docs/Tasker/Authentication/AuthenticationError.html +124 -0
- data/docs/Tasker/Authentication/ConfigurationError.html +124 -0
- data/docs/Tasker/Authentication/Coordinator.html +242 -0
- data/docs/Tasker/Authentication/Interface.html +560 -0
- data/docs/Tasker/Authentication/InterfaceError.html +124 -0
- data/docs/Tasker/Authentication/NoneAuthenticator.html +338 -0
- data/docs/Tasker/Authentication.html +119 -0
- data/docs/Tasker/Authorization/AuthorizationError.html +139 -0
- data/docs/Tasker/Authorization/BaseCoordinator.html +927 -0
- data/docs/Tasker/Authorization/ConfigurationError.html +153 -0
- data/docs/Tasker/Authorization/ResourceConstants/ACTIONS.html +428 -0
- data/docs/Tasker/Authorization/ResourceConstants/RESOURCES.html +365 -0
- data/docs/Tasker/Authorization/ResourceConstants.html +146 -0
- data/docs/Tasker/Authorization/ResourceRegistry.html +882 -0
- data/docs/Tasker/Authorization/UnauthorizedError.html +153 -0
- data/docs/Tasker/Authorization.html +582 -0
- data/docs/Tasker/CacheCapabilities.html +167 -0
- data/docs/Tasker/CacheStrategy.html +1297 -0
- data/docs/Tasker/Concerns/Authenticatable.html +116 -0
- data/docs/Tasker/Concerns/Authorizable/AdminStatusChecker.html +256 -0
- data/docs/Tasker/Concerns/Authorizable.html +816 -0
- data/docs/Tasker/Concerns/ControllerAuthorizable.html +157 -0
- data/docs/Tasker/Concerns/EventPublisher.html +4023 -0
- data/docs/Tasker/Concerns/IdempotentStateTransitions.html +806 -0
- data/docs/Tasker/Concerns/LifecycleEventHelpers.html +129 -0
- data/docs/Tasker/Concerns/OrchestrationPublisher.html +129 -0
- data/docs/Tasker/Concerns/StateMachineBase/ClassMethods.html +1075 -0
- data/docs/Tasker/Concerns/StateMachineBase/StateMachineBase/ClassMethods.html +191 -0
- data/docs/Tasker/Concerns/StateMachineBase/StateMachineBase.html +126 -0
- data/docs/Tasker/Concerns/StateMachineBase.html +153 -0
- data/docs/Tasker/Concerns/StructuredLogging.html +1413 -0
- data/docs/Tasker/Concerns.html +117 -0
- data/docs/Tasker/Configuration/AuthConfiguration.html +1023 -0
- data/docs/Tasker/Configuration/ConfigurationProxy.html +581 -0
- data/docs/Tasker/Configuration/DatabaseConfiguration.html +475 -0
- data/docs/Tasker/Configuration/EngineConfiguration.html +1265 -0
- data/docs/Tasker/Configuration/HealthConfiguration.html +791 -0
- data/docs/Tasker/Configuration/TelemetryConfiguration.html +1308 -0
- data/docs/Tasker/Configuration/TelemetryConfigurationProxy.html +388 -0
- data/docs/Tasker/Configuration.html +1669 -0
- data/docs/Tasker/ConfigurationError.html +143 -0
- data/docs/Tasker/ConfiguredTask.html +514 -0
- data/docs/Tasker/Constants/EventDefinitions.html +590 -0
- data/docs/Tasker/Constants/LifecycleEvents.html +137 -0
- data/docs/Tasker/Constants/ObservabilityEvents/Step.html +152 -0
- data/docs/Tasker/Constants/ObservabilityEvents/Task.html +142 -0
- data/docs/Tasker/Constants/ObservabilityEvents.html +126 -0
- data/docs/Tasker/Constants/RegistryEvents.html +285 -0
- data/docs/Tasker/Constants/StepEvents.html +177 -0
- data/docs/Tasker/Constants/TaskEvents.html +167 -0
- data/docs/Tasker/Constants/TaskExecution/ExecutionStatus.html +207 -0
- data/docs/Tasker/Constants/TaskExecution/HealthStatus.html +191 -0
- data/docs/Tasker/Constants/TaskExecution/RecommendedAction.html +207 -0
- data/docs/Tasker/Constants/TaskExecution.html +126 -0
- data/docs/Tasker/Constants/TaskFinalization/ErrorMessages.html +132 -0
- data/docs/Tasker/Constants/TaskFinalization/PendingReasons.html +207 -0
- data/docs/Tasker/Constants/TaskFinalization/ReenqueueReasons.html +239 -0
- data/docs/Tasker/Constants/TaskFinalization.html +126 -0
- data/docs/Tasker/Constants/TaskStatuses.html +223 -0
- data/docs/Tasker/Constants/TestEvents.html +163 -0
- data/docs/Tasker/Constants/WorkflowEvents.html +222 -0
- data/docs/Tasker/Constants/WorkflowStepStatuses.html +223 -0
- data/docs/Tasker/Constants.html +561 -0
- data/docs/Tasker/DependentSystem.html +137 -0
- data/docs/Tasker/DependentSystemObjectMap.html +250 -0
- data/docs/Tasker/DetectorRegistry.html +598 -0
- data/docs/Tasker/Diagram/Edge.html +1191 -0
- data/docs/Tasker/Diagram/Flowchart.html +1539 -0
- data/docs/Tasker/Diagram/Node.html +1165 -0
- data/docs/Tasker/Diagram.html +117 -0
- data/docs/Tasker/Engine.html +215 -0
- data/docs/Tasker/Error.html +139 -0
- data/docs/Tasker/Events/Bus.html +1226 -0
- data/docs/Tasker/Events/Catalog/CatalogPrinter.html +258 -0
- data/docs/Tasker/Events/Catalog/CustomEventRegistrar.html +276 -0
- data/docs/Tasker/Events/Catalog/ExamplePayloadGenerator.html +294 -0
- data/docs/Tasker/Events/Catalog.html +1291 -0
- data/docs/Tasker/Events/CustomRegistry.html +943 -0
- data/docs/Tasker/Events/DefinitionLoader.html +575 -0
- data/docs/Tasker/Events/EventPayloadBuilder/ErrorInfoExtractor.html +286 -0
- data/docs/Tasker/Events/EventPayloadBuilder/StepPayloadBuilder.html +312 -0
- data/docs/Tasker/Events/EventPayloadBuilder.html +664 -0
- data/docs/Tasker/Events/Publisher.html +365 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/ErrorCategorizer/ErrorTypeClassifier.html +1128 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/ErrorCategorizer.html +270 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/MetricTagsExtractor.html +266 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber.html +2556 -0
- data/docs/Tasker/Events/Subscribers/MetricsSubscriber.html +723 -0
- data/docs/Tasker/Events/Subscribers/TelemetrySubscriber.html +2251 -0
- data/docs/Tasker/Events/Subscribers.html +117 -0
- data/docs/Tasker/Events/SubscriptionLoader.html +493 -0
- data/docs/Tasker/Events.html +294 -0
- data/docs/Tasker/EventsGenerator.html +459 -0
- data/docs/Tasker/Functions/FunctionBasedAnalyticsMetrics/AnalyticsMetrics.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedAnalyticsMetrics.html +412 -0
- data/docs/Tasker/Functions/FunctionBasedDependencyLevels.html +598 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestSteps/SlowestStep.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestSteps.html +453 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestTasks/SlowestTask.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestTasks.html +453 -0
- data/docs/Tasker/Functions/FunctionBasedStepReadinessStatus.html +1457 -0
- data/docs/Tasker/Functions/FunctionBasedSystemHealthCounts/HealthMetrics.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSystemHealthCounts.html +370 -0
- data/docs/Tasker/Functions/FunctionBasedTaskExecutionContext.html +1250 -0
- data/docs/Tasker/Functions/FunctionWrapper.html +479 -0
- data/docs/Tasker/Functions.html +117 -0
- data/docs/Tasker/Generators/AuthenticatorGenerator/UsageInstructionsFormatter.html +244 -0
- data/docs/Tasker/Generators/AuthenticatorGenerator.html +373 -0
- data/docs/Tasker/Generators/AuthorizationCoordinatorGenerator.html +430 -0
- data/docs/Tasker/Generators/SubscriberGenerator.html +377 -0
- data/docs/Tasker/Generators/TaskHandlerGenerator.html +263 -0
- data/docs/Tasker/Generators.html +117 -0
- data/docs/Tasker/GraphQLTypes/AnnotationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/BaseArgument.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseConnection.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseEdge.html +130 -0
- data/docs/Tasker/GraphQLTypes/BaseEnum.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseField.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseInputObject.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseInterface.html +116 -0
- data/docs/Tasker/GraphQLTypes/BaseObject.html +128 -0
- data/docs/Tasker/GraphQLTypes/BaseScalar.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseUnion.html +124 -0
- data/docs/Tasker/GraphQLTypes/DependentSystemObjectMapType.html +132 -0
- data/docs/Tasker/GraphQLTypes/DependentSystemType.html +132 -0
- data/docs/Tasker/GraphQLTypes/MutationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedStepType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedTaskType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedTasksNamedStepType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NodeType.html +118 -0
- data/docs/Tasker/GraphQLTypes/QueryType.html +139 -0
- data/docs/Tasker/GraphQLTypes/TaskAnnotationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/TaskInterface.html +111 -0
- data/docs/Tasker/GraphQLTypes/TaskType.html +201 -0
- data/docs/Tasker/GraphQLTypes/WorkflowStepType.html +694 -0
- data/docs/Tasker/GraphQLTypes.html +130 -0
- data/docs/Tasker/GraphqlController.html +251 -0
- data/docs/Tasker/HandlerFactory.html +1518 -0
- data/docs/Tasker/HandlerSerializer.html +682 -0
- data/docs/Tasker/HandlersController.html +574 -0
- data/docs/Tasker/HashIdentityStrategy.html +278 -0
- data/docs/Tasker/Health/ReadinessChecker.html +712 -0
- data/docs/Tasker/Health/StatusChecker.html +653 -0
- data/docs/Tasker/Health.html +117 -0
- data/docs/Tasker/HealthController.html +523 -0
- data/docs/Tasker/IdentityStrategy.html +276 -0
- data/docs/Tasker/InvalidTaskHandlerConfig.html +135 -0
- data/docs/Tasker/LifecycleEvents/Events/Step.html +162 -0
- data/docs/Tasker/LifecycleEvents/Events/Task.html +162 -0
- data/docs/Tasker/LifecycleEvents/Events.html +204 -0
- data/docs/Tasker/LifecycleEvents/Publisher.html +132 -0
- data/docs/Tasker/LifecycleEvents.html +799 -0
- data/docs/Tasker/Logging/CorrelationIdGenerator.html +688 -0
- data/docs/Tasker/Logging.html +115 -0
- data/docs/Tasker/MetricsController.html +293 -0
- data/docs/Tasker/MetricsExportJob.html +414 -0
- data/docs/Tasker/Mutations/BaseMutation.html +128 -0
- data/docs/Tasker/Mutations/CancelStep.html +219 -0
- data/docs/Tasker/Mutations/CancelTask.html +221 -0
- data/docs/Tasker/Mutations/CreateTask.html +243 -0
- data/docs/Tasker/Mutations/UpdateStep.html +243 -0
- data/docs/Tasker/Mutations/UpdateTask.html +243 -0
- data/docs/Tasker/Mutations.html +117 -0
- data/docs/Tasker/NamedStep.html +216 -0
- data/docs/Tasker/NamedTask.html +910 -0
- data/docs/Tasker/NamedTasksNamedStep.html +435 -0
- data/docs/Tasker/Orchestration/BackoffCalculator.html +404 -0
- data/docs/Tasker/Orchestration/ConnectionBuilder/ConfigValidator.html +258 -0
- data/docs/Tasker/Orchestration/ConnectionBuilder.html +435 -0
- data/docs/Tasker/Orchestration/ConnectionPoolIntelligence.html +513 -0
- data/docs/Tasker/Orchestration/Coordinator.html +641 -0
- data/docs/Tasker/Orchestration/FutureStateAnalyzer.html +1045 -0
- data/docs/Tasker/Orchestration/Orchestrator.html +679 -0
- data/docs/Tasker/Orchestration/PluginIntegration.html +1127 -0
- data/docs/Tasker/Orchestration/ResponseProcessor.html +504 -0
- data/docs/Tasker/Orchestration/RetryHeaderParser.html +304 -0
- data/docs/Tasker/Orchestration/StepExecutor.html +995 -0
- data/docs/Tasker/Orchestration/StepSequenceFactory.html +644 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/BlockageChecker.html +264 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ContextManager.html +254 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/DelayCalculator.html +556 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/FinalizationDecisionMaker.html +348 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/FinalizationProcessor.html +286 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ReasonDeterminer.html +432 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ReenqueueManager.html +296 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/UnclearStateHandler.html +314 -0
- data/docs/Tasker/Orchestration/TaskFinalizer.html +1212 -0
- data/docs/Tasker/Orchestration/TaskInitializer.html +766 -0
- data/docs/Tasker/Orchestration/TaskReenqueuer.html +506 -0
- data/docs/Tasker/Orchestration/ViableStepDiscovery.html +442 -0
- data/docs/Tasker/Orchestration/WorkflowCoordinator.html +510 -0
- data/docs/Tasker/Orchestration.html +130 -0
- data/docs/Tasker/PageSort/PageSortParamsBuilder.html +296 -0
- data/docs/Tasker/PageSort.html +247 -0
- data/docs/Tasker/PermanentError.html +518 -0
- data/docs/Tasker/ProceduralError.html +147 -0
- data/docs/Tasker/Queries/AllAnnotationTypes.html +217 -0
- data/docs/Tasker/Queries/AllTasks.html +221 -0
- data/docs/Tasker/Queries/BaseQuery.html +128 -0
- data/docs/Tasker/Queries/Helpers.html +187 -0
- data/docs/Tasker/Queries/OneStep.html +225 -0
- data/docs/Tasker/Queries/OneTask.html +217 -0
- data/docs/Tasker/Queries/TasksByAnnotation.html +231 -0
- data/docs/Tasker/Queries/TasksByStatus.html +233 -0
- data/docs/Tasker/Queries.html +119 -0
- data/docs/Tasker/Railtie.html +124 -0
- data/docs/Tasker/Registry/BaseRegistry.html +1690 -0
- data/docs/Tasker/Registry/EventPublisher.html +667 -0
- data/docs/Tasker/Registry/InterfaceValidator.html +569 -0
- data/docs/Tasker/Registry/RegistrationError.html +132 -0
- data/docs/Tasker/Registry/RegistryError.html +139 -0
- data/docs/Tasker/Registry/StatisticsCollector.html +841 -0
- data/docs/Tasker/Registry/SubscriberRegistry.html +1504 -0
- data/docs/Tasker/Registry/ValidationError.html +132 -0
- data/docs/Tasker/Registry.html +119 -0
- data/docs/Tasker/RetryableError.html +515 -0
- data/docs/Tasker/StateMachine/Compatibility.html +282 -0
- data/docs/Tasker/StateMachine/InvalidStateTransition.html +135 -0
- data/docs/Tasker/StateMachine/StepStateMachine/StandardizedPayloadBuilder.html +260 -0
- data/docs/Tasker/StateMachine/StepStateMachine.html +2215 -0
- data/docs/Tasker/StateMachine/TaskStateMachine.html +734 -0
- data/docs/Tasker/StateMachine.html +602 -0
- data/docs/Tasker/StepDagRelationship.html +657 -0
- data/docs/Tasker/StepHandler/Api/Config.html +1091 -0
- data/docs/Tasker/StepHandler/Api.html +884 -0
- data/docs/Tasker/StepHandler/AutomaticEventPublishing.html +321 -0
- data/docs/Tasker/StepHandler/Base.html +970 -0
- data/docs/Tasker/StepHandler.html +119 -0
- data/docs/Tasker/StepReadinessStatus.html +836 -0
- data/docs/Tasker/Task.html +2575 -0
- data/docs/Tasker/TaskAnnotation.html +137 -0
- data/docs/Tasker/TaskAnnotationSerializer.html +124 -0
- data/docs/Tasker/TaskBuilder/StepNameValidator.html +264 -0
- data/docs/Tasker/TaskBuilder/StepTemplateDefiner.html +264 -0
- data/docs/Tasker/TaskBuilder.html +764 -0
- data/docs/Tasker/TaskDiagram/StepToStepEdgeBuilder.html +260 -0
- data/docs/Tasker/TaskDiagram/TaskToRootStepEdgeBuilder.html +290 -0
- data/docs/Tasker/TaskDiagram.html +548 -0
- data/docs/Tasker/TaskDiagramsController.html +240 -0
- data/docs/Tasker/TaskExecutionContext.html +469 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner/ClassBasedEventRegistrar.html +238 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner/YamlEventRegistrar.html +254 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner.html +988 -0
- data/docs/Tasker/TaskHandler/ClassMethods.html +357 -0
- data/docs/Tasker/TaskHandler/InstanceMethods.html +1396 -0
- data/docs/Tasker/TaskHandler/StepGroup.html +1748 -0
- data/docs/Tasker/TaskHandler.html +271 -0
- data/docs/Tasker/TaskNamespace.html +312 -0
- data/docs/Tasker/TaskRunnerJob.html +406 -0
- data/docs/Tasker/TaskSerializer.html +474 -0
- data/docs/Tasker/TaskTransition.html +1517 -0
- data/docs/Tasker/TaskWorkflowSummary.html +988 -0
- data/docs/Tasker/TaskerRailsSchema/InvalidObjectTypeError.html +132 -0
- data/docs/Tasker/TaskerRailsSchema/TypeResolutionError.html +139 -0
- data/docs/Tasker/TaskerRailsSchema/UnknownInterfaceError.html +132 -0
- data/docs/Tasker/TaskerRailsSchema.html +384 -0
- data/docs/Tasker/TasksController.html +595 -0
- data/docs/Tasker/Telemetry/EventMapping.html +1307 -0
- data/docs/Tasker/Telemetry/EventRouter.html +2178 -0
- data/docs/Tasker/Telemetry/Events/ExportEvents.html +246 -0
- data/docs/Tasker/Telemetry/Events.html +115 -0
- data/docs/Tasker/Telemetry/ExportCoordinator/DistributedLockTimeoutError.html +135 -0
- data/docs/Tasker/Telemetry/ExportCoordinator.html +2137 -0
- data/docs/Tasker/Telemetry/IntelligentCacheManager.html +1083 -0
- data/docs/Tasker/Telemetry/LogBackend.html +1088 -0
- data/docs/Tasker/Telemetry/MetricTypes/Counter.html +1054 -0
- data/docs/Tasker/Telemetry/MetricTypes/Gauge.html +1270 -0
- data/docs/Tasker/Telemetry/MetricTypes/Histogram.html +1492 -0
- data/docs/Tasker/Telemetry/MetricTypes.html +153 -0
- data/docs/Tasker/Telemetry/MetricsBackend.html +2510 -0
- data/docs/Tasker/Telemetry/MetricsExportService.html +578 -0
- data/docs/Tasker/Telemetry/PluginRegistry.html +1774 -0
- data/docs/Tasker/Telemetry/Plugins/BaseExporter.html +1835 -0
- data/docs/Tasker/Telemetry/Plugins/CsvExporter.html +768 -0
- data/docs/Tasker/Telemetry/Plugins/JsonExporter.html +747 -0
- data/docs/Tasker/Telemetry/Plugins.html +117 -0
- data/docs/Tasker/Telemetry/PrometheusExporter.html +481 -0
- data/docs/Tasker/Telemetry/TraceBackend.html +891 -0
- data/docs/Tasker/Telemetry.html +130 -0
- data/docs/Tasker/Types/AuthConfig.html +886 -0
- data/docs/Tasker/Types/BackoffConfig.html +1063 -0
- data/docs/Tasker/Types/BaseConfig.html +227 -0
- data/docs/Tasker/Types/CacheConfig.html +1731 -0
- data/docs/Tasker/Types/DatabaseConfig.html +388 -0
- data/docs/Tasker/Types/DependencyGraph.html +526 -0
- data/docs/Tasker/Types/DependencyGraphConfig.html +753 -0
- data/docs/Tasker/Types/EngineConfig.html +1181 -0
- data/docs/Tasker/Types/ExecutionConfig.html +1963 -0
- data/docs/Tasker/Types/GraphEdge.html +517 -0
- data/docs/Tasker/Types/GraphMetadata.html +781 -0
- data/docs/Tasker/Types/GraphNode.html +694 -0
- data/docs/Tasker/Types/HealthConfig.html +784 -0
- data/docs/Tasker/Types/StepSequence.html +353 -0
- data/docs/Tasker/Types/StepTemplate.html +1193 -0
- data/docs/Tasker/Types/TaskRequest.html +1179 -0
- data/docs/Tasker/Types/TelemetryConfig.html +2746 -0
- data/docs/Tasker/Types.html +154 -0
- data/docs/Tasker/WorkflowStep/StepFinder.html +282 -0
- data/docs/Tasker/WorkflowStep.html +2724 -0
- data/docs/Tasker/WorkflowStepEdge.html +304 -0
- data/docs/Tasker/WorkflowStepSerializer.html +305 -0
- data/docs/Tasker/WorkflowStepTransition/TransitionDescriptionFormatter.html +282 -0
- data/docs/Tasker/WorkflowStepTransition.html +2201 -0
- data/docs/Tasker/WorkflowStepsController.html +462 -0
- data/docs/Tasker.html +452 -0
- data/docs/VISION.md +584 -0
- data/docs/WHY.md +21 -0
- data/docs/_index.html +2375 -0
- data/docs/class_list.html +54 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +503 -0
- data/docs/events/migration_plan_outcomes.md +80 -0
- data/docs/file.README.html +541 -0
- data/docs/file_list.html +59 -0
- data/docs/frames.html +22 -0
- data/docs/index.html +541 -0
- data/docs/js/app.js +344 -0
- data/docs/js/full_list.js +242 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +9182 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/generators/tasker/authenticator_generator.rb +301 -0
- data/lib/generators/tasker/authorization_coordinator_generator.rb +139 -0
- data/lib/generators/tasker/events_generator.rb +91 -0
- data/lib/generators/tasker/subscriber_generator.rb +107 -0
- data/lib/generators/tasker/task_handler_generator.rb +138 -0
- data/lib/generators/tasker/templates/api_token_authenticator.rb.erb +113 -0
- data/lib/generators/tasker/templates/api_token_authenticator_spec.rb.erb +144 -0
- data/lib/generators/tasker/templates/authorization_coordinator.rb.erb +95 -0
- data/lib/generators/tasker/templates/authorization_coordinator_spec.rb.erb +142 -0
- data/lib/generators/tasker/templates/custom_authenticator.rb.erb +108 -0
- data/lib/generators/tasker/templates/custom_authenticator_spec.rb.erb +162 -0
- data/lib/generators/tasker/templates/custom_events.yml.erb +62 -0
- data/lib/generators/tasker/templates/custom_subscriber.rb.erb +72 -0
- data/lib/generators/tasker/templates/devise_authenticator.rb.erb +101 -0
- data/lib/generators/tasker/templates/devise_authenticator_spec.rb.erb +126 -0
- data/lib/generators/tasker/templates/initialize.rb.erb +202 -0
- data/lib/generators/tasker/templates/jwt_authenticator.rb.erb +144 -0
- data/lib/generators/tasker/templates/jwt_authenticator_spec.rb.erb +298 -0
- data/lib/generators/tasker/templates/metrics_subscriber.rb.erb +258 -0
- data/lib/generators/tasker/templates/metrics_subscriber_spec.rb.erb +308 -0
- data/lib/generators/tasker/templates/omniauth_authenticator.rb.erb +135 -0
- data/lib/generators/tasker/templates/omniauth_authenticator_spec.rb.erb +196 -0
- data/lib/generators/tasker/templates/opentelemetry_initializer.rb +52 -0
- data/lib/generators/tasker/templates/subscriber.rb.erb +64 -0
- data/lib/generators/tasker/templates/subscriber_spec.rb.erb +80 -0
- data/lib/generators/tasker/templates/task_config.yaml.erb +117 -0
- data/lib/generators/tasker/templates/task_handler.rb.erb +59 -0
- data/lib/generators/tasker/templates/task_handler_spec.rb.erb +159 -0
- data/lib/tasker/analysis/runtime_graph_analyzer.rb +1168 -0
- data/lib/tasker/analysis/template_graph_analyzer.rb +328 -0
- data/lib/tasker/authentication/coordinator.rb +78 -0
- data/lib/tasker/authentication/errors.rb +9 -0
- data/lib/tasker/authentication/interface.rb +36 -0
- data/lib/tasker/authentication/none_authenticator.rb +26 -0
- data/lib/tasker/authorization/base_coordinator.rb +112 -0
- data/lib/tasker/authorization/errors.rb +26 -0
- data/lib/tasker/authorization/resource_constants.rb +74 -0
- data/lib/tasker/authorization/resource_registry.rb +143 -0
- data/lib/tasker/authorization.rb +75 -0
- data/lib/tasker/cache_capabilities.rb +131 -0
- data/lib/tasker/cache_strategy.rb +469 -0
- data/lib/tasker/concerns/authenticatable.rb +41 -0
- data/lib/tasker/concerns/authorizable.rb +204 -0
- data/lib/tasker/concerns/controller_authorizable.rb +124 -0
- data/lib/tasker/concerns/event_publisher.rb +716 -0
- data/lib/tasker/concerns/idempotent_state_transitions.rb +128 -0
- data/lib/tasker/concerns/state_machine_base.rb +218 -0
- data/lib/tasker/concerns/structured_logging.rb +387 -0
- data/lib/tasker/configuration.rb +325 -0
- data/lib/tasker/constants/event_definitions.rb +147 -0
- data/lib/tasker/constants/registry_events.rb +54 -0
- data/lib/tasker/constants.rb +417 -0
- data/lib/tasker/engine.rb +90 -0
- data/lib/tasker/errors.rb +90 -0
- data/lib/tasker/events/catalog.rb +432 -0
- data/lib/tasker/events/custom_registry.rb +175 -0
- data/lib/tasker/events/definition_loader.rb +199 -0
- data/lib/tasker/events/event_payload_builder.rb +461 -0
- data/lib/tasker/events/publisher.rb +149 -0
- data/lib/tasker/events/subscribers/base_subscriber.rb +601 -0
- data/lib/tasker/events/subscribers/metrics_subscriber.rb +120 -0
- data/lib/tasker/events/subscribers/telemetry_subscriber.rb +462 -0
- data/lib/tasker/events/subscription_loader.rb +161 -0
- data/lib/tasker/events.rb +37 -0
- data/lib/tasker/functions/function_based_analytics_metrics.rb +103 -0
- data/lib/tasker/functions/function_based_dependency_levels.rb +54 -0
- data/lib/tasker/functions/function_based_slowest_steps.rb +84 -0
- data/lib/tasker/functions/function_based_slowest_tasks.rb +84 -0
- data/lib/tasker/functions/function_based_step_readiness_status.rb +183 -0
- data/lib/tasker/functions/function_based_system_health_counts.rb +94 -0
- data/lib/tasker/functions/function_based_task_execution_context.rb +148 -0
- data/lib/tasker/functions/function_wrapper.rb +42 -0
- data/lib/tasker/functions.rb +12 -0
- data/lib/tasker/handler_factory.rb +322 -0
- data/lib/tasker/health/readiness_checker.rb +186 -0
- data/lib/tasker/health/status_checker.rb +203 -0
- data/lib/tasker/identity_strategy.rb +38 -0
- data/lib/tasker/logging/correlation_id_generator.rb +120 -0
- data/lib/tasker/orchestration/backoff_calculator.rb +184 -0
- data/lib/tasker/orchestration/connection_builder.rb +122 -0
- data/lib/tasker/orchestration/connection_pool_intelligence.rb +177 -0
- data/lib/tasker/orchestration/coordinator.rb +119 -0
- data/lib/tasker/orchestration/future_state_analyzer.rb +137 -0
- data/lib/tasker/orchestration/plugin_integration.rb +124 -0
- data/lib/tasker/orchestration/response_processor.rb +168 -0
- data/lib/tasker/orchestration/retry_header_parser.rb +78 -0
- data/lib/tasker/orchestration/step_executor.rb +941 -0
- data/lib/tasker/orchestration/step_sequence_factory.rb +67 -0
- data/lib/tasker/orchestration/task_finalizer.rb +564 -0
- data/lib/tasker/orchestration/task_initializer.rb +140 -0
- data/lib/tasker/orchestration/task_reenqueuer.rb +71 -0
- data/lib/tasker/orchestration/viable_step_discovery.rb +65 -0
- data/lib/tasker/orchestration/workflow_coordinator.rb +294 -0
- data/lib/tasker/orchestration.rb +45 -0
- data/lib/tasker/railtie.rb +9 -0
- data/lib/tasker/registry/base_registry.rb +177 -0
- data/lib/tasker/registry/event_publisher.rb +91 -0
- data/lib/tasker/registry/interface_validator.rb +140 -0
- data/lib/tasker/registry/statistics_collector.rb +381 -0
- data/lib/tasker/registry/subscriber_registry.rb +285 -0
- data/lib/tasker/registry.rb +22 -0
- data/lib/tasker/state_machine/step_state_machine.rb +508 -0
- data/lib/tasker/state_machine/task_state_machine.rb +192 -0
- data/lib/tasker/state_machine.rb +83 -0
- data/lib/tasker/step_handler/api.rb +410 -0
- data/lib/tasker/step_handler/base.rb +206 -0
- data/lib/tasker/task_builder.rb +432 -0
- data/lib/tasker/task_handler/class_methods.rb +324 -0
- data/lib/tasker/task_handler/instance_methods.rb +293 -0
- data/lib/tasker/task_handler/step_group.rb +182 -0
- data/lib/tasker/task_handler.rb +43 -0
- data/lib/tasker/telemetry/event_mapping.rb +126 -0
- data/lib/tasker/telemetry/event_router.rb +318 -0
- data/lib/tasker/telemetry/events/export_events.rb +38 -0
- data/lib/tasker/telemetry/export_coordinator.rb +497 -0
- data/lib/tasker/telemetry/intelligent_cache_manager.rb +508 -0
- data/lib/tasker/telemetry/log_backend.rb +224 -0
- data/lib/tasker/telemetry/metric_types.rb +368 -0
- data/lib/tasker/telemetry/metrics_backend.rb +1227 -0
- data/lib/tasker/telemetry/metrics_export_service.rb +392 -0
- data/lib/tasker/telemetry/plugin_registry.rb +333 -0
- data/lib/tasker/telemetry/plugins/base_exporter.rb +246 -0
- data/lib/tasker/telemetry/plugins/csv_exporter.rb +198 -0
- data/lib/tasker/telemetry/plugins/json_exporter.rb +141 -0
- data/lib/tasker/telemetry/prometheus_exporter.rb +249 -0
- data/lib/tasker/telemetry/trace_backend.rb +186 -0
- data/lib/tasker/telemetry.rb +59 -0
- data/lib/tasker/types/auth_config.rb +81 -0
- data/lib/tasker/types/backoff_config.rb +142 -0
- data/lib/tasker/types/cache_config.rb +257 -0
- data/lib/tasker/types/database_config.rb +39 -0
- data/lib/tasker/types/dependency_graph.rb +225 -0
- data/lib/tasker/types/dependency_graph_config.rb +149 -0
- data/lib/tasker/types/engine_config.rb +131 -0
- data/lib/tasker/types/execution_config.rb +289 -0
- data/lib/tasker/types/health_config.rb +84 -0
- data/lib/tasker/types/step_sequence.rb +24 -0
- data/lib/tasker/types/step_template.rb +63 -0
- data/lib/tasker/types/task_request.rb +60 -0
- data/lib/tasker/types/telemetry_config.rb +273 -0
- data/lib/tasker/types.rb +64 -0
- data/lib/tasker/version.rb +7 -0
- data/lib/tasker.rb +82 -0
- data/lib/tasks/tasker_tasks.rake +302 -0
- metadata +958 -0
@@ -0,0 +1,2137 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Tasker::Telemetry::ExportCoordinator
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.37
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Tasker::Telemetry::ExportCoordinator";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (E)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span> » <span class='title'><span class='object_link'><a href="../Telemetry.html" title="Tasker::Telemetry (module)">Telemetry</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">ExportCoordinator</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Tasker::Telemetry::ExportCoordinator
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Tasker::Telemetry::ExportCoordinator</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd>Singleton, <span class='object_link'><a href="../Concerns/StructuredLogging.html" title="Tasker::Concerns::StructuredLogging (module)">Concerns::StructuredLogging</a></span></dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/tasker/telemetry/export_coordinator.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Overview</h2><div class="docstring">
|
108
|
+
<div class="discussion">
|
109
|
+
|
110
|
+
<p>ExportCoordinator manages export coordination and integrates with PluginRegistry</p>
|
111
|
+
|
112
|
+
<p>This class now uses the unified PluginRegistry for plugin management, eliminating duplication and providing consistent plugin handling across the telemetry system.</p>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="tags">
|
118
|
+
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
|
123
|
+
<h2>Constant Summary</h2>
|
124
|
+
|
125
|
+
<h3 class="inherited">Constants included
|
126
|
+
from <span class='object_link'><a href="../Concerns/StructuredLogging.html" title="Tasker::Concerns::StructuredLogging (module)">Concerns::StructuredLogging</a></span></h3>
|
127
|
+
<p class="inherited"><span class='object_link'><a href="../Concerns/StructuredLogging.html#CORRELATION_ID_KEY-constant" title="Tasker::Concerns::StructuredLogging::CORRELATION_ID_KEY (constant)">Concerns::StructuredLogging::CORRELATION_ID_KEY</a></span></p>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<h2>
|
135
|
+
Instance Method Summary
|
136
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
137
|
+
</h2>
|
138
|
+
|
139
|
+
<ul class="summary">
|
140
|
+
|
141
|
+
<li class="public ">
|
142
|
+
<span class="summary_signature">
|
143
|
+
|
144
|
+
<a href="#clear_plugins!-instance_method" title="#clear_plugins! (instance method)">#<strong>clear_plugins!</strong> ⇒ Boolean </a>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
</span>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>Legacy method for backward compatibility (now delegates to PluginRegistry).</p>
|
160
|
+
</div></span>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
<li class="public ">
|
166
|
+
<span class="summary_signature">
|
167
|
+
|
168
|
+
<a href="#coordinate_cache_sync-instance_method" title="#coordinate_cache_sync (instance method)">#<strong>coordinate_cache_sync</strong>(sync_result) ⇒ Object </a>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
<span class="summary_desc"><div class='inline'>
|
183
|
+
<p>Coordinate cache sync event.</p>
|
184
|
+
</div></span>
|
185
|
+
|
186
|
+
</li>
|
187
|
+
|
188
|
+
|
189
|
+
<li class="public ">
|
190
|
+
<span class="summary_signature">
|
191
|
+
|
192
|
+
<a href="#coordinate_export_completion-instance_method" title="#coordinate_export_completion (instance method)">#<strong>coordinate_export_completion</strong>(export_id, result) ⇒ Object </a>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
</span>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<span class="summary_desc"><div class='inline'>
|
207
|
+
<p>Coordinate export completion.</p>
|
208
|
+
</div></span>
|
209
|
+
|
210
|
+
</li>
|
211
|
+
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#coordinate_export_request-instance_method" title="#coordinate_export_request (instance method)">#<strong>coordinate_export_request</strong>(export_format, options = {}) ⇒ String </a>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<span class="summary_desc"><div class='inline'>
|
231
|
+
<p>Coordinate export request.</p>
|
232
|
+
</div></span>
|
233
|
+
|
234
|
+
</li>
|
235
|
+
|
236
|
+
|
237
|
+
<li class="public ">
|
238
|
+
<span class="summary_signature">
|
239
|
+
|
240
|
+
<a href="#execute_coordinated_export-instance_method" title="#execute_coordinated_export (instance method)">#<strong>execute_coordinated_export</strong>(format:, include_instances: false, **options) ⇒ Hash </a>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
</span>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
<span class="summary_desc"><div class='inline'>
|
255
|
+
<p>Execute coordinated export with distributed locking and plugin coordination.</p>
|
256
|
+
</div></span>
|
257
|
+
|
258
|
+
</li>
|
259
|
+
|
260
|
+
|
261
|
+
<li class="public ">
|
262
|
+
<span class="summary_signature">
|
263
|
+
|
264
|
+
<a href="#extend_cache_ttl-instance_method" title="#extend_cache_ttl (instance method)">#<strong>extend_cache_ttl</strong>(extension_duration) ⇒ Object </a>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</span>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
<span class="summary_desc"><div class='inline'>
|
279
|
+
<p>Extend cache TTL for distributed scenarios.</p>
|
280
|
+
</div></span>
|
281
|
+
|
282
|
+
</li>
|
283
|
+
|
284
|
+
|
285
|
+
<li class="public ">
|
286
|
+
<span class="summary_signature">
|
287
|
+
|
288
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ ExportCoordinator </a>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
</span>
|
293
|
+
|
294
|
+
|
295
|
+
<span class="note title constructor">constructor</span>
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
<span class="summary_desc"><div class='inline'>
|
305
|
+
<p>A new instance of ExportCoordinator.</p>
|
306
|
+
</div></span>
|
307
|
+
|
308
|
+
</li>
|
309
|
+
|
310
|
+
|
311
|
+
<li class="public ">
|
312
|
+
<span class="summary_signature">
|
313
|
+
|
314
|
+
<a href="#plugins_for_format-instance_method" title="#plugins_for_format (instance method)">#<strong>plugins_for_format</strong>(format) ⇒ Array<Object> </a>
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
</span>
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
<span class="summary_desc"><div class='inline'>
|
329
|
+
<p>Get plugins that support a specific format.</p>
|
330
|
+
</div></span>
|
331
|
+
|
332
|
+
</li>
|
333
|
+
|
334
|
+
|
335
|
+
<li class="public ">
|
336
|
+
<span class="summary_signature">
|
337
|
+
|
338
|
+
<a href="#register_plugin-instance_method" title="#register_plugin (instance method)">#<strong>register_plugin</strong>(name, plugin, replace: false, **options) ⇒ Boolean </a>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
</span>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
<span class="summary_desc"><div class='inline'>
|
353
|
+
<p>Register a plugin for export coordination (delegates to PluginRegistry).</p>
|
354
|
+
</div></span>
|
355
|
+
|
356
|
+
</li>
|
357
|
+
|
358
|
+
|
359
|
+
<li class="public ">
|
360
|
+
<span class="summary_signature">
|
361
|
+
|
362
|
+
<a href="#registered_plugins-instance_method" title="#registered_plugins (instance method)">#<strong>registered_plugins</strong> ⇒ Hash </a>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
</span>
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
<span class="summary_desc"><div class='inline'>
|
377
|
+
<p>Get registered plugins (delegates to PluginRegistry).</p>
|
378
|
+
</div></span>
|
379
|
+
|
380
|
+
</li>
|
381
|
+
|
382
|
+
|
383
|
+
<li class="public ">
|
384
|
+
<span class="summary_signature">
|
385
|
+
|
386
|
+
<a href="#stats-instance_method" title="#stats (instance method)">#<strong>stats</strong> ⇒ Hash </a>
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
</span>
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
<span class="summary_desc"><div class='inline'>
|
401
|
+
<p>Get comprehensive export coordination statistics.</p>
|
402
|
+
</div></span>
|
403
|
+
|
404
|
+
</li>
|
405
|
+
|
406
|
+
|
407
|
+
<li class="public ">
|
408
|
+
<span class="summary_signature">
|
409
|
+
|
410
|
+
<a href="#supported_formats-instance_method" title="#supported_formats (instance method)">#<strong>supported_formats</strong> ⇒ Array<String> </a>
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
</span>
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
<span class="summary_desc"><div class='inline'>
|
425
|
+
<p>Get all supported formats across registered plugins.</p>
|
426
|
+
</div></span>
|
427
|
+
|
428
|
+
</li>
|
429
|
+
|
430
|
+
|
431
|
+
<li class="public ">
|
432
|
+
<span class="summary_signature">
|
433
|
+
|
434
|
+
<a href="#supports_format%3F-instance_method" title="#supports_format? (instance method)">#<strong>supports_format?</strong> ⇒ Boolean </a>
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
</span>
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
<span class="summary_desc"><div class='inline'>
|
449
|
+
<p>Check if a format is supported by any registered plugin.</p>
|
450
|
+
</div></span>
|
451
|
+
|
452
|
+
</li>
|
453
|
+
|
454
|
+
|
455
|
+
<li class="public ">
|
456
|
+
<span class="summary_signature">
|
457
|
+
|
458
|
+
<a href="#unregister_plugin-instance_method" title="#unregister_plugin (instance method)">#<strong>unregister_plugin</strong>(name) ⇒ Boolean </a>
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
</span>
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
<span class="summary_desc"><div class='inline'>
|
473
|
+
<p>Unregister a plugin (delegates to PluginRegistry).</p>
|
474
|
+
</div></span>
|
475
|
+
|
476
|
+
</li>
|
477
|
+
|
478
|
+
|
479
|
+
</ul>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Concerns/StructuredLogging.html" title="Tasker::Concerns::StructuredLogging (module)">Concerns::StructuredLogging</a></span></h3>
|
492
|
+
<p class="inherited"><span class='object_link'><a href="../Concerns/StructuredLogging.html#correlation_id-instance_method" title="Tasker::Concerns::StructuredLogging#correlation_id (method)">#correlation_id</a></span>, <span class='object_link'><a href="../Concerns/StructuredLogging.html#correlation_id=-instance_method" title="Tasker::Concerns::StructuredLogging#correlation_id= (method)">#correlation_id=</a></span>, <span class='object_link'><a href="../Concerns/StructuredLogging.html#log_exception-instance_method" title="Tasker::Concerns::StructuredLogging#log_exception (method)">#log_exception</a></span>, <span class='object_link'><a href="../Concerns/StructuredLogging.html#log_orchestration_event-instance_method" title="Tasker::Concerns::StructuredLogging#log_orchestration_event (method)">#log_orchestration_event</a></span>, <span class='object_link'><a href="../Concerns/StructuredLogging.html#log_performance_event-instance_method" title="Tasker::Concerns::StructuredLogging#log_performance_event (method)">#log_performance_event</a></span>, <span class='object_link'><a href="../Concerns/StructuredLogging.html#log_step_event-instance_method" title="Tasker::Concerns::StructuredLogging#log_step_event (method)">#log_step_event</a></span>, <span class='object_link'><a href="../Concerns/StructuredLogging.html#log_structured-instance_method" title="Tasker::Concerns::StructuredLogging#log_structured (method)">#log_structured</a></span>, <span class='object_link'><a href="../Concerns/StructuredLogging.html#log_task_event-instance_method" title="Tasker::Concerns::StructuredLogging#log_task_event (method)">#log_task_event</a></span>, <span class='object_link'><a href="../Concerns/StructuredLogging.html#with_correlation_id-instance_method" title="Tasker::Concerns::StructuredLogging#with_correlation_id (method)">#with_correlation_id</a></span></p>
|
493
|
+
|
494
|
+
|
495
|
+
<div id="constructor_details" class="method_details_list">
|
496
|
+
<h2>Constructor Details</h2>
|
497
|
+
|
498
|
+
<div class="method_details first">
|
499
|
+
<h3 class="signature first" id="initialize-instance_method">
|
500
|
+
|
501
|
+
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="Tasker::Telemetry::ExportCoordinator (class)">ExportCoordinator</a></span></tt>
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
</h3><div class="docstring">
|
508
|
+
<div class="discussion">
|
509
|
+
|
510
|
+
<p>Returns a new instance of ExportCoordinator.</p>
|
511
|
+
|
512
|
+
|
513
|
+
</div>
|
514
|
+
</div>
|
515
|
+
<div class="tags">
|
516
|
+
|
517
|
+
|
518
|
+
</div><table class="source_code">
|
519
|
+
<tr>
|
520
|
+
<td>
|
521
|
+
<pre class="lines">
|
522
|
+
|
523
|
+
|
524
|
+
18
|
525
|
+
19
|
526
|
+
20
|
527
|
+
21
|
528
|
+
22
|
529
|
+
23
|
530
|
+
24
|
531
|
+
25
|
532
|
+
26</pre>
|
533
|
+
</td>
|
534
|
+
<td>
|
535
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 18</span>
|
536
|
+
|
537
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
538
|
+
<span class='ivar'>@plugin_registry</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="PluginRegistry.html" title="Tasker::Telemetry::PluginRegistry (class)">PluginRegistry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
539
|
+
<span class='ivar'>@event_bus</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Events.html" title="Tasker::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Events/Publisher.html" title="Tasker::Events::Publisher (class)">Publisher</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
540
|
+
<span class='ivar'>@mutex</span> <span class='op'>=</span> <span class='const'>Mutex</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
541
|
+
|
542
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span><span class='symbol'>:info</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ExportCoordinator initialized</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
543
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>export_coordinator</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
544
|
+
<span class='label'>event_type:</span> <span class='symbol'>:initialized</span><span class='rparen'>)</span>
|
545
|
+
<span class='kw'>end</span></pre>
|
546
|
+
</td>
|
547
|
+
</tr>
|
548
|
+
</table>
|
549
|
+
</div>
|
550
|
+
|
551
|
+
</div>
|
552
|
+
|
553
|
+
|
554
|
+
<div id="instance_method_details" class="method_details_list">
|
555
|
+
<h2>Instance Method Details</h2>
|
556
|
+
|
557
|
+
|
558
|
+
<div class="method_details first">
|
559
|
+
<h3 class="signature first" id="clear_plugins!-instance_method">
|
560
|
+
|
561
|
+
#<strong>clear_plugins!</strong> ⇒ <tt>Boolean</tt>
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
</h3><div class="docstring">
|
568
|
+
<div class="discussion">
|
569
|
+
|
570
|
+
<p>Legacy method for backward compatibility (now delegates to PluginRegistry)</p>
|
571
|
+
|
572
|
+
|
573
|
+
</div>
|
574
|
+
</div>
|
575
|
+
<div class="tags">
|
576
|
+
|
577
|
+
<p class="tag_title">Returns:</p>
|
578
|
+
<ul class="return">
|
579
|
+
|
580
|
+
<li>
|
581
|
+
|
582
|
+
|
583
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
—
|
588
|
+
<div class='inline'>
|
589
|
+
<p>True if cleared successfully</p>
|
590
|
+
</div>
|
591
|
+
|
592
|
+
</li>
|
593
|
+
|
594
|
+
</ul>
|
595
|
+
|
596
|
+
</div><table class="source_code">
|
597
|
+
<tr>
|
598
|
+
<td>
|
599
|
+
<pre class="lines">
|
600
|
+
|
601
|
+
|
602
|
+
341
|
603
|
+
342
|
604
|
+
343</pre>
|
605
|
+
</td>
|
606
|
+
<td>
|
607
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 341</span>
|
608
|
+
|
609
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_clear_plugins!'>clear_plugins!</span>
|
610
|
+
<span class='ivar'>@plugin_registry</span><span class='period'>.</span><span class='id identifier rubyid_clear!'>clear!</span>
|
611
|
+
<span class='kw'>end</span></pre>
|
612
|
+
</td>
|
613
|
+
</tr>
|
614
|
+
</table>
|
615
|
+
</div>
|
616
|
+
|
617
|
+
<div class="method_details ">
|
618
|
+
<h3 class="signature " id="coordinate_cache_sync-instance_method">
|
619
|
+
|
620
|
+
#<strong>coordinate_cache_sync</strong>(sync_result) ⇒ <tt>Object</tt>
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
</h3><div class="docstring">
|
627
|
+
<div class="discussion">
|
628
|
+
|
629
|
+
<p>Coordinate cache sync event</p>
|
630
|
+
|
631
|
+
|
632
|
+
</div>
|
633
|
+
</div>
|
634
|
+
<div class="tags">
|
635
|
+
<p class="tag_title">Parameters:</p>
|
636
|
+
<ul class="param">
|
637
|
+
|
638
|
+
<li>
|
639
|
+
|
640
|
+
<span class='name'>sync_result</span>
|
641
|
+
|
642
|
+
|
643
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
—
|
648
|
+
<div class='inline'>
|
649
|
+
<p>Result from cache sync operation</p>
|
650
|
+
</div>
|
651
|
+
|
652
|
+
</li>
|
653
|
+
|
654
|
+
</ul>
|
655
|
+
|
656
|
+
|
657
|
+
</div><table class="source_code">
|
658
|
+
<tr>
|
659
|
+
<td>
|
660
|
+
<pre class="lines">
|
661
|
+
|
662
|
+
|
663
|
+
117
|
664
|
+
118
|
665
|
+
119
|
666
|
+
120
|
667
|
+
121
|
668
|
+
122
|
669
|
+
123
|
670
|
+
124
|
671
|
+
125
|
672
|
+
126
|
673
|
+
127
|
674
|
+
128</pre>
|
675
|
+
</td>
|
676
|
+
<td>
|
677
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 117</span>
|
678
|
+
|
679
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_coordinate_cache_sync'>coordinate_cache_sync</span><span class='lparen'>(</span><span class='id identifier rubyid_sync_result'>sync_result</span><span class='rparen'>)</span>
|
680
|
+
<span class='id identifier rubyid_publish_event'>publish_event</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#CACHE_SYNCED-constant" title="Tasker::Telemetry::Events::ExportEvents::CACHE_SYNCED (constant)">CACHE_SYNCED</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
681
|
+
<span class='label'>strategy:</span> <span class='id identifier rubyid_sync_result'>sync_result</span><span class='lbracket'>[</span><span class='symbol'>:strategy</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
682
|
+
<span class='label'>metrics_count:</span> <span class='id identifier rubyid_sync_result'>sync_result</span><span class='lbracket'>[</span><span class='symbol'>:metrics_count</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
683
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_sync_result'>sync_result</span><span class='lbracket'>[</span><span class='symbol'>:duration_ms</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
684
|
+
<span class='label'>success:</span> <span class='id identifier rubyid_sync_result'>sync_result</span><span class='lbracket'>[</span><span class='symbol'>:success</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
685
|
+
<span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
|
686
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
687
|
+
|
688
|
+
<span class='comment'># Notify plugins of cache sync
|
689
|
+
</span> <span class='id identifier rubyid_notify_plugins'>notify_plugins</span><span class='lparen'>(</span><span class='symbol'>:on_cache_sync</span><span class='comma'>,</span> <span class='id identifier rubyid_sync_result'>sync_result</span><span class='rparen'>)</span>
|
690
|
+
<span class='kw'>end</span></pre>
|
691
|
+
</td>
|
692
|
+
</tr>
|
693
|
+
</table>
|
694
|
+
</div>
|
695
|
+
|
696
|
+
<div class="method_details ">
|
697
|
+
<h3 class="signature " id="coordinate_export_completion-instance_method">
|
698
|
+
|
699
|
+
#<strong>coordinate_export_completion</strong>(export_id, result) ⇒ <tt>Object</tt>
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
</h3><div class="docstring">
|
706
|
+
<div class="discussion">
|
707
|
+
|
708
|
+
<p>Coordinate export completion</p>
|
709
|
+
|
710
|
+
|
711
|
+
</div>
|
712
|
+
</div>
|
713
|
+
<div class="tags">
|
714
|
+
<p class="tag_title">Parameters:</p>
|
715
|
+
<ul class="param">
|
716
|
+
|
717
|
+
<li>
|
718
|
+
|
719
|
+
<span class='name'>export_id</span>
|
720
|
+
|
721
|
+
|
722
|
+
<span class='type'>(<tt>String</tt>)</span>
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
—
|
727
|
+
<div class='inline'>
|
728
|
+
<p>Export identifier</p>
|
729
|
+
</div>
|
730
|
+
|
731
|
+
</li>
|
732
|
+
|
733
|
+
<li>
|
734
|
+
|
735
|
+
<span class='name'>result</span>
|
736
|
+
|
737
|
+
|
738
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
—
|
743
|
+
<div class='inline'>
|
744
|
+
<p>Export result</p>
|
745
|
+
</div>
|
746
|
+
|
747
|
+
</li>
|
748
|
+
|
749
|
+
</ul>
|
750
|
+
|
751
|
+
|
752
|
+
</div><table class="source_code">
|
753
|
+
<tr>
|
754
|
+
<td>
|
755
|
+
<pre class="lines">
|
756
|
+
|
757
|
+
|
758
|
+
159
|
759
|
+
160
|
760
|
+
161
|
761
|
+
162
|
762
|
+
163
|
763
|
+
164
|
764
|
+
165
|
765
|
+
166
|
766
|
+
167
|
767
|
+
168
|
768
|
+
169
|
769
|
+
170
|
770
|
+
171
|
771
|
+
172
|
772
|
+
173
|
773
|
+
174
|
774
|
+
175
|
775
|
+
176
|
776
|
+
177
|
777
|
+
178
|
778
|
+
179
|
779
|
+
180
|
780
|
+
181
|
781
|
+
182</pre>
|
782
|
+
</td>
|
783
|
+
<td>
|
784
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 159</span>
|
785
|
+
|
786
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_coordinate_export_completion'>coordinate_export_completion</span><span class='lparen'>(</span><span class='id identifier rubyid_export_id'>export_id</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
|
787
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:success</span><span class='rbracket'>]</span>
|
788
|
+
<span class='id identifier rubyid_publish_event'>publish_event</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#EXPORT_COMPLETED-constant" title="Tasker::Telemetry::Events::ExportEvents::EXPORT_COMPLETED (constant)">EXPORT_COMPLETED</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
789
|
+
<span class='label'>export_id:</span> <span class='id identifier rubyid_export_id'>export_id</span><span class='comma'>,</span>
|
790
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:format</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
791
|
+
<span class='label'>metrics_count:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:metrics_count</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
792
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:duration_ms</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
793
|
+
<span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
|
794
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
795
|
+
<span class='kw'>else</span>
|
796
|
+
<span class='id identifier rubyid_publish_event'>publish_event</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#EXPORT_FAILED-constant" title="Tasker::Telemetry::Events::ExportEvents::EXPORT_FAILED (constant)">EXPORT_FAILED</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
797
|
+
<span class='label'>export_id:</span> <span class='id identifier rubyid_export_id'>export_id</span><span class='comma'>,</span>
|
798
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:format</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
799
|
+
<span class='label'>error:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:error</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
800
|
+
<span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
|
801
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
802
|
+
<span class='kw'>end</span>
|
803
|
+
|
804
|
+
<span class='comment'># Notify plugins of export completion
|
805
|
+
</span> <span class='id identifier rubyid_notify_plugins'>notify_plugins</span><span class='lparen'>(</span><span class='symbol'>:on_export_complete</span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
806
|
+
<span class='label'>export_id:</span> <span class='id identifier rubyid_export_id'>export_id</span><span class='comma'>,</span>
|
807
|
+
<span class='label'>result:</span> <span class='id identifier rubyid_result'>result</span>
|
808
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
809
|
+
<span class='kw'>end</span></pre>
|
810
|
+
</td>
|
811
|
+
</tr>
|
812
|
+
</table>
|
813
|
+
</div>
|
814
|
+
|
815
|
+
<div class="method_details ">
|
816
|
+
<h3 class="signature " id="coordinate_export_request-instance_method">
|
817
|
+
|
818
|
+
#<strong>coordinate_export_request</strong>(export_format, options = {}) ⇒ <tt>String</tt>
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
</h3><div class="docstring">
|
825
|
+
<div class="discussion">
|
826
|
+
|
827
|
+
<p>Coordinate export request</p>
|
828
|
+
|
829
|
+
|
830
|
+
</div>
|
831
|
+
</div>
|
832
|
+
<div class="tags">
|
833
|
+
<p class="tag_title">Parameters:</p>
|
834
|
+
<ul class="param">
|
835
|
+
|
836
|
+
<li>
|
837
|
+
|
838
|
+
<span class='name'>export_format</span>
|
839
|
+
|
840
|
+
|
841
|
+
<span class='type'>(<tt>String</tt>)</span>
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
—
|
846
|
+
<div class='inline'>
|
847
|
+
<p>Requested export format</p>
|
848
|
+
</div>
|
849
|
+
|
850
|
+
</li>
|
851
|
+
|
852
|
+
<li>
|
853
|
+
|
854
|
+
<span class='name'>options</span>
|
855
|
+
|
856
|
+
|
857
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
858
|
+
|
859
|
+
|
860
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
861
|
+
|
862
|
+
|
863
|
+
—
|
864
|
+
<div class='inline'>
|
865
|
+
<p>Export options</p>
|
866
|
+
</div>
|
867
|
+
|
868
|
+
</li>
|
869
|
+
|
870
|
+
</ul>
|
871
|
+
|
872
|
+
<p class="tag_title">Returns:</p>
|
873
|
+
<ul class="return">
|
874
|
+
|
875
|
+
<li>
|
876
|
+
|
877
|
+
|
878
|
+
<span class='type'>(<tt>String</tt>)</span>
|
879
|
+
|
880
|
+
|
881
|
+
|
882
|
+
—
|
883
|
+
<div class='inline'>
|
884
|
+
<p>Export ID</p>
|
885
|
+
</div>
|
886
|
+
|
887
|
+
</li>
|
888
|
+
|
889
|
+
</ul>
|
890
|
+
|
891
|
+
</div><table class="source_code">
|
892
|
+
<tr>
|
893
|
+
<td>
|
894
|
+
<pre class="lines">
|
895
|
+
|
896
|
+
|
897
|
+
135
|
898
|
+
136
|
899
|
+
137
|
900
|
+
138
|
901
|
+
139
|
902
|
+
140
|
903
|
+
141
|
904
|
+
142
|
905
|
+
143
|
906
|
+
144
|
907
|
+
145
|
908
|
+
146
|
909
|
+
147
|
910
|
+
148
|
911
|
+
149
|
912
|
+
150
|
913
|
+
151
|
914
|
+
152
|
915
|
+
153</pre>
|
916
|
+
</td>
|
917
|
+
<td>
|
918
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 135</span>
|
919
|
+
|
920
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_coordinate_export_request'>coordinate_export_request</span><span class='lparen'>(</span><span class='id identifier rubyid_export_format'>export_format</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
921
|
+
<span class='id identifier rubyid_export_id'>export_id</span> <span class='op'>=</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span>
|
922
|
+
|
923
|
+
<span class='id identifier rubyid_publish_event'>publish_event</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#EXPORT_REQUESTED-constant" title="Tasker::Telemetry::Events::ExportEvents::EXPORT_REQUESTED (constant)">EXPORT_REQUESTED</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
924
|
+
<span class='label'>export_id:</span> <span class='id identifier rubyid_export_id'>export_id</span><span class='comma'>,</span>
|
925
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_export_format'>export_format</span><span class='comma'>,</span>
|
926
|
+
<span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span>
|
927
|
+
<span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
|
928
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
929
|
+
|
930
|
+
<span class='comment'># Notify plugins of export request
|
931
|
+
</span> <span class='id identifier rubyid_notify_plugins'>notify_plugins</span><span class='lparen'>(</span><span class='symbol'>:on_export_request</span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
932
|
+
<span class='label'>export_id:</span> <span class='id identifier rubyid_export_id'>export_id</span><span class='comma'>,</span>
|
933
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_export_format'>export_format</span><span class='comma'>,</span>
|
934
|
+
<span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span>
|
935
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
936
|
+
|
937
|
+
<span class='id identifier rubyid_export_id'>export_id</span>
|
938
|
+
<span class='kw'>end</span></pre>
|
939
|
+
</td>
|
940
|
+
</tr>
|
941
|
+
</table>
|
942
|
+
</div>
|
943
|
+
|
944
|
+
<div class="method_details ">
|
945
|
+
<h3 class="signature " id="execute_coordinated_export-instance_method">
|
946
|
+
|
947
|
+
#<strong>execute_coordinated_export</strong>(format:, include_instances: false, **options) ⇒ <tt>Hash</tt>
|
948
|
+
|
949
|
+
|
950
|
+
|
951
|
+
|
952
|
+
|
953
|
+
</h3><div class="docstring">
|
954
|
+
<div class="discussion">
|
955
|
+
|
956
|
+
<p>Execute coordinated export with distributed locking and plugin coordination</p>
|
957
|
+
|
958
|
+
|
959
|
+
</div>
|
960
|
+
</div>
|
961
|
+
<div class="tags">
|
962
|
+
<p class="tag_title">Parameters:</p>
|
963
|
+
<ul class="param">
|
964
|
+
|
965
|
+
<li>
|
966
|
+
|
967
|
+
<span class='name'>format</span>
|
968
|
+
|
969
|
+
|
970
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
971
|
+
|
972
|
+
|
973
|
+
|
974
|
+
—
|
975
|
+
<div class='inline'>
|
976
|
+
<p>Export format (e.g., :prometheus, :json, :csv)</p>
|
977
|
+
</div>
|
978
|
+
|
979
|
+
</li>
|
980
|
+
|
981
|
+
<li>
|
982
|
+
|
983
|
+
<span class='name'>include_instances</span>
|
984
|
+
|
985
|
+
|
986
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
987
|
+
|
988
|
+
|
989
|
+
<em class="default">(defaults to: <tt>false</tt>)</em>
|
990
|
+
|
991
|
+
|
992
|
+
—
|
993
|
+
<div class='inline'>
|
994
|
+
<p>Whether to include instance-specific data</p>
|
995
|
+
</div>
|
996
|
+
|
997
|
+
</li>
|
998
|
+
|
999
|
+
<li>
|
1000
|
+
|
1001
|
+
<span class='name'>options</span>
|
1002
|
+
|
1003
|
+
|
1004
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
—
|
1009
|
+
<div class='inline'>
|
1010
|
+
<p>Additional export options</p>
|
1011
|
+
</div>
|
1012
|
+
|
1013
|
+
</li>
|
1014
|
+
|
1015
|
+
</ul>
|
1016
|
+
|
1017
|
+
<p class="tag_title">Returns:</p>
|
1018
|
+
<ul class="return">
|
1019
|
+
|
1020
|
+
<li>
|
1021
|
+
|
1022
|
+
|
1023
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
—
|
1028
|
+
<div class='inline'>
|
1029
|
+
<p>Export result with success status and data or error</p>
|
1030
|
+
</div>
|
1031
|
+
|
1032
|
+
</li>
|
1033
|
+
|
1034
|
+
</ul>
|
1035
|
+
|
1036
|
+
</div><table class="source_code">
|
1037
|
+
<tr>
|
1038
|
+
<td>
|
1039
|
+
<pre class="lines">
|
1040
|
+
|
1041
|
+
|
1042
|
+
190
|
1043
|
+
191
|
1044
|
+
192
|
1045
|
+
193
|
1046
|
+
194
|
1047
|
+
195
|
1048
|
+
196
|
1049
|
+
197
|
1050
|
+
198
|
1051
|
+
199
|
1052
|
+
200
|
1053
|
+
201
|
1054
|
+
202
|
1055
|
+
203
|
1056
|
+
204
|
1057
|
+
205
|
1058
|
+
206
|
1059
|
+
207
|
1060
|
+
208
|
1061
|
+
209
|
1062
|
+
210
|
1063
|
+
211
|
1064
|
+
212
|
1065
|
+
213
|
1066
|
+
214
|
1067
|
+
215
|
1068
|
+
216
|
1069
|
+
217
|
1070
|
+
218
|
1071
|
+
219
|
1072
|
+
220
|
1073
|
+
221
|
1074
|
+
222
|
1075
|
+
223
|
1076
|
+
224
|
1077
|
+
225
|
1078
|
+
226
|
1079
|
+
227
|
1080
|
+
228
|
1081
|
+
229
|
1082
|
+
230
|
1083
|
+
231
|
1084
|
+
232
|
1085
|
+
233
|
1086
|
+
234
|
1087
|
+
235
|
1088
|
+
236
|
1089
|
+
237
|
1090
|
+
238
|
1091
|
+
239
|
1092
|
+
240
|
1093
|
+
241
|
1094
|
+
242
|
1095
|
+
243
|
1096
|
+
244
|
1097
|
+
245
|
1098
|
+
246
|
1099
|
+
247
|
1100
|
+
248
|
1101
|
+
249
|
1102
|
+
250
|
1103
|
+
251
|
1104
|
+
252
|
1105
|
+
253
|
1106
|
+
254
|
1107
|
+
255
|
1108
|
+
256
|
1109
|
+
257
|
1110
|
+
258
|
1111
|
+
259
|
1112
|
+
260
|
1113
|
+
261
|
1114
|
+
262
|
1115
|
+
263
|
1116
|
+
264
|
1117
|
+
265
|
1118
|
+
266
|
1119
|
+
267
|
1120
|
+
268
|
1121
|
+
269
|
1122
|
+
270
|
1123
|
+
271
|
1124
|
+
272
|
1125
|
+
273
|
1126
|
+
274
|
1127
|
+
275
|
1128
|
+
276
|
1129
|
+
277
|
1130
|
+
278
|
1131
|
+
279
|
1132
|
+
280
|
1133
|
+
281
|
1134
|
+
282
|
1135
|
+
283
|
1136
|
+
284
|
1137
|
+
285
|
1138
|
+
286
|
1139
|
+
287
|
1140
|
+
288
|
1141
|
+
289
|
1142
|
+
290
|
1143
|
+
291
|
1144
|
+
292
|
1145
|
+
293
|
1146
|
+
294
|
1147
|
+
295
|
1148
|
+
296
|
1149
|
+
297
|
1150
|
+
298
|
1151
|
+
299
|
1152
|
+
300
|
1153
|
+
301
|
1154
|
+
302
|
1155
|
+
303
|
1156
|
+
304
|
1157
|
+
305
|
1158
|
+
306
|
1159
|
+
307
|
1160
|
+
308
|
1161
|
+
309
|
1162
|
+
310
|
1163
|
+
311
|
1164
|
+
312
|
1165
|
+
313
|
1166
|
+
314
|
1167
|
+
315
|
1168
|
+
316
|
1169
|
+
317
|
1170
|
+
318</pre>
|
1171
|
+
</td>
|
1172
|
+
<td>
|
1173
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 190</span>
|
1174
|
+
|
1175
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_execute_coordinated_export'>execute_coordinated_export</span><span class='lparen'>(</span><span class='label'>format:</span><span class='comma'>,</span> <span class='label'>include_instances:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1176
|
+
<span class='id identifier rubyid_correlation_id'>correlation_id</span> <span class='op'>=</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span>
|
1177
|
+
<span class='id identifier rubyid_start_time'>start_time</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span>
|
1178
|
+
|
1179
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span>
|
1180
|
+
<span class='symbol'>:info</span><span class='comma'>,</span>
|
1181
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Starting coordinated export</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1182
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>export_coordination</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1183
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1184
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span>
|
1185
|
+
<span class='label'>include_instances:</span> <span class='id identifier rubyid_include_instances'>include_instances</span><span class='comma'>,</span>
|
1186
|
+
<span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span>
|
1187
|
+
<span class='rparen'>)</span>
|
1188
|
+
|
1189
|
+
<span class='kw'>begin</span>
|
1190
|
+
<span class='comment'># Check if format is supported
|
1191
|
+
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_supports_format?'>supports_format?</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span>
|
1192
|
+
<span class='kw'>return</span> <span class='lbrace'>{</span>
|
1193
|
+
<span class='label'>success:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
1194
|
+
<span class='label'>error:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unsupported export format: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format'>format</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1195
|
+
<span class='label'>supported_formats:</span> <span class='id identifier rubyid_supported_formats'>supported_formats</span>
|
1196
|
+
<span class='rbrace'>}</span>
|
1197
|
+
<span class='kw'>end</span>
|
1198
|
+
|
1199
|
+
<span class='comment'># Publish export requested event
|
1200
|
+
</span> <span class='ivar'>@event_bus</span><span class='period'>.</span><span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span>
|
1201
|
+
<span class='const'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Telemetry.html" title="Tasker::Telemetry (module)">Telemetry</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#EXPORT_REQUESTED-constant" title="Tasker::Telemetry::Events::ExportEvents::EXPORT_REQUESTED (constant)">EXPORT_REQUESTED</a></span></span><span class='comma'>,</span>
|
1202
|
+
<span class='lbrace'>{</span>
|
1203
|
+
<span class='label'>correlation_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1204
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span>
|
1205
|
+
<span class='label'>include_instances:</span> <span class='id identifier rubyid_include_instances'>include_instances</span><span class='comma'>,</span>
|
1206
|
+
<span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span>
|
1207
|
+
<span class='label'>timestamp:</span> <span class='id identifier rubyid_start_time'>start_time</span>
|
1208
|
+
<span class='rbrace'>}</span>
|
1209
|
+
<span class='rparen'>)</span>
|
1210
|
+
|
1211
|
+
<span class='comment'># Get metrics data from backend
|
1212
|
+
</span> <span class='id identifier rubyid_metrics_backend'>metrics_backend</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Telemetry.html" title="Tasker::Telemetry (module)">Telemetry</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="MetricsBackend.html" title="Tasker::Telemetry::MetricsBackend (class)">MetricsBackend</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
1213
|
+
<span class='id identifier rubyid_metrics_data'>metrics_data</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_include_instances'>include_instances</span>
|
1214
|
+
<span class='id identifier rubyid_metrics_backend'>metrics_backend</span><span class='period'>.</span><span class='id identifier rubyid_export_distributed_metrics'>export_distributed_metrics</span>
|
1215
|
+
<span class='kw'>else</span>
|
1216
|
+
<span class='id identifier rubyid_metrics_backend'>metrics_backend</span><span class='period'>.</span><span class='id identifier rubyid_export_metrics'>export_metrics</span>
|
1217
|
+
<span class='kw'>end</span>
|
1218
|
+
|
1219
|
+
<span class='comment'># Execute plugin-based export using PluginRegistry
|
1220
|
+
</span> <span class='id identifier rubyid_export_result'>export_result</span> <span class='op'>=</span> <span class='id identifier rubyid_coordinate_plugin_export'>coordinate_plugin_export</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='comma'>,</span> <span class='id identifier rubyid_metrics_data'>metrics_data</span><span class='comma'>,</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='rparen'>)</span>
|
1221
|
+
|
1222
|
+
<span class='id identifier rubyid_duration_ms'>duration_ms</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span> <span class='op'>-</span> <span class='id identifier rubyid_start_time'>start_time</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='int'>1000</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span>
|
1223
|
+
|
1224
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_export_result'>export_result</span><span class='lbracket'>[</span><span class='symbol'>:success</span><span class='rbracket'>]</span>
|
1225
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1226
|
+
<span class='label'>success:</span> <span class='kw'>true</span><span class='comma'>,</span>
|
1227
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span>
|
1228
|
+
<span class='label'>data:</span> <span class='id identifier rubyid_export_result'>export_result</span><span class='lbracket'>[</span><span class='symbol'>:data</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1229
|
+
<span class='label'>metrics_count:</span> <span class='id identifier rubyid_metrics_data'>metrics_data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='comma'>,</span>
|
1230
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration_ms'>duration_ms</span><span class='comma'>,</span>
|
1231
|
+
<span class='label'>correlation_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span>
|
1232
|
+
<span class='rbrace'>}</span>
|
1233
|
+
|
1234
|
+
<span class='ivar'>@event_bus</span><span class='period'>.</span><span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span>
|
1235
|
+
<span class='const'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Telemetry.html" title="Tasker::Telemetry (module)">Telemetry</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#EXPORT_COMPLETED-constant" title="Tasker::Telemetry::Events::ExportEvents::EXPORT_COMPLETED (constant)">EXPORT_COMPLETED</a></span></span><span class='comma'>,</span>
|
1236
|
+
<span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='rparen'>)</span>
|
1237
|
+
<span class='rparen'>)</span>
|
1238
|
+
|
1239
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span>
|
1240
|
+
<span class='symbol'>:info</span><span class='comma'>,</span>
|
1241
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Coordinated export completed successfully</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1242
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>export_coordination</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1243
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1244
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span>
|
1245
|
+
<span class='label'>metrics_count:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:metrics_count</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1246
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration_ms'>duration_ms</span>
|
1247
|
+
<span class='rparen'>)</span>
|
1248
|
+
<span class='kw'>else</span>
|
1249
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1250
|
+
<span class='label'>success:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
1251
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span>
|
1252
|
+
<span class='label'>error:</span> <span class='id identifier rubyid_export_result'>export_result</span><span class='lbracket'>[</span><span class='symbol'>:error</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1253
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration_ms'>duration_ms</span><span class='comma'>,</span>
|
1254
|
+
<span class='label'>correlation_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span>
|
1255
|
+
<span class='rbrace'>}</span>
|
1256
|
+
|
1257
|
+
<span class='ivar'>@event_bus</span><span class='period'>.</span><span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span>
|
1258
|
+
<span class='const'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Telemetry.html" title="Tasker::Telemetry (module)">Telemetry</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#EXPORT_FAILED-constant" title="Tasker::Telemetry::Events::ExportEvents::EXPORT_FAILED (constant)">EXPORT_FAILED</a></span></span><span class='comma'>,</span>
|
1259
|
+
<span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='rparen'>)</span>
|
1260
|
+
<span class='rparen'>)</span>
|
1261
|
+
|
1262
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span>
|
1263
|
+
<span class='symbol'>:error</span><span class='comma'>,</span>
|
1264
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Coordinated export failed</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1265
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>export_coordination</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1266
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1267
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span>
|
1268
|
+
<span class='label'>error:</span> <span class='id identifier rubyid_export_result'>export_result</span><span class='lbracket'>[</span><span class='symbol'>:error</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1269
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration_ms'>duration_ms</span>
|
1270
|
+
<span class='rparen'>)</span>
|
1271
|
+
<span class='kw'>end</span>
|
1272
|
+
|
1273
|
+
<span class='id identifier rubyid_result'>result</span>
|
1274
|
+
<span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
1275
|
+
<span class='id identifier rubyid_duration_ms'>duration_ms</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span> <span class='op'>-</span> <span class='id identifier rubyid_start_time'>start_time</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='int'>1000</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span>
|
1276
|
+
|
1277
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1278
|
+
<span class='label'>success:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
1279
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span>
|
1280
|
+
<span class='label'>error:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
|
1281
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration_ms'>duration_ms</span><span class='comma'>,</span>
|
1282
|
+
<span class='label'>correlation_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span>
|
1283
|
+
<span class='rbrace'>}</span>
|
1284
|
+
|
1285
|
+
<span class='ivar'>@event_bus</span><span class='period'>.</span><span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span>
|
1286
|
+
<span class='const'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Telemetry.html" title="Tasker::Telemetry (module)">Telemetry</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#EXPORT_FAILED-constant" title="Tasker::Telemetry::Events::ExportEvents::EXPORT_FAILED (constant)">EXPORT_FAILED</a></span></span><span class='comma'>,</span>
|
1287
|
+
<span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='rparen'>)</span>
|
1288
|
+
<span class='rparen'>)</span>
|
1289
|
+
|
1290
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span>
|
1291
|
+
<span class='symbol'>:error</span><span class='comma'>,</span>
|
1292
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Coordinated export exception</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1293
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>export_coordination</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1294
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1295
|
+
<span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span>
|
1296
|
+
<span class='label'>error:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
|
1297
|
+
<span class='label'>error_class:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
1298
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration_ms'>duration_ms</span>
|
1299
|
+
<span class='rparen'>)</span>
|
1300
|
+
|
1301
|
+
<span class='id identifier rubyid_result'>result</span>
|
1302
|
+
<span class='kw'>end</span>
|
1303
|
+
<span class='kw'>end</span></pre>
|
1304
|
+
</td>
|
1305
|
+
</tr>
|
1306
|
+
</table>
|
1307
|
+
</div>
|
1308
|
+
|
1309
|
+
<div class="method_details ">
|
1310
|
+
<h3 class="signature " id="extend_cache_ttl-instance_method">
|
1311
|
+
|
1312
|
+
#<strong>extend_cache_ttl</strong>(extension_duration) ⇒ <tt>Object</tt>
|
1313
|
+
|
1314
|
+
|
1315
|
+
|
1316
|
+
|
1317
|
+
|
1318
|
+
</h3><div class="docstring">
|
1319
|
+
<div class="discussion">
|
1320
|
+
|
1321
|
+
<p>Extend cache TTL for distributed scenarios</p>
|
1322
|
+
|
1323
|
+
|
1324
|
+
</div>
|
1325
|
+
</div>
|
1326
|
+
<div class="tags">
|
1327
|
+
<p class="tag_title">Parameters:</p>
|
1328
|
+
<ul class="param">
|
1329
|
+
|
1330
|
+
<li>
|
1331
|
+
|
1332
|
+
<span class='name'>extension_duration</span>
|
1333
|
+
|
1334
|
+
|
1335
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
1336
|
+
|
1337
|
+
|
1338
|
+
|
1339
|
+
—
|
1340
|
+
<div class='inline'>
|
1341
|
+
<p>Extension duration in seconds</p>
|
1342
|
+
</div>
|
1343
|
+
|
1344
|
+
</li>
|
1345
|
+
|
1346
|
+
</ul>
|
1347
|
+
|
1348
|
+
|
1349
|
+
</div><table class="source_code">
|
1350
|
+
<tr>
|
1351
|
+
<td>
|
1352
|
+
<pre class="lines">
|
1353
|
+
|
1354
|
+
|
1355
|
+
348
|
1356
|
+
349
|
1357
|
+
350
|
1358
|
+
351
|
1359
|
+
352
|
1360
|
+
353
|
1361
|
+
354
|
1362
|
+
355
|
1363
|
+
356
|
1364
|
+
357
|
1365
|
+
358
|
1366
|
+
359
|
1367
|
+
360
|
1368
|
+
361
|
1369
|
+
362
|
1370
|
+
363
|
1371
|
+
364
|
1372
|
+
365
|
1373
|
+
366
|
1374
|
+
367
|
1375
|
+
368
|
1376
|
+
369
|
1377
|
+
370
|
1378
|
+
371
|
1379
|
+
372
|
1380
|
+
373
|
1381
|
+
374
|
1382
|
+
375
|
1383
|
+
376
|
1384
|
+
377
|
1385
|
+
378
|
1386
|
+
379
|
1387
|
+
380
|
1388
|
+
381
|
1389
|
+
382
|
1390
|
+
383
|
1391
|
+
384
|
1392
|
+
385
|
1393
|
+
386
|
1394
|
+
387
|
1395
|
+
388
|
1396
|
+
389
|
1397
|
+
390
|
1398
|
+
391
|
1399
|
+
392
|
1400
|
+
393
|
1401
|
+
394
|
1402
|
+
395
|
1403
|
+
396
|
1404
|
+
397
|
1405
|
+
398
|
1406
|
+
399
|
1407
|
+
400
|
1408
|
+
401
|
1409
|
+
402
|
1410
|
+
403
|
1411
|
+
404
|
1412
|
+
405
|
1413
|
+
406
|
1414
|
+
407
|
1415
|
+
408</pre>
|
1416
|
+
</td>
|
1417
|
+
<td>
|
1418
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 348</span>
|
1419
|
+
|
1420
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_extend_cache_ttl'>extend_cache_ttl</span><span class='lparen'>(</span><span class='id identifier rubyid_extension_duration'>extension_duration</span><span class='rparen'>)</span>
|
1421
|
+
<span class='id identifier rubyid_correlation_id'>correlation_id</span> <span class='op'>=</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span>
|
1422
|
+
|
1423
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span>
|
1424
|
+
<span class='symbol'>:info</span><span class='comma'>,</span>
|
1425
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Extending cache TTL for distributed export</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1426
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cache_coordination</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1427
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1428
|
+
<span class='label'>extension_duration:</span> <span class='id identifier rubyid_extension_duration'>extension_duration</span>
|
1429
|
+
<span class='rparen'>)</span>
|
1430
|
+
|
1431
|
+
<span class='kw'>begin</span>
|
1432
|
+
<span class='comment'># Get cache backend and extend TTL
|
1433
|
+
</span> <span class='id identifier rubyid_cache_backend'>cache_backend</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Telemetry.html" title="Tasker::Telemetry (module)">Telemetry</a></span></span><span class='op'>::</span><span class='const'>CacheBackend</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
1434
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_cache_backend'>cache_backend</span><span class='period'>.</span><span class='id identifier rubyid_extend_ttl'>extend_ttl</span><span class='lparen'>(</span><span class='id identifier rubyid_extension_duration'>extension_duration</span><span class='rparen'>)</span>
|
1435
|
+
|
1436
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:success</span><span class='rbracket'>]</span>
|
1437
|
+
<span class='ivar'>@event_bus</span><span class='period'>.</span><span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span>
|
1438
|
+
<span class='const'><span class='object_link'><a href="../../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Telemetry.html" title="Tasker::Telemetry (module)">Telemetry</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'>CACHE_TTL_EXTENDED</span><span class='comma'>,</span>
|
1439
|
+
<span class='lbrace'>{</span>
|
1440
|
+
<span class='label'>correlation_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1441
|
+
<span class='label'>extension_duration:</span> <span class='id identifier rubyid_extension_duration'>extension_duration</span><span class='comma'>,</span>
|
1442
|
+
<span class='label'>new_ttl:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:new_ttl</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1443
|
+
<span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span>
|
1444
|
+
<span class='rbrace'>}</span>
|
1445
|
+
<span class='rparen'>)</span>
|
1446
|
+
|
1447
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span>
|
1448
|
+
<span class='symbol'>:info</span><span class='comma'>,</span>
|
1449
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Cache TTL extended successfully</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1450
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cache_coordination</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1451
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1452
|
+
<span class='label'>extension_duration:</span> <span class='id identifier rubyid_extension_duration'>extension_duration</span><span class='comma'>,</span>
|
1453
|
+
<span class='label'>new_ttl:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:new_ttl</span><span class='rbracket'>]</span>
|
1454
|
+
<span class='rparen'>)</span>
|
1455
|
+
<span class='kw'>else</span>
|
1456
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span>
|
1457
|
+
<span class='symbol'>:warn</span><span class='comma'>,</span>
|
1458
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Failed to extend cache TTL</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1459
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cache_coordination</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1460
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1461
|
+
<span class='label'>extension_duration:</span> <span class='id identifier rubyid_extension_duration'>extension_duration</span><span class='comma'>,</span>
|
1462
|
+
<span class='label'>error:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:error</span><span class='rbracket'>]</span>
|
1463
|
+
<span class='rparen'>)</span>
|
1464
|
+
<span class='kw'>end</span>
|
1465
|
+
|
1466
|
+
<span class='id identifier rubyid_result'>result</span>
|
1467
|
+
<span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
1468
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span>
|
1469
|
+
<span class='symbol'>:error</span><span class='comma'>,</span>
|
1470
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Cache TTL extension exception</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1471
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>cache_coordination</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1472
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_correlation_id'>correlation_id</span><span class='comma'>,</span>
|
1473
|
+
<span class='label'>extension_duration:</span> <span class='id identifier rubyid_extension_duration'>extension_duration</span><span class='comma'>,</span>
|
1474
|
+
<span class='label'>error:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
|
1475
|
+
<span class='label'>error_class:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
1476
|
+
<span class='rparen'>)</span>
|
1477
|
+
|
1478
|
+
<span class='lbrace'>{</span> <span class='label'>success:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>error:</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span> <span class='rbrace'>}</span>
|
1479
|
+
<span class='kw'>end</span>
|
1480
|
+
<span class='kw'>end</span></pre>
|
1481
|
+
</td>
|
1482
|
+
</tr>
|
1483
|
+
</table>
|
1484
|
+
</div>
|
1485
|
+
|
1486
|
+
<div class="method_details ">
|
1487
|
+
<h3 class="signature " id="plugins_for_format-instance_method">
|
1488
|
+
|
1489
|
+
#<strong>plugins_for_format</strong>(format) ⇒ <tt>Array<Object></tt>
|
1490
|
+
|
1491
|
+
|
1492
|
+
|
1493
|
+
|
1494
|
+
|
1495
|
+
</h3><div class="docstring">
|
1496
|
+
<div class="discussion">
|
1497
|
+
|
1498
|
+
<p>Get plugins that support a specific format</p>
|
1499
|
+
|
1500
|
+
|
1501
|
+
</div>
|
1502
|
+
</div>
|
1503
|
+
<div class="tags">
|
1504
|
+
<p class="tag_title">Parameters:</p>
|
1505
|
+
<ul class="param">
|
1506
|
+
|
1507
|
+
<li>
|
1508
|
+
|
1509
|
+
<span class='name'>format</span>
|
1510
|
+
|
1511
|
+
|
1512
|
+
<span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
|
1513
|
+
|
1514
|
+
|
1515
|
+
|
1516
|
+
—
|
1517
|
+
<div class='inline'>
|
1518
|
+
<p>Format to search for</p>
|
1519
|
+
</div>
|
1520
|
+
|
1521
|
+
</li>
|
1522
|
+
|
1523
|
+
</ul>
|
1524
|
+
|
1525
|
+
<p class="tag_title">Returns:</p>
|
1526
|
+
<ul class="return">
|
1527
|
+
|
1528
|
+
<li>
|
1529
|
+
|
1530
|
+
|
1531
|
+
<span class='type'>(<tt>Array<Object></tt>)</span>
|
1532
|
+
|
1533
|
+
|
1534
|
+
|
1535
|
+
—
|
1536
|
+
<div class='inline'>
|
1537
|
+
<p>Array of plugin instances</p>
|
1538
|
+
</div>
|
1539
|
+
|
1540
|
+
</li>
|
1541
|
+
|
1542
|
+
</ul>
|
1543
|
+
|
1544
|
+
</div><table class="source_code">
|
1545
|
+
<tr>
|
1546
|
+
<td>
|
1547
|
+
<pre class="lines">
|
1548
|
+
|
1549
|
+
|
1550
|
+
99
|
1551
|
+
100
|
1552
|
+
101</pre>
|
1553
|
+
</td>
|
1554
|
+
<td>
|
1555
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 99</span>
|
1556
|
+
|
1557
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_plugins_for_format'>plugins_for_format</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span>
|
1558
|
+
<span class='ivar'>@plugin_registry</span><span class='period'>.</span><span class='id identifier rubyid_find_by'>find_by</span><span class='lparen'>(</span><span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span>
|
1559
|
+
<span class='kw'>end</span></pre>
|
1560
|
+
</td>
|
1561
|
+
</tr>
|
1562
|
+
</table>
|
1563
|
+
</div>
|
1564
|
+
|
1565
|
+
<div class="method_details ">
|
1566
|
+
<h3 class="signature " id="register_plugin-instance_method">
|
1567
|
+
|
1568
|
+
#<strong>register_plugin</strong>(name, plugin, replace: false, **options) ⇒ <tt>Boolean</tt>
|
1569
|
+
|
1570
|
+
|
1571
|
+
|
1572
|
+
|
1573
|
+
|
1574
|
+
</h3><div class="docstring">
|
1575
|
+
<div class="discussion">
|
1576
|
+
|
1577
|
+
<p>Register a plugin for export coordination (delegates to PluginRegistry)</p>
|
1578
|
+
|
1579
|
+
|
1580
|
+
</div>
|
1581
|
+
</div>
|
1582
|
+
<div class="tags">
|
1583
|
+
<p class="tag_title">Parameters:</p>
|
1584
|
+
<ul class="param">
|
1585
|
+
|
1586
|
+
<li>
|
1587
|
+
|
1588
|
+
<span class='name'>name</span>
|
1589
|
+
|
1590
|
+
|
1591
|
+
<span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
|
1592
|
+
|
1593
|
+
|
1594
|
+
|
1595
|
+
—
|
1596
|
+
<div class='inline'>
|
1597
|
+
<p>Plugin identifier</p>
|
1598
|
+
</div>
|
1599
|
+
|
1600
|
+
</li>
|
1601
|
+
|
1602
|
+
<li>
|
1603
|
+
|
1604
|
+
<span class='name'>plugin</span>
|
1605
|
+
|
1606
|
+
|
1607
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
1608
|
+
|
1609
|
+
|
1610
|
+
|
1611
|
+
—
|
1612
|
+
<div class='inline'>
|
1613
|
+
<p>Plugin instance implementing required interface</p>
|
1614
|
+
</div>
|
1615
|
+
|
1616
|
+
</li>
|
1617
|
+
|
1618
|
+
<li>
|
1619
|
+
|
1620
|
+
<span class='name'>replace</span>
|
1621
|
+
|
1622
|
+
|
1623
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1624
|
+
|
1625
|
+
|
1626
|
+
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1627
|
+
|
1628
|
+
|
1629
|
+
—
|
1630
|
+
<div class='inline'>
|
1631
|
+
<p>Whether to replace existing plugin</p>
|
1632
|
+
</div>
|
1633
|
+
|
1634
|
+
</li>
|
1635
|
+
|
1636
|
+
<li>
|
1637
|
+
|
1638
|
+
<span class='name'>options</span>
|
1639
|
+
|
1640
|
+
|
1641
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1642
|
+
|
1643
|
+
|
1644
|
+
|
1645
|
+
—
|
1646
|
+
<div class='inline'>
|
1647
|
+
<p>Plugin configuration options</p>
|
1648
|
+
</div>
|
1649
|
+
|
1650
|
+
</li>
|
1651
|
+
|
1652
|
+
</ul>
|
1653
|
+
|
1654
|
+
<p class="tag_title">Returns:</p>
|
1655
|
+
<ul class="return">
|
1656
|
+
|
1657
|
+
<li>
|
1658
|
+
|
1659
|
+
|
1660
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1661
|
+
|
1662
|
+
|
1663
|
+
|
1664
|
+
—
|
1665
|
+
<div class='inline'>
|
1666
|
+
<p>True if registration successful</p>
|
1667
|
+
</div>
|
1668
|
+
|
1669
|
+
</li>
|
1670
|
+
|
1671
|
+
</ul>
|
1672
|
+
|
1673
|
+
</div><table class="source_code">
|
1674
|
+
<tr>
|
1675
|
+
<td>
|
1676
|
+
<pre class="lines">
|
1677
|
+
|
1678
|
+
|
1679
|
+
35
|
1680
|
+
36
|
1681
|
+
37
|
1682
|
+
38
|
1683
|
+
39
|
1684
|
+
40
|
1685
|
+
41
|
1686
|
+
42
|
1687
|
+
43
|
1688
|
+
44
|
1689
|
+
45
|
1690
|
+
46
|
1691
|
+
47
|
1692
|
+
48
|
1693
|
+
49
|
1694
|
+
50
|
1695
|
+
51
|
1696
|
+
52
|
1697
|
+
53
|
1698
|
+
54
|
1699
|
+
55
|
1700
|
+
56
|
1701
|
+
57
|
1702
|
+
58</pre>
|
1703
|
+
</td>
|
1704
|
+
<td>
|
1705
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 35</span>
|
1706
|
+
|
1707
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_register_plugin'>register_plugin</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_plugin'>plugin</span><span class='comma'>,</span> <span class='label'>replace:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1708
|
+
<span class='comment'># Register with the unified PluginRegistry
|
1709
|
+
</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@plugin_registry</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_plugin'>plugin</span><span class='comma'>,</span> <span class='label'>replace:</span> <span class='id identifier rubyid_replace'>replace</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1710
|
+
|
1711
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span>
|
1712
|
+
<span class='comment'># Publish coordination event
|
1713
|
+
</span> <span class='id identifier rubyid_publish_event'>publish_event</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#PLUGIN_REGISTERED-constant" title="Tasker::Telemetry::Events::ExportEvents::PLUGIN_REGISTERED (constant)">PLUGIN_REGISTERED</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
1714
|
+
<span class='label'>plugin_name:</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
|
1715
|
+
<span class='label'>plugin_class:</span> <span class='id identifier rubyid_plugin'>plugin</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
1716
|
+
<span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>replace:</span> <span class='id identifier rubyid_replace'>replace</span><span class='rparen'>)</span><span class='comma'>,</span>
|
1717
|
+
<span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
|
1718
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
1719
|
+
|
1720
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span><span class='symbol'>:info</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Export plugin registered via coordinator</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1721
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>export_plugin</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1722
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
|
1723
|
+
<span class='label'>plugin_name:</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
|
1724
|
+
<span class='label'>plugin_class:</span> <span class='id identifier rubyid_plugin'>plugin</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
1725
|
+
<span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>replace:</span> <span class='id identifier rubyid_replace'>replace</span><span class='rparen'>)</span><span class='comma'>,</span>
|
1726
|
+
<span class='label'>event_type:</span> <span class='symbol'>:registered</span><span class='rparen'>)</span>
|
1727
|
+
<span class='kw'>end</span>
|
1728
|
+
|
1729
|
+
<span class='id identifier rubyid_result'>result</span>
|
1730
|
+
<span class='kw'>end</span></pre>
|
1731
|
+
</td>
|
1732
|
+
</tr>
|
1733
|
+
</table>
|
1734
|
+
</div>
|
1735
|
+
|
1736
|
+
<div class="method_details ">
|
1737
|
+
<h3 class="signature " id="registered_plugins-instance_method">
|
1738
|
+
|
1739
|
+
#<strong>registered_plugins</strong> ⇒ <tt>Hash</tt>
|
1740
|
+
|
1741
|
+
|
1742
|
+
|
1743
|
+
|
1744
|
+
|
1745
|
+
</h3><div class="docstring">
|
1746
|
+
<div class="discussion">
|
1747
|
+
|
1748
|
+
<p>Get registered plugins (delegates to PluginRegistry)</p>
|
1749
|
+
|
1750
|
+
|
1751
|
+
</div>
|
1752
|
+
</div>
|
1753
|
+
<div class="tags">
|
1754
|
+
|
1755
|
+
<p class="tag_title">Returns:</p>
|
1756
|
+
<ul class="return">
|
1757
|
+
|
1758
|
+
<li>
|
1759
|
+
|
1760
|
+
|
1761
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1762
|
+
|
1763
|
+
|
1764
|
+
|
1765
|
+
—
|
1766
|
+
<div class='inline'>
|
1767
|
+
<p>Registered plugins</p>
|
1768
|
+
</div>
|
1769
|
+
|
1770
|
+
</li>
|
1771
|
+
|
1772
|
+
</ul>
|
1773
|
+
|
1774
|
+
</div><table class="source_code">
|
1775
|
+
<tr>
|
1776
|
+
<td>
|
1777
|
+
<pre class="lines">
|
1778
|
+
|
1779
|
+
|
1780
|
+
91
|
1781
|
+
92
|
1782
|
+
93</pre>
|
1783
|
+
</td>
|
1784
|
+
<td>
|
1785
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 91</span>
|
1786
|
+
|
1787
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_registered_plugins'>registered_plugins</span>
|
1788
|
+
<span class='ivar'>@plugin_registry</span><span class='period'>.</span><span class='id identifier rubyid_all_plugins'>all_plugins</span>
|
1789
|
+
<span class='kw'>end</span></pre>
|
1790
|
+
</td>
|
1791
|
+
</tr>
|
1792
|
+
</table>
|
1793
|
+
</div>
|
1794
|
+
|
1795
|
+
<div class="method_details ">
|
1796
|
+
<h3 class="signature " id="stats-instance_method">
|
1797
|
+
|
1798
|
+
#<strong>stats</strong> ⇒ <tt>Hash</tt>
|
1799
|
+
|
1800
|
+
|
1801
|
+
|
1802
|
+
|
1803
|
+
|
1804
|
+
</h3><div class="docstring">
|
1805
|
+
<div class="discussion">
|
1806
|
+
|
1807
|
+
<p>Get comprehensive export coordination statistics</p>
|
1808
|
+
|
1809
|
+
|
1810
|
+
</div>
|
1811
|
+
</div>
|
1812
|
+
<div class="tags">
|
1813
|
+
|
1814
|
+
<p class="tag_title">Returns:</p>
|
1815
|
+
<ul class="return">
|
1816
|
+
|
1817
|
+
<li>
|
1818
|
+
|
1819
|
+
|
1820
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1821
|
+
|
1822
|
+
|
1823
|
+
|
1824
|
+
—
|
1825
|
+
<div class='inline'>
|
1826
|
+
<p>Detailed statistics about export coordination</p>
|
1827
|
+
</div>
|
1828
|
+
|
1829
|
+
</li>
|
1830
|
+
|
1831
|
+
</ul>
|
1832
|
+
|
1833
|
+
</div><table class="source_code">
|
1834
|
+
<tr>
|
1835
|
+
<td>
|
1836
|
+
<pre class="lines">
|
1837
|
+
|
1838
|
+
|
1839
|
+
323
|
1840
|
+
324
|
1841
|
+
325
|
1842
|
+
326
|
1843
|
+
327
|
1844
|
+
328
|
1845
|
+
329
|
1846
|
+
330
|
1847
|
+
331
|
1848
|
+
332
|
1849
|
+
333
|
1850
|
+
334
|
1851
|
+
335
|
1852
|
+
336</pre>
|
1853
|
+
</td>
|
1854
|
+
<td>
|
1855
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 323</span>
|
1856
|
+
|
1857
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_stats'>stats</span>
|
1858
|
+
<span class='id identifier rubyid_plugin_stats'>plugin_stats</span> <span class='op'>=</span> <span class='ivar'>@plugin_registry</span><span class='period'>.</span><span class='id identifier rubyid_stats'>stats</span>
|
1859
|
+
|
1860
|
+
<span class='lbrace'>{</span>
|
1861
|
+
<span class='label'>export_coordinator:</span> <span class='lbrace'>{</span>
|
1862
|
+
<span class='label'>initialized_at:</span> <span class='ivar'>@initialized_at</span> <span class='op'>||</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='comma'>,</span>
|
1863
|
+
<span class='label'>total_plugins:</span> <span class='id identifier rubyid_plugin_stats'>plugin_stats</span><span class='lbracket'>[</span><span class='symbol'>:total_plugins</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1864
|
+
<span class='label'>supported_formats:</span> <span class='id identifier rubyid_plugin_stats'>plugin_stats</span><span class='lbracket'>[</span><span class='symbol'>:supported_formats</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1865
|
+
<span class='label'>plugins_by_format:</span> <span class='id identifier rubyid_plugin_stats'>plugin_stats</span><span class='lbracket'>[</span><span class='symbol'>:plugins_by_format</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1866
|
+
<span class='label'>average_formats_per_plugin:</span> <span class='id identifier rubyid_plugin_stats'>plugin_stats</span><span class='lbracket'>[</span><span class='symbol'>:average_formats_per_plugin</span><span class='rbracket'>]</span>
|
1867
|
+
<span class='rbrace'>}</span><span class='comma'>,</span>
|
1868
|
+
<span class='label'>plugin_registry_stats:</span> <span class='id identifier rubyid_plugin_stats'>plugin_stats</span>
|
1869
|
+
<span class='rbrace'>}</span>
|
1870
|
+
<span class='kw'>end</span></pre>
|
1871
|
+
</td>
|
1872
|
+
</tr>
|
1873
|
+
</table>
|
1874
|
+
</div>
|
1875
|
+
|
1876
|
+
<div class="method_details ">
|
1877
|
+
<h3 class="signature " id="supported_formats-instance_method">
|
1878
|
+
|
1879
|
+
#<strong>supported_formats</strong> ⇒ <tt>Array<String></tt>
|
1880
|
+
|
1881
|
+
|
1882
|
+
|
1883
|
+
|
1884
|
+
|
1885
|
+
</h3><div class="docstring">
|
1886
|
+
<div class="discussion">
|
1887
|
+
|
1888
|
+
<p>Get all supported formats across registered plugins</p>
|
1889
|
+
|
1890
|
+
|
1891
|
+
</div>
|
1892
|
+
</div>
|
1893
|
+
<div class="tags">
|
1894
|
+
|
1895
|
+
<p class="tag_title">Returns:</p>
|
1896
|
+
<ul class="return">
|
1897
|
+
|
1898
|
+
<li>
|
1899
|
+
|
1900
|
+
|
1901
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
1902
|
+
|
1903
|
+
|
1904
|
+
|
1905
|
+
—
|
1906
|
+
<div class='inline'>
|
1907
|
+
<p>Array of supported format names</p>
|
1908
|
+
</div>
|
1909
|
+
|
1910
|
+
</li>
|
1911
|
+
|
1912
|
+
</ul>
|
1913
|
+
|
1914
|
+
</div><table class="source_code">
|
1915
|
+
<tr>
|
1916
|
+
<td>
|
1917
|
+
<pre class="lines">
|
1918
|
+
|
1919
|
+
|
1920
|
+
112</pre>
|
1921
|
+
</td>
|
1922
|
+
<td>
|
1923
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 112</span>
|
1924
|
+
|
1925
|
+
<span class='id identifier rubyid_delegate'>delegate</span> <span class='symbol'>:supported_formats</span><span class='comma'>,</span> <span class='label'>to:</span> <span class='symbol'>:@plugin_registry</span></pre>
|
1926
|
+
</td>
|
1927
|
+
</tr>
|
1928
|
+
</table>
|
1929
|
+
</div>
|
1930
|
+
|
1931
|
+
<div class="method_details ">
|
1932
|
+
<h3 class="signature " id="supports_format?-instance_method">
|
1933
|
+
|
1934
|
+
#<strong>supports_format?</strong> ⇒ <tt>Boolean</tt>
|
1935
|
+
|
1936
|
+
|
1937
|
+
|
1938
|
+
|
1939
|
+
|
1940
|
+
</h3><div class="docstring">
|
1941
|
+
<div class="discussion">
|
1942
|
+
|
1943
|
+
<p>Check if a format is supported by any registered plugin</p>
|
1944
|
+
|
1945
|
+
|
1946
|
+
</div>
|
1947
|
+
</div>
|
1948
|
+
<div class="tags">
|
1949
|
+
<p class="tag_title">Parameters:</p>
|
1950
|
+
<ul class="param">
|
1951
|
+
|
1952
|
+
<li>
|
1953
|
+
|
1954
|
+
<span class='name'>format</span>
|
1955
|
+
|
1956
|
+
|
1957
|
+
<span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
|
1958
|
+
|
1959
|
+
|
1960
|
+
|
1961
|
+
—
|
1962
|
+
<div class='inline'>
|
1963
|
+
<p>Format to check</p>
|
1964
|
+
</div>
|
1965
|
+
|
1966
|
+
</li>
|
1967
|
+
|
1968
|
+
</ul>
|
1969
|
+
|
1970
|
+
<p class="tag_title">Returns:</p>
|
1971
|
+
<ul class="return">
|
1972
|
+
|
1973
|
+
<li>
|
1974
|
+
|
1975
|
+
|
1976
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1977
|
+
|
1978
|
+
|
1979
|
+
|
1980
|
+
—
|
1981
|
+
<div class='inline'>
|
1982
|
+
<p>True if format is supported</p>
|
1983
|
+
</div>
|
1984
|
+
|
1985
|
+
</li>
|
1986
|
+
|
1987
|
+
</ul>
|
1988
|
+
|
1989
|
+
</div><table class="source_code">
|
1990
|
+
<tr>
|
1991
|
+
<td>
|
1992
|
+
<pre class="lines">
|
1993
|
+
|
1994
|
+
|
1995
|
+
107</pre>
|
1996
|
+
</td>
|
1997
|
+
<td>
|
1998
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 107</span>
|
1999
|
+
|
2000
|
+
<span class='id identifier rubyid_delegate'>delegate</span> <span class='symbol'>:supports_format?</span><span class='comma'>,</span> <span class='label'>to:</span> <span class='symbol'>:@plugin_registry</span></pre>
|
2001
|
+
</td>
|
2002
|
+
</tr>
|
2003
|
+
</table>
|
2004
|
+
</div>
|
2005
|
+
|
2006
|
+
<div class="method_details ">
|
2007
|
+
<h3 class="signature " id="unregister_plugin-instance_method">
|
2008
|
+
|
2009
|
+
#<strong>unregister_plugin</strong>(name) ⇒ <tt>Boolean</tt>
|
2010
|
+
|
2011
|
+
|
2012
|
+
|
2013
|
+
|
2014
|
+
|
2015
|
+
</h3><div class="docstring">
|
2016
|
+
<div class="discussion">
|
2017
|
+
|
2018
|
+
<p>Unregister a plugin (delegates to PluginRegistry)</p>
|
2019
|
+
|
2020
|
+
|
2021
|
+
</div>
|
2022
|
+
</div>
|
2023
|
+
<div class="tags">
|
2024
|
+
<p class="tag_title">Parameters:</p>
|
2025
|
+
<ul class="param">
|
2026
|
+
|
2027
|
+
<li>
|
2028
|
+
|
2029
|
+
<span class='name'>name</span>
|
2030
|
+
|
2031
|
+
|
2032
|
+
<span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
|
2033
|
+
|
2034
|
+
|
2035
|
+
|
2036
|
+
—
|
2037
|
+
<div class='inline'>
|
2038
|
+
<p>Plugin identifier</p>
|
2039
|
+
</div>
|
2040
|
+
|
2041
|
+
</li>
|
2042
|
+
|
2043
|
+
</ul>
|
2044
|
+
|
2045
|
+
<p class="tag_title">Returns:</p>
|
2046
|
+
<ul class="return">
|
2047
|
+
|
2048
|
+
<li>
|
2049
|
+
|
2050
|
+
|
2051
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2052
|
+
|
2053
|
+
|
2054
|
+
|
2055
|
+
—
|
2056
|
+
<div class='inline'>
|
2057
|
+
<p>True if unregistered successfully</p>
|
2058
|
+
</div>
|
2059
|
+
|
2060
|
+
</li>
|
2061
|
+
|
2062
|
+
</ul>
|
2063
|
+
|
2064
|
+
</div><table class="source_code">
|
2065
|
+
<tr>
|
2066
|
+
<td>
|
2067
|
+
<pre class="lines">
|
2068
|
+
|
2069
|
+
|
2070
|
+
64
|
2071
|
+
65
|
2072
|
+
66
|
2073
|
+
67
|
2074
|
+
68
|
2075
|
+
69
|
2076
|
+
70
|
2077
|
+
71
|
2078
|
+
72
|
2079
|
+
73
|
2080
|
+
74
|
2081
|
+
75
|
2082
|
+
76
|
2083
|
+
77
|
2084
|
+
78
|
2085
|
+
79
|
2086
|
+
80
|
2087
|
+
81
|
2088
|
+
82
|
2089
|
+
83
|
2090
|
+
84
|
2091
|
+
85
|
2092
|
+
86</pre>
|
2093
|
+
</td>
|
2094
|
+
<td>
|
2095
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/export_coordinator.rb', line 64</span>
|
2096
|
+
|
2097
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_unregister_plugin'>unregister_plugin</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
2098
|
+
<span class='comment'># Get plugin info before unregistering
|
2099
|
+
</span> <span class='id identifier rubyid_plugin_info'>plugin_info</span> <span class='op'>=</span> <span class='ivar'>@plugin_registry</span><span class='period'>.</span><span class='id identifier rubyid_get_plugin'>get_plugin</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
2100
|
+
|
2101
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@plugin_registry</span><span class='period'>.</span><span class='id identifier rubyid_unregister'>unregister</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
2102
|
+
|
2103
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>&&</span> <span class='id identifier rubyid_plugin_info'>plugin_info</span>
|
2104
|
+
<span class='id identifier rubyid_publish_event'>publish_event</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Events.html" title="Tasker::Telemetry::Events (module)">Events</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html" title="Tasker::Telemetry::Events::ExportEvents (module)">ExportEvents</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Events/ExportEvents.html#PLUGIN_UNREGISTERED-constant" title="Tasker::Telemetry::Events::ExportEvents::PLUGIN_UNREGISTERED (constant)">PLUGIN_UNREGISTERED</a></span></span><span class='comma'>,</span> <span class='lbrace'>{</span>
|
2105
|
+
<span class='label'>plugin_name:</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
|
2106
|
+
<span class='label'>plugin_class:</span> <span class='id identifier rubyid_plugin_info'>plugin_info</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
2107
|
+
<span class='label'>timestamp:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_iso8601'>iso8601</span>
|
2108
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
2109
|
+
|
2110
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span><span class='symbol'>:info</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Export plugin unregistered via coordinator</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
2111
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>export_plugin</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
2112
|
+
<span class='label'>entity_id:</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
|
2113
|
+
<span class='label'>plugin_name:</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
|
2114
|
+
<span class='label'>plugin_class:</span> <span class='id identifier rubyid_plugin_info'>plugin_info</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
2115
|
+
<span class='label'>event_type:</span> <span class='symbol'>:unregistered</span><span class='rparen'>)</span>
|
2116
|
+
<span class='kw'>end</span>
|
2117
|
+
|
2118
|
+
<span class='id identifier rubyid_result'>result</span>
|
2119
|
+
<span class='kw'>end</span></pre>
|
2120
|
+
</td>
|
2121
|
+
</tr>
|
2122
|
+
</table>
|
2123
|
+
</div>
|
2124
|
+
|
2125
|
+
</div>
|
2126
|
+
|
2127
|
+
</div>
|
2128
|
+
|
2129
|
+
<div id="footer">
|
2130
|
+
Generated on Tue Jul 1 16:47:39 2025 by
|
2131
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2132
|
+
0.9.37 (ruby-3.2.4).
|
2133
|
+
</div>
|
2134
|
+
|
2135
|
+
</div>
|
2136
|
+
</body>
|
2137
|
+
</html>
|