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,1835 @@
|
|
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::Plugins::BaseExporter
|
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::Plugins::BaseExporter";
|
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 (B)</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> » <span class='title'><span class='object_link'><a href="../Plugins.html" title="Tasker::Telemetry::Plugins (module)">Plugins</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">BaseExporter</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::Plugins::BaseExporter
|
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::Plugins::BaseExporter</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><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/plugins/base_exporter.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Overview</h2><div class="docstring">
|
108
|
+
<div class="discussion">
|
109
|
+
|
110
|
+
<p>Base class for telemetry export plugins</p>
|
111
|
+
|
112
|
+
<p>Provides a standard interface and common functionality for all export plugins. Plugins should inherit from this class and implement the required methods.</p>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="tags">
|
118
|
+
|
119
|
+
<div class="examples">
|
120
|
+
<h4 class="tag_title">Examples:</h4>
|
121
|
+
|
122
|
+
|
123
|
+
<h5 class="example_title"><div class='inline'>
|
124
|
+
<p>Creating a custom exporter</p>
|
125
|
+
</div></h5>
|
126
|
+
|
127
|
+
<pre class="example code"><code><span class='kw'>class</span> <span class='const'>MyCustomExporter</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="../Plugins.html" title="Tasker::Telemetry::Plugins (module)">Plugins</a></span></span><span class='op'>::</span><span class='const'>BaseExporter</span>
|
128
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_export'>export</span><span class='lparen'>(</span><span class='id identifier rubyid_metrics_data'>metrics_data</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>
|
129
|
+
<span class='comment'># Implementation here
|
130
|
+
</span> <span class='id identifier rubyid_log_plugin_event'>log_plugin_event</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'>Custom export completed</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <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='rparen'>)</span>
|
131
|
+
<span class='kw'>end</span>
|
132
|
+
|
133
|
+
<span class='kw'>def</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>
|
134
|
+
<span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>custom</span><span class='tstring_end'>'</span></span>
|
135
|
+
<span class='kw'>end</span>
|
136
|
+
|
137
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_supported_formats'>supported_formats</span>
|
138
|
+
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>custom</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
139
|
+
<span class='kw'>end</span>
|
140
|
+
<span class='kw'>end</span></code></pre>
|
141
|
+
|
142
|
+
</div>
|
143
|
+
|
144
|
+
|
145
|
+
</div><div id="subclasses">
|
146
|
+
<h2>Direct Known Subclasses</h2>
|
147
|
+
<p class="children"><span class='object_link'><a href="CsvExporter.html" title="Tasker::Telemetry::Plugins::CsvExporter (class)">CsvExporter</a></span>, <span class='object_link'><a href="JsonExporter.html" title="Tasker::Telemetry::Plugins::JsonExporter (class)">JsonExporter</a></span></p>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<h2>Constant Summary</h2>
|
153
|
+
|
154
|
+
<h3 class="inherited">Constants included
|
155
|
+
from <span class='object_link'><a href="../../Concerns/StructuredLogging.html" title="Tasker::Concerns::StructuredLogging (module)">Concerns::StructuredLogging</a></span></h3>
|
156
|
+
<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>
|
157
|
+
|
158
|
+
|
159
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
160
|
+
<ul class="summary">
|
161
|
+
|
162
|
+
<li class="public ">
|
163
|
+
<span class="summary_signature">
|
164
|
+
|
165
|
+
<a href="#description-instance_method" title="#description (instance method)">#<strong>description</strong> ⇒ Object </a>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<span class="note title readonly">readonly</span>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<span class="summary_desc"><div class='inline'>
|
185
|
+
<p>Plugin metadata.</p>
|
186
|
+
</div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
<li class="public ">
|
192
|
+
<span class="summary_signature">
|
193
|
+
|
194
|
+
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ Object </a>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
</span>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<span class="note title readonly">readonly</span>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<span class="summary_desc"><div class='inline'>
|
214
|
+
<p>Plugin metadata.</p>
|
215
|
+
</div></span>
|
216
|
+
|
217
|
+
</li>
|
218
|
+
|
219
|
+
|
220
|
+
<li class="public ">
|
221
|
+
<span class="summary_signature">
|
222
|
+
|
223
|
+
<a href="#version-instance_method" title="#version (instance method)">#<strong>version</strong> ⇒ Object </a>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</span>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
<span class="note title readonly">readonly</span>
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
<span class="summary_desc"><div class='inline'>
|
243
|
+
<p>Plugin metadata.</p>
|
244
|
+
</div></span>
|
245
|
+
|
246
|
+
</li>
|
247
|
+
|
248
|
+
|
249
|
+
</ul>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
<h2>
|
256
|
+
Instance Method Summary
|
257
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
258
|
+
</h2>
|
259
|
+
|
260
|
+
<ul class="summary">
|
261
|
+
|
262
|
+
<li class="public ">
|
263
|
+
<span class="summary_signature">
|
264
|
+
|
265
|
+
<a href="#export-instance_method" title="#export (instance method)">#<strong>export</strong>(metrics_data, options = {}) ⇒ Hash </a>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
</span>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
<span class="summary_desc"><div class='inline'>
|
280
|
+
<p>Export metrics data (must be implemented by subclasses).</p>
|
281
|
+
</div></span>
|
282
|
+
|
283
|
+
</li>
|
284
|
+
|
285
|
+
|
286
|
+
<li class="public ">
|
287
|
+
<span class="summary_signature">
|
288
|
+
|
289
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name: nil, version: '1.0.0', description: nil) ⇒ BaseExporter </a>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
</span>
|
294
|
+
|
295
|
+
|
296
|
+
<span class="note title constructor">constructor</span>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
<span class="summary_desc"><div class='inline'>
|
306
|
+
<p>A new instance of BaseExporter.</p>
|
307
|
+
</div></span>
|
308
|
+
|
309
|
+
</li>
|
310
|
+
|
311
|
+
|
312
|
+
<li class="protected ">
|
313
|
+
<span class="summary_signature">
|
314
|
+
|
315
|
+
<a href="#log_plugin_event-instance_method" title="#log_plugin_event (instance method)">#<strong>log_plugin_event</strong>(level, message, **context) ⇒ Object </a>
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
</span>
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
<span class="note title protected">protected</span>
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
<span class="summary_desc"><div class='inline'>
|
330
|
+
<p>Structured logging helper for plugin events.</p>
|
331
|
+
</div></span>
|
332
|
+
|
333
|
+
</li>
|
334
|
+
|
335
|
+
|
336
|
+
<li class="protected ">
|
337
|
+
<span class="summary_signature">
|
338
|
+
|
339
|
+
<a href="#log_plugin_exception-instance_method" title="#log_plugin_exception (instance method)">#<strong>log_plugin_exception</strong>(exception, **context) ⇒ Object </a>
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
</span>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
<span class="note title protected">protected</span>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
<span class="summary_desc"><div class='inline'>
|
354
|
+
<p>Structured logging helper for plugin errors.</p>
|
355
|
+
</div></span>
|
356
|
+
|
357
|
+
</li>
|
358
|
+
|
359
|
+
|
360
|
+
<li class="protected ">
|
361
|
+
<span class="summary_signature">
|
362
|
+
|
363
|
+
<a href="#log_plugin_performance-instance_method" title="#log_plugin_performance (instance method)">#<strong>log_plugin_performance</strong>(operation, duration, **context) ⇒ Object </a>
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
</span>
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
<span class="note title protected">protected</span>
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
<span class="summary_desc"><div class='inline'>
|
378
|
+
<p>Structured logging helper for plugin performance events.</p>
|
379
|
+
</div></span>
|
380
|
+
|
381
|
+
</li>
|
382
|
+
|
383
|
+
|
384
|
+
<li class="public ">
|
385
|
+
<span class="summary_signature">
|
386
|
+
|
387
|
+
<a href="#metadata-instance_method" title="#metadata (instance method)">#<strong>metadata</strong> ⇒ Hash </a>
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
(also: #plugin_info)
|
392
|
+
|
393
|
+
</span>
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
<span class="summary_desc"><div class='inline'>
|
404
|
+
<p>Get plugin metadata.</p>
|
405
|
+
</div></span>
|
406
|
+
|
407
|
+
</li>
|
408
|
+
|
409
|
+
|
410
|
+
<li class="public ">
|
411
|
+
<span class="summary_signature">
|
412
|
+
|
413
|
+
<a href="#on_cache_sync-instance_method" title="#on_cache_sync (instance method)">#<strong>on_cache_sync</strong>(sync_data) ⇒ Object </a>
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
</span>
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
<span class="summary_desc"><div class='inline'>
|
428
|
+
<p>Called when cache sync occurs.</p>
|
429
|
+
</div></span>
|
430
|
+
|
431
|
+
</li>
|
432
|
+
|
433
|
+
|
434
|
+
<li class="public ">
|
435
|
+
<span class="summary_signature">
|
436
|
+
|
437
|
+
<a href="#on_export_complete-instance_method" title="#on_export_complete (instance method)">#<strong>on_export_complete</strong>(completion_data) ⇒ Object </a>
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
</span>
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
<span class="summary_desc"><div class='inline'>
|
452
|
+
<p>Called when export completes.</p>
|
453
|
+
</div></span>
|
454
|
+
|
455
|
+
</li>
|
456
|
+
|
457
|
+
|
458
|
+
<li class="public ">
|
459
|
+
<span class="summary_signature">
|
460
|
+
|
461
|
+
<a href="#on_export_request-instance_method" title="#on_export_request (instance method)">#<strong>on_export_request</strong>(request_data) ⇒ Object </a>
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
</span>
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
<span class="summary_desc"><div class='inline'>
|
476
|
+
<p>Called when export is requested.</p>
|
477
|
+
</div></span>
|
478
|
+
|
479
|
+
</li>
|
480
|
+
|
481
|
+
|
482
|
+
<li class="public ">
|
483
|
+
<span class="summary_signature">
|
484
|
+
|
485
|
+
<a href="#safe_export-instance_method" title="#safe_export (instance method)">#<strong>safe_export</strong>(metrics_data, options = {}) ⇒ Hash </a>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
</span>
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
<span class="summary_desc"><div class='inline'>
|
500
|
+
<p>Safe export wrapper with error handling and timing.</p>
|
501
|
+
</div></span>
|
502
|
+
|
503
|
+
</li>
|
504
|
+
|
505
|
+
|
506
|
+
<li class="public ">
|
507
|
+
<span class="summary_signature">
|
508
|
+
|
509
|
+
<a href="#supported_formats-instance_method" title="#supported_formats (instance method)">#<strong>supported_formats</strong> ⇒ Array<String> </a>
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
</span>
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
<span class="summary_desc"><div class='inline'>
|
524
|
+
<p>Get supported formats (should be implemented by subclasses).</p>
|
525
|
+
</div></span>
|
526
|
+
|
527
|
+
</li>
|
528
|
+
|
529
|
+
|
530
|
+
<li class="public ">
|
531
|
+
<span class="summary_signature">
|
532
|
+
|
533
|
+
<a href="#supports_format%3F-instance_method" title="#supports_format? (instance method)">#<strong>supports_format?</strong>(format) ⇒ Boolean </a>
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
</span>
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
<span class="summary_desc"><div class='inline'>
|
548
|
+
<p>Check if plugin supports a specific format (must be implemented by subclasses).</p>
|
549
|
+
</div></span>
|
550
|
+
|
551
|
+
</li>
|
552
|
+
|
553
|
+
|
554
|
+
</ul>
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
<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>
|
567
|
+
<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>
|
568
|
+
|
569
|
+
<div id="constructor_details" class="method_details_list">
|
570
|
+
<h2>Constructor Details</h2>
|
571
|
+
|
572
|
+
<div class="method_details first">
|
573
|
+
<h3 class="signature first" id="initialize-instance_method">
|
574
|
+
|
575
|
+
#<strong>initialize</strong>(name: nil, version: '1.0.0', description: nil) ⇒ <tt><span class='object_link'><a href="" title="Tasker::Telemetry::Plugins::BaseExporter (class)">BaseExporter</a></span></tt>
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
</h3><div class="docstring">
|
582
|
+
<div class="discussion">
|
583
|
+
|
584
|
+
<p>Returns a new instance of BaseExporter.</p>
|
585
|
+
|
586
|
+
|
587
|
+
</div>
|
588
|
+
</div>
|
589
|
+
<div class="tags">
|
590
|
+
|
591
|
+
|
592
|
+
</div><table class="source_code">
|
593
|
+
<tr>
|
594
|
+
<td>
|
595
|
+
<pre class="lines">
|
596
|
+
|
597
|
+
|
598
|
+
32
|
599
|
+
33
|
600
|
+
34
|
601
|
+
35
|
602
|
+
36
|
603
|
+
37
|
604
|
+
38
|
605
|
+
39
|
606
|
+
40
|
607
|
+
41
|
608
|
+
42
|
609
|
+
43</pre>
|
610
|
+
</td>
|
611
|
+
<td>
|
612
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 32</span>
|
613
|
+
|
614
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>name:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>version:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>description:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
615
|
+
<span class='comment'># Safe class name extraction for test environments where class.name might be nil
|
616
|
+
</span> <span class='id identifier rubyid_default_name'>default_name</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='kw'>self</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>
|
617
|
+
<span class='kw'>self</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='period'>.</span><span class='id identifier rubyid_demodulize'>demodulize</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span>
|
618
|
+
<span class='kw'>else</span>
|
619
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>anonymous_exporter</span><span class='tstring_end'>'</span></span>
|
620
|
+
<span class='kw'>end</span>
|
621
|
+
|
622
|
+
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>||</span> <span class='id identifier rubyid_default_name'>default_name</span>
|
623
|
+
<span class='ivar'>@version</span> <span class='op'>=</span> <span class='id identifier rubyid_version'>version</span>
|
624
|
+
<span class='ivar'>@description</span> <span class='op'>=</span> <span class='id identifier rubyid_description'>description</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='embexpr_end'>}</span><span class='tstring_content'> telemetry exporter</span><span class='tstring_end'>"</span></span>
|
625
|
+
<span class='kw'>end</span></pre>
|
626
|
+
</td>
|
627
|
+
</tr>
|
628
|
+
</table>
|
629
|
+
</div>
|
630
|
+
|
631
|
+
</div>
|
632
|
+
|
633
|
+
<div id="instance_attr_details" class="attr_details">
|
634
|
+
<h2>Instance Attribute Details</h2>
|
635
|
+
|
636
|
+
|
637
|
+
<span id=""></span>
|
638
|
+
<div class="method_details first">
|
639
|
+
<h3 class="signature first" id="description-instance_method">
|
640
|
+
|
641
|
+
#<strong>description</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
</h3><div class="docstring">
|
648
|
+
<div class="discussion">
|
649
|
+
|
650
|
+
<p>Plugin metadata</p>
|
651
|
+
|
652
|
+
|
653
|
+
</div>
|
654
|
+
</div>
|
655
|
+
<div class="tags">
|
656
|
+
|
657
|
+
|
658
|
+
</div><table class="source_code">
|
659
|
+
<tr>
|
660
|
+
<td>
|
661
|
+
<pre class="lines">
|
662
|
+
|
663
|
+
|
664
|
+
30
|
665
|
+
31
|
666
|
+
32</pre>
|
667
|
+
</td>
|
668
|
+
<td>
|
669
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 30</span>
|
670
|
+
|
671
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_description'>description</span>
|
672
|
+
<span class='ivar'>@description</span>
|
673
|
+
<span class='kw'>end</span></pre>
|
674
|
+
</td>
|
675
|
+
</tr>
|
676
|
+
</table>
|
677
|
+
</div>
|
678
|
+
|
679
|
+
|
680
|
+
<span id=""></span>
|
681
|
+
<div class="method_details ">
|
682
|
+
<h3 class="signature " id="name-instance_method">
|
683
|
+
|
684
|
+
#<strong>name</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
</h3><div class="docstring">
|
691
|
+
<div class="discussion">
|
692
|
+
|
693
|
+
<p>Plugin metadata</p>
|
694
|
+
|
695
|
+
|
696
|
+
</div>
|
697
|
+
</div>
|
698
|
+
<div class="tags">
|
699
|
+
|
700
|
+
|
701
|
+
</div><table class="source_code">
|
702
|
+
<tr>
|
703
|
+
<td>
|
704
|
+
<pre class="lines">
|
705
|
+
|
706
|
+
|
707
|
+
30
|
708
|
+
31
|
709
|
+
32</pre>
|
710
|
+
</td>
|
711
|
+
<td>
|
712
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 30</span>
|
713
|
+
|
714
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
715
|
+
<span class='ivar'>@name</span>
|
716
|
+
<span class='kw'>end</span></pre>
|
717
|
+
</td>
|
718
|
+
</tr>
|
719
|
+
</table>
|
720
|
+
</div>
|
721
|
+
|
722
|
+
|
723
|
+
<span id=""></span>
|
724
|
+
<div class="method_details ">
|
725
|
+
<h3 class="signature " id="version-instance_method">
|
726
|
+
|
727
|
+
#<strong>version</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
728
|
+
|
729
|
+
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
</h3><div class="docstring">
|
734
|
+
<div class="discussion">
|
735
|
+
|
736
|
+
<p>Plugin metadata</p>
|
737
|
+
|
738
|
+
|
739
|
+
</div>
|
740
|
+
</div>
|
741
|
+
<div class="tags">
|
742
|
+
|
743
|
+
|
744
|
+
</div><table class="source_code">
|
745
|
+
<tr>
|
746
|
+
<td>
|
747
|
+
<pre class="lines">
|
748
|
+
|
749
|
+
|
750
|
+
30
|
751
|
+
31
|
752
|
+
32</pre>
|
753
|
+
</td>
|
754
|
+
<td>
|
755
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 30</span>
|
756
|
+
|
757
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span>
|
758
|
+
<span class='ivar'>@version</span>
|
759
|
+
<span class='kw'>end</span></pre>
|
760
|
+
</td>
|
761
|
+
</tr>
|
762
|
+
</table>
|
763
|
+
</div>
|
764
|
+
|
765
|
+
</div>
|
766
|
+
|
767
|
+
|
768
|
+
<div id="instance_method_details" class="method_details_list">
|
769
|
+
<h2>Instance Method Details</h2>
|
770
|
+
|
771
|
+
|
772
|
+
<div class="method_details first">
|
773
|
+
<h3 class="signature first" id="export-instance_method">
|
774
|
+
|
775
|
+
#<strong>export</strong>(metrics_data, options = {}) ⇒ <tt>Hash</tt>
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
</h3><div class="docstring">
|
782
|
+
<div class="discussion">
|
783
|
+
|
784
|
+
<p>Export metrics data (must be implemented by subclasses)</p>
|
785
|
+
|
786
|
+
|
787
|
+
</div>
|
788
|
+
</div>
|
789
|
+
<div class="tags">
|
790
|
+
<p class="tag_title">Parameters:</p>
|
791
|
+
<ul class="param">
|
792
|
+
|
793
|
+
<li>
|
794
|
+
|
795
|
+
<span class='name'>metrics_data</span>
|
796
|
+
|
797
|
+
|
798
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
—
|
803
|
+
<div class='inline'>
|
804
|
+
<p>Metrics data to export</p>
|
805
|
+
</div>
|
806
|
+
|
807
|
+
</li>
|
808
|
+
|
809
|
+
<li>
|
810
|
+
|
811
|
+
<span class='name'>options</span>
|
812
|
+
|
813
|
+
|
814
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
815
|
+
|
816
|
+
|
817
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
818
|
+
|
819
|
+
|
820
|
+
—
|
821
|
+
<div class='inline'>
|
822
|
+
<p>Export options</p>
|
823
|
+
</div>
|
824
|
+
|
825
|
+
</li>
|
826
|
+
|
827
|
+
</ul>
|
828
|
+
|
829
|
+
<p class="tag_title">Returns:</p>
|
830
|
+
<ul class="return">
|
831
|
+
|
832
|
+
<li>
|
833
|
+
|
834
|
+
|
835
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
—
|
840
|
+
<div class='inline'>
|
841
|
+
<p>Export result with :success, :format, :data keys</p>
|
842
|
+
</div>
|
843
|
+
|
844
|
+
</li>
|
845
|
+
|
846
|
+
</ul>
|
847
|
+
<p class="tag_title">Raises:</p>
|
848
|
+
<ul class="raise">
|
849
|
+
|
850
|
+
<li>
|
851
|
+
|
852
|
+
|
853
|
+
<span class='type'>(<tt>NotImplementedError</tt>)</span>
|
854
|
+
|
855
|
+
|
856
|
+
|
857
|
+
—
|
858
|
+
<div class='inline'>
|
859
|
+
<p>If not implemented by subclass</p>
|
860
|
+
</div>
|
861
|
+
|
862
|
+
</li>
|
863
|
+
|
864
|
+
</ul>
|
865
|
+
|
866
|
+
</div><table class="source_code">
|
867
|
+
<tr>
|
868
|
+
<td>
|
869
|
+
<pre class="lines">
|
870
|
+
|
871
|
+
|
872
|
+
51
|
873
|
+
52
|
874
|
+
53</pre>
|
875
|
+
</td>
|
876
|
+
<td>
|
877
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 51</span>
|
878
|
+
|
879
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_export'>export</span><span class='lparen'>(</span><span class='id identifier rubyid_metrics_data'>metrics_data</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>
|
880
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='kw'>self</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='embexpr_end'>}</span><span class='tstring_content'> must implement #export method</span><span class='tstring_end'>"</span></span>
|
881
|
+
<span class='kw'>end</span></pre>
|
882
|
+
</td>
|
883
|
+
</tr>
|
884
|
+
</table>
|
885
|
+
</div>
|
886
|
+
|
887
|
+
<div class="method_details ">
|
888
|
+
<h3 class="signature " id="log_plugin_event-instance_method">
|
889
|
+
|
890
|
+
#<strong>log_plugin_event</strong>(level, message, **context) ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
|
895
|
+
|
896
|
+
</h3><div class="docstring">
|
897
|
+
<div class="discussion">
|
898
|
+
|
899
|
+
<p>Structured logging helper for plugin events</p>
|
900
|
+
|
901
|
+
|
902
|
+
</div>
|
903
|
+
</div>
|
904
|
+
<div class="tags">
|
905
|
+
<p class="tag_title">Parameters:</p>
|
906
|
+
<ul class="param">
|
907
|
+
|
908
|
+
<li>
|
909
|
+
|
910
|
+
<span class='name'>level</span>
|
911
|
+
|
912
|
+
|
913
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
914
|
+
|
915
|
+
|
916
|
+
|
917
|
+
—
|
918
|
+
<div class='inline'>
|
919
|
+
<p>Log level</p>
|
920
|
+
</div>
|
921
|
+
|
922
|
+
</li>
|
923
|
+
|
924
|
+
<li>
|
925
|
+
|
926
|
+
<span class='name'>message</span>
|
927
|
+
|
928
|
+
|
929
|
+
<span class='type'>(<tt>String</tt>)</span>
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
—
|
934
|
+
<div class='inline'>
|
935
|
+
<p>Log message</p>
|
936
|
+
</div>
|
937
|
+
|
938
|
+
</li>
|
939
|
+
|
940
|
+
<li>
|
941
|
+
|
942
|
+
<span class='name'>context</span>
|
943
|
+
|
944
|
+
|
945
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
—
|
950
|
+
<div class='inline'>
|
951
|
+
<p>Additional context</p>
|
952
|
+
</div>
|
953
|
+
|
954
|
+
</li>
|
955
|
+
|
956
|
+
</ul>
|
957
|
+
|
958
|
+
|
959
|
+
</div><table class="source_code">
|
960
|
+
<tr>
|
961
|
+
<td>
|
962
|
+
<pre class="lines">
|
963
|
+
|
964
|
+
|
965
|
+
198
|
966
|
+
199
|
967
|
+
200
|
968
|
+
201
|
969
|
+
202
|
970
|
+
203
|
971
|
+
204
|
972
|
+
205
|
973
|
+
206
|
974
|
+
207
|
975
|
+
208
|
976
|
+
209
|
977
|
+
210
|
978
|
+
211
|
979
|
+
212
|
980
|
+
213</pre>
|
981
|
+
</td>
|
982
|
+
<td>
|
983
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 198</span>
|
984
|
+
|
985
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_log_plugin_event'>log_plugin_event</span><span class='lparen'>(</span><span class='id identifier rubyid_level'>level</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
986
|
+
<span class='comment'># Safe class name extraction to avoid demodulize errors
|
987
|
+
</span> <span class='id identifier rubyid_class_name'>class_name</span> <span class='op'>=</span> <span class='kw'>self</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='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AnonymousExporter</span><span class='tstring_end'>'</span></span>
|
988
|
+
|
989
|
+
<span class='id identifier rubyid_log_structured'>log_structured</span><span class='lparen'>(</span><span class='id identifier rubyid_level'>level</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
|
990
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>telemetry_plugin</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
991
|
+
<span class='label'>entity_id:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
992
|
+
<span class='label'>plugin_name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
993
|
+
<span class='label'>plugin_version:</span> <span class='ivar'>@version</span><span class='comma'>,</span>
|
994
|
+
<span class='label'>plugin_class:</span> <span class='id identifier rubyid_class_name'>class_name</span><span class='comma'>,</span>
|
995
|
+
<span class='op'>**</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
996
|
+
<span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
997
|
+
<span class='comment'># Fallback logging if structured logging fails
|
998
|
+
</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Structured logging failed: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span>
|
999
|
+
<span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_level'>level</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span>
|
1000
|
+
<span class='kw'>end</span></pre>
|
1001
|
+
</td>
|
1002
|
+
</tr>
|
1003
|
+
</table>
|
1004
|
+
</div>
|
1005
|
+
|
1006
|
+
<div class="method_details ">
|
1007
|
+
<h3 class="signature " id="log_plugin_exception-instance_method">
|
1008
|
+
|
1009
|
+
#<strong>log_plugin_exception</strong>(exception, **context) ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
|
1014
|
+
|
1015
|
+
</h3><div class="docstring">
|
1016
|
+
<div class="discussion">
|
1017
|
+
|
1018
|
+
<p>Structured logging helper for plugin errors</p>
|
1019
|
+
|
1020
|
+
|
1021
|
+
</div>
|
1022
|
+
</div>
|
1023
|
+
<div class="tags">
|
1024
|
+
<p class="tag_title">Parameters:</p>
|
1025
|
+
<ul class="param">
|
1026
|
+
|
1027
|
+
<li>
|
1028
|
+
|
1029
|
+
<span class='name'>exception</span>
|
1030
|
+
|
1031
|
+
|
1032
|
+
<span class='type'>(<tt>Exception</tt>)</span>
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
—
|
1037
|
+
<div class='inline'>
|
1038
|
+
<p>Exception to log</p>
|
1039
|
+
</div>
|
1040
|
+
|
1041
|
+
</li>
|
1042
|
+
|
1043
|
+
<li>
|
1044
|
+
|
1045
|
+
<span class='name'>context</span>
|
1046
|
+
|
1047
|
+
|
1048
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1049
|
+
|
1050
|
+
|
1051
|
+
|
1052
|
+
—
|
1053
|
+
<div class='inline'>
|
1054
|
+
<p>Additional context</p>
|
1055
|
+
</div>
|
1056
|
+
|
1057
|
+
</li>
|
1058
|
+
|
1059
|
+
</ul>
|
1060
|
+
|
1061
|
+
|
1062
|
+
</div><table class="source_code">
|
1063
|
+
<tr>
|
1064
|
+
<td>
|
1065
|
+
<pre class="lines">
|
1066
|
+
|
1067
|
+
|
1068
|
+
233
|
1069
|
+
234
|
1070
|
+
235
|
1071
|
+
236
|
1072
|
+
237
|
1073
|
+
238
|
1074
|
+
239
|
1075
|
+
240
|
1076
|
+
241
|
1077
|
+
242</pre>
|
1078
|
+
</td>
|
1079
|
+
<td>
|
1080
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 233</span>
|
1081
|
+
|
1082
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_log_plugin_exception'>log_plugin_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
1083
|
+
<span class='id identifier rubyid_log_exception'>log_exception</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='comma'>,</span>
|
1084
|
+
<span class='label'>context:</span> <span class='lbrace'>{</span>
|
1085
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>telemetry_plugin</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1086
|
+
<span class='label'>entity_id:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
1087
|
+
<span class='label'>plugin_name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
1088
|
+
<span class='label'>plugin_version:</span> <span class='ivar'>@version</span><span class='comma'>,</span>
|
1089
|
+
<span class='op'>**</span><span class='id identifier rubyid_context'>context</span>
|
1090
|
+
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
1091
|
+
<span class='kw'>end</span></pre>
|
1092
|
+
</td>
|
1093
|
+
</tr>
|
1094
|
+
</table>
|
1095
|
+
</div>
|
1096
|
+
|
1097
|
+
<div class="method_details ">
|
1098
|
+
<h3 class="signature " id="log_plugin_performance-instance_method">
|
1099
|
+
|
1100
|
+
#<strong>log_plugin_performance</strong>(operation, duration, **context) ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
1101
|
+
|
1102
|
+
|
1103
|
+
|
1104
|
+
|
1105
|
+
|
1106
|
+
</h3><div class="docstring">
|
1107
|
+
<div class="discussion">
|
1108
|
+
|
1109
|
+
<p>Structured logging helper for plugin performance events</p>
|
1110
|
+
|
1111
|
+
|
1112
|
+
</div>
|
1113
|
+
</div>
|
1114
|
+
<div class="tags">
|
1115
|
+
<p class="tag_title">Parameters:</p>
|
1116
|
+
<ul class="param">
|
1117
|
+
|
1118
|
+
<li>
|
1119
|
+
|
1120
|
+
<span class='name'>operation</span>
|
1121
|
+
|
1122
|
+
|
1123
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1124
|
+
|
1125
|
+
|
1126
|
+
|
1127
|
+
—
|
1128
|
+
<div class='inline'>
|
1129
|
+
<p>Operation name</p>
|
1130
|
+
</div>
|
1131
|
+
|
1132
|
+
</li>
|
1133
|
+
|
1134
|
+
<li>
|
1135
|
+
|
1136
|
+
<span class='name'>duration</span>
|
1137
|
+
|
1138
|
+
|
1139
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
1140
|
+
|
1141
|
+
|
1142
|
+
|
1143
|
+
—
|
1144
|
+
<div class='inline'>
|
1145
|
+
<p>Duration in seconds</p>
|
1146
|
+
</div>
|
1147
|
+
|
1148
|
+
</li>
|
1149
|
+
|
1150
|
+
<li>
|
1151
|
+
|
1152
|
+
<span class='name'>context</span>
|
1153
|
+
|
1154
|
+
|
1155
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1156
|
+
|
1157
|
+
|
1158
|
+
|
1159
|
+
—
|
1160
|
+
<div class='inline'>
|
1161
|
+
<p>Additional context</p>
|
1162
|
+
</div>
|
1163
|
+
|
1164
|
+
</li>
|
1165
|
+
|
1166
|
+
</ul>
|
1167
|
+
|
1168
|
+
|
1169
|
+
</div><table class="source_code">
|
1170
|
+
<tr>
|
1171
|
+
<td>
|
1172
|
+
<pre class="lines">
|
1173
|
+
|
1174
|
+
|
1175
|
+
220
|
1176
|
+
221
|
1177
|
+
222
|
1178
|
+
223
|
1179
|
+
224
|
1180
|
+
225
|
1181
|
+
226
|
1182
|
+
227</pre>
|
1183
|
+
</td>
|
1184
|
+
<td>
|
1185
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 220</span>
|
1186
|
+
|
1187
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_log_plugin_performance'>log_plugin_performance</span><span class='lparen'>(</span><span class='id identifier rubyid_operation'>operation</span><span class='comma'>,</span> <span class='id identifier rubyid_duration'>duration</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
1188
|
+
<span class='id identifier rubyid_log_performance_event'>log_performance_event</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>plugin_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_operation'>operation</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_duration'>duration</span><span class='comma'>,</span>
|
1189
|
+
<span class='label'>entity_type:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>telemetry_plugin</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1190
|
+
<span class='label'>entity_id:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
1191
|
+
<span class='label'>plugin_name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
1192
|
+
<span class='label'>plugin_version:</span> <span class='ivar'>@version</span><span class='comma'>,</span>
|
1193
|
+
<span class='op'>**</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
1194
|
+
<span class='kw'>end</span></pre>
|
1195
|
+
</td>
|
1196
|
+
</tr>
|
1197
|
+
</table>
|
1198
|
+
</div>
|
1199
|
+
|
1200
|
+
<div class="method_details ">
|
1201
|
+
<h3 class="signature " id="metadata-instance_method">
|
1202
|
+
|
1203
|
+
#<strong>metadata</strong> ⇒ <tt>Hash</tt>
|
1204
|
+
|
1205
|
+
|
1206
|
+
|
1207
|
+
<span class="aliases">Also known as:
|
1208
|
+
<span class="names"><span id='plugin_info-instance_method'>plugin_info</span></span>
|
1209
|
+
</span>
|
1210
|
+
|
1211
|
+
|
1212
|
+
|
1213
|
+
</h3><div class="docstring">
|
1214
|
+
<div class="discussion">
|
1215
|
+
|
1216
|
+
<p>Get plugin metadata</p>
|
1217
|
+
|
1218
|
+
|
1219
|
+
</div>
|
1220
|
+
</div>
|
1221
|
+
<div class="tags">
|
1222
|
+
|
1223
|
+
<p class="tag_title">Returns:</p>
|
1224
|
+
<ul class="return">
|
1225
|
+
|
1226
|
+
<li>
|
1227
|
+
|
1228
|
+
|
1229
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1230
|
+
|
1231
|
+
|
1232
|
+
|
1233
|
+
—
|
1234
|
+
<div class='inline'>
|
1235
|
+
<p>Plugin metadata</p>
|
1236
|
+
</div>
|
1237
|
+
|
1238
|
+
</li>
|
1239
|
+
|
1240
|
+
</ul>
|
1241
|
+
|
1242
|
+
</div><table class="source_code">
|
1243
|
+
<tr>
|
1244
|
+
<td>
|
1245
|
+
<pre class="lines">
|
1246
|
+
|
1247
|
+
|
1248
|
+
149
|
1249
|
+
150
|
1250
|
+
151
|
1251
|
+
152
|
1252
|
+
153
|
1253
|
+
154
|
1254
|
+
155
|
1255
|
+
156
|
1256
|
+
157
|
1257
|
+
158
|
1258
|
+
159
|
1259
|
+
160
|
1260
|
+
161
|
1261
|
+
162
|
1262
|
+
163
|
1263
|
+
164
|
1264
|
+
165
|
1265
|
+
166
|
1266
|
+
167
|
1267
|
+
168
|
1268
|
+
169
|
1269
|
+
170</pre>
|
1270
|
+
</td>
|
1271
|
+
<td>
|
1272
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 149</span>
|
1273
|
+
|
1274
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_metadata'>metadata</span>
|
1275
|
+
<span class='comment'># Use class constants when available, otherwise use instance variables
|
1276
|
+
</span> <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='symbol'>:VERSION</span><span class='rparen'>)</span>
|
1277
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='symbol'>:VERSION</span><span class='rparen'>)</span>
|
1278
|
+
<span class='kw'>else</span>
|
1279
|
+
<span class='ivar'>@version</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>'</span></span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>unknown</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='ivar'>@version</span>
|
1280
|
+
<span class='kw'>end</span>
|
1281
|
+
|
1282
|
+
<span class='id identifier rubyid_description'>description</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='symbol'>:DESCRIPTION</span><span class='rparen'>)</span>
|
1283
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='symbol'>:DESCRIPTION</span><span class='rparen'>)</span>
|
1284
|
+
<span class='kw'>else</span>
|
1285
|
+
<span class='kw'>nil</span> <span class='comment'># Return nil when no DESCRIPTION constant is defined
|
1286
|
+
</span> <span class='kw'>end</span>
|
1287
|
+
|
1288
|
+
<span class='lbrace'>{</span>
|
1289
|
+
<span class='label'>name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
1290
|
+
<span class='label'>version:</span> <span class='id identifier rubyid_version'>version</span><span class='comma'>,</span>
|
1291
|
+
<span class='label'>description:</span> <span class='id identifier rubyid_description'>description</span><span class='comma'>,</span>
|
1292
|
+
<span class='label'>supported_formats:</span> <span class='id identifier rubyid_supported_formats'>supported_formats</span><span class='comma'>,</span>
|
1293
|
+
<span class='label'>class_name:</span> <span class='kw'>self</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>
|
1294
|
+
<span class='rbrace'>}</span>
|
1295
|
+
<span class='kw'>end</span></pre>
|
1296
|
+
</td>
|
1297
|
+
</tr>
|
1298
|
+
</table>
|
1299
|
+
</div>
|
1300
|
+
|
1301
|
+
<div class="method_details ">
|
1302
|
+
<h3 class="signature " id="on_cache_sync-instance_method">
|
1303
|
+
|
1304
|
+
#<strong>on_cache_sync</strong>(sync_data) ⇒ <tt>Object</tt>
|
1305
|
+
|
1306
|
+
|
1307
|
+
|
1308
|
+
|
1309
|
+
|
1310
|
+
</h3><div class="docstring">
|
1311
|
+
<div class="discussion">
|
1312
|
+
|
1313
|
+
<p>Called when cache sync occurs</p>
|
1314
|
+
|
1315
|
+
|
1316
|
+
</div>
|
1317
|
+
</div>
|
1318
|
+
<div class="tags">
|
1319
|
+
<p class="tag_title">Parameters:</p>
|
1320
|
+
<ul class="param">
|
1321
|
+
|
1322
|
+
<li>
|
1323
|
+
|
1324
|
+
<span class='name'>sync_data</span>
|
1325
|
+
|
1326
|
+
|
1327
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1328
|
+
|
1329
|
+
|
1330
|
+
|
1331
|
+
—
|
1332
|
+
<div class='inline'>
|
1333
|
+
<p>Cache sync information</p>
|
1334
|
+
</div>
|
1335
|
+
|
1336
|
+
</li>
|
1337
|
+
|
1338
|
+
</ul>
|
1339
|
+
|
1340
|
+
|
1341
|
+
</div><table class="source_code">
|
1342
|
+
<tr>
|
1343
|
+
<td>
|
1344
|
+
<pre class="lines">
|
1345
|
+
|
1346
|
+
|
1347
|
+
76
|
1348
|
+
77
|
1349
|
+
78</pre>
|
1350
|
+
</td>
|
1351
|
+
<td>
|
1352
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 76</span>
|
1353
|
+
|
1354
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_cache_sync'>on_cache_sync</span><span class='lparen'>(</span><span class='id identifier rubyid_sync_data'>sync_data</span><span class='rparen'>)</span>
|
1355
|
+
<span class='comment'># Default: no action
|
1356
|
+
</span><span class='kw'>end</span></pre>
|
1357
|
+
</td>
|
1358
|
+
</tr>
|
1359
|
+
</table>
|
1360
|
+
</div>
|
1361
|
+
|
1362
|
+
<div class="method_details ">
|
1363
|
+
<h3 class="signature " id="on_export_complete-instance_method">
|
1364
|
+
|
1365
|
+
#<strong>on_export_complete</strong>(completion_data) ⇒ <tt>Object</tt>
|
1366
|
+
|
1367
|
+
|
1368
|
+
|
1369
|
+
|
1370
|
+
|
1371
|
+
</h3><div class="docstring">
|
1372
|
+
<div class="discussion">
|
1373
|
+
|
1374
|
+
<p>Called when export completes</p>
|
1375
|
+
|
1376
|
+
|
1377
|
+
</div>
|
1378
|
+
</div>
|
1379
|
+
<div class="tags">
|
1380
|
+
<p class="tag_title">Parameters:</p>
|
1381
|
+
<ul class="param">
|
1382
|
+
|
1383
|
+
<li>
|
1384
|
+
|
1385
|
+
<span class='name'>completion_data</span>
|
1386
|
+
|
1387
|
+
|
1388
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1389
|
+
|
1390
|
+
|
1391
|
+
|
1392
|
+
—
|
1393
|
+
<div class='inline'>
|
1394
|
+
<p>Export completion information</p>
|
1395
|
+
</div>
|
1396
|
+
|
1397
|
+
</li>
|
1398
|
+
|
1399
|
+
</ul>
|
1400
|
+
|
1401
|
+
|
1402
|
+
</div><table class="source_code">
|
1403
|
+
<tr>
|
1404
|
+
<td>
|
1405
|
+
<pre class="lines">
|
1406
|
+
|
1407
|
+
|
1408
|
+
90
|
1409
|
+
91
|
1410
|
+
92</pre>
|
1411
|
+
</td>
|
1412
|
+
<td>
|
1413
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 90</span>
|
1414
|
+
|
1415
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_export_complete'>on_export_complete</span><span class='lparen'>(</span><span class='id identifier rubyid_completion_data'>completion_data</span><span class='rparen'>)</span>
|
1416
|
+
<span class='comment'># Default: no action
|
1417
|
+
</span><span class='kw'>end</span></pre>
|
1418
|
+
</td>
|
1419
|
+
</tr>
|
1420
|
+
</table>
|
1421
|
+
</div>
|
1422
|
+
|
1423
|
+
<div class="method_details ">
|
1424
|
+
<h3 class="signature " id="on_export_request-instance_method">
|
1425
|
+
|
1426
|
+
#<strong>on_export_request</strong>(request_data) ⇒ <tt>Object</tt>
|
1427
|
+
|
1428
|
+
|
1429
|
+
|
1430
|
+
|
1431
|
+
|
1432
|
+
</h3><div class="docstring">
|
1433
|
+
<div class="discussion">
|
1434
|
+
|
1435
|
+
<p>Called when export is requested</p>
|
1436
|
+
|
1437
|
+
|
1438
|
+
</div>
|
1439
|
+
</div>
|
1440
|
+
<div class="tags">
|
1441
|
+
<p class="tag_title">Parameters:</p>
|
1442
|
+
<ul class="param">
|
1443
|
+
|
1444
|
+
<li>
|
1445
|
+
|
1446
|
+
<span class='name'>request_data</span>
|
1447
|
+
|
1448
|
+
|
1449
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1450
|
+
|
1451
|
+
|
1452
|
+
|
1453
|
+
—
|
1454
|
+
<div class='inline'>
|
1455
|
+
<p>Export request information</p>
|
1456
|
+
</div>
|
1457
|
+
|
1458
|
+
</li>
|
1459
|
+
|
1460
|
+
</ul>
|
1461
|
+
|
1462
|
+
|
1463
|
+
</div><table class="source_code">
|
1464
|
+
<tr>
|
1465
|
+
<td>
|
1466
|
+
<pre class="lines">
|
1467
|
+
|
1468
|
+
|
1469
|
+
83
|
1470
|
+
84
|
1471
|
+
85</pre>
|
1472
|
+
</td>
|
1473
|
+
<td>
|
1474
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 83</span>
|
1475
|
+
|
1476
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_export_request'>on_export_request</span><span class='lparen'>(</span><span class='id identifier rubyid_request_data'>request_data</span><span class='rparen'>)</span>
|
1477
|
+
<span class='comment'># Default: no action
|
1478
|
+
</span><span class='kw'>end</span></pre>
|
1479
|
+
</td>
|
1480
|
+
</tr>
|
1481
|
+
</table>
|
1482
|
+
</div>
|
1483
|
+
|
1484
|
+
<div class="method_details ">
|
1485
|
+
<h3 class="signature " id="safe_export-instance_method">
|
1486
|
+
|
1487
|
+
#<strong>safe_export</strong>(metrics_data, options = {}) ⇒ <tt>Hash</tt>
|
1488
|
+
|
1489
|
+
|
1490
|
+
|
1491
|
+
|
1492
|
+
|
1493
|
+
</h3><div class="docstring">
|
1494
|
+
<div class="discussion">
|
1495
|
+
|
1496
|
+
<p>Safe export wrapper with error handling and timing</p>
|
1497
|
+
|
1498
|
+
|
1499
|
+
</div>
|
1500
|
+
</div>
|
1501
|
+
<div class="tags">
|
1502
|
+
<p class="tag_title">Parameters:</p>
|
1503
|
+
<ul class="param">
|
1504
|
+
|
1505
|
+
<li>
|
1506
|
+
|
1507
|
+
<span class='name'>metrics_data</span>
|
1508
|
+
|
1509
|
+
|
1510
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1511
|
+
|
1512
|
+
|
1513
|
+
|
1514
|
+
—
|
1515
|
+
<div class='inline'>
|
1516
|
+
<p>Metrics data to export</p>
|
1517
|
+
</div>
|
1518
|
+
|
1519
|
+
</li>
|
1520
|
+
|
1521
|
+
<li>
|
1522
|
+
|
1523
|
+
<span class='name'>options</span>
|
1524
|
+
|
1525
|
+
|
1526
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1527
|
+
|
1528
|
+
|
1529
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1530
|
+
|
1531
|
+
|
1532
|
+
—
|
1533
|
+
<div class='inline'>
|
1534
|
+
<p>Export options</p>
|
1535
|
+
</div>
|
1536
|
+
|
1537
|
+
</li>
|
1538
|
+
|
1539
|
+
</ul>
|
1540
|
+
|
1541
|
+
<p class="tag_title">Returns:</p>
|
1542
|
+
<ul class="return">
|
1543
|
+
|
1544
|
+
<li>
|
1545
|
+
|
1546
|
+
|
1547
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1548
|
+
|
1549
|
+
|
1550
|
+
|
1551
|
+
—
|
1552
|
+
<div class='inline'>
|
1553
|
+
<p>Export result with success/error information</p>
|
1554
|
+
</div>
|
1555
|
+
|
1556
|
+
</li>
|
1557
|
+
|
1558
|
+
</ul>
|
1559
|
+
|
1560
|
+
</div><table class="source_code">
|
1561
|
+
<tr>
|
1562
|
+
<td>
|
1563
|
+
<pre class="lines">
|
1564
|
+
|
1565
|
+
|
1566
|
+
99
|
1567
|
+
100
|
1568
|
+
101
|
1569
|
+
102
|
1570
|
+
103
|
1571
|
+
104
|
1572
|
+
105
|
1573
|
+
106
|
1574
|
+
107
|
1575
|
+
108
|
1576
|
+
109
|
1577
|
+
110
|
1578
|
+
111
|
1579
|
+
112
|
1580
|
+
113
|
1581
|
+
114
|
1582
|
+
115
|
1583
|
+
116
|
1584
|
+
117
|
1585
|
+
118
|
1586
|
+
119
|
1587
|
+
120
|
1588
|
+
121
|
1589
|
+
122
|
1590
|
+
123
|
1591
|
+
124
|
1592
|
+
125
|
1593
|
+
126
|
1594
|
+
127
|
1595
|
+
128
|
1596
|
+
129
|
1597
|
+
130
|
1598
|
+
131
|
1599
|
+
132
|
1600
|
+
133
|
1601
|
+
134
|
1602
|
+
135
|
1603
|
+
136
|
1604
|
+
137
|
1605
|
+
138
|
1606
|
+
139
|
1607
|
+
140
|
1608
|
+
141
|
1609
|
+
142
|
1610
|
+
143
|
1611
|
+
144</pre>
|
1612
|
+
</td>
|
1613
|
+
<td>
|
1614
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 99</span>
|
1615
|
+
|
1616
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_safe_export'>safe_export</span><span class='lparen'>(</span><span class='id identifier rubyid_metrics_data'>metrics_data</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>
|
1617
|
+
<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>
|
1618
|
+
|
1619
|
+
<span class='kw'>begin</span>
|
1620
|
+
<span class='comment'># Validate metrics data structure
|
1621
|
+
</span> <span class='id identifier rubyid_validate_metrics_data!'>validate_metrics_data!</span><span class='lparen'>(</span><span class='id identifier rubyid_metrics_data'>metrics_data</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:validate_metrics_data!</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1622
|
+
|
1623
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_export'>export</span><span class='lparen'>(</span><span class='id identifier rubyid_metrics_data'>metrics_data</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1624
|
+
|
1625
|
+
<span class='id identifier rubyid_duration'>duration</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>
|
1626
|
+
|
1627
|
+
<span class='id identifier rubyid_log_plugin_event'>log_plugin_event</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'>Plugin export completed</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1628
|
+
<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>
|
1629
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration'>duration</span><span class='comma'>,</span>
|
1630
|
+
<span class='label'>success:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1631
|
+
|
1632
|
+
<span class='lbrace'>{</span>
|
1633
|
+
<span class='label'>success:</span> <span class='kw'>true</span><span class='comma'>,</span>
|
1634
|
+
<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='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>unknown</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1635
|
+
<span class='label'>data:</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='symbol'>:data</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1636
|
+
<span class='label'>result:</span> <span class='id identifier rubyid_result'>result</span><span class='comma'>,</span> <span class='comment'># Include the full result for test compatibility
|
1637
|
+
</span> <span class='label'>plugin:</span> <span class='lbrace'>{</span> <span class='label'>name:</span> <span class='ivar'>@name</span><span class='comma'>,</span> <span class='label'>version:</span> <span class='ivar'>@version</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='comment'># Add plugin field for test compatibility
|
1638
|
+
</span> <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>
|
1639
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration'>duration</span><span class='comma'>,</span>
|
1640
|
+
<span class='label'>plugin_name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
1641
|
+
<span class='label'>plugin_version:</span> <span class='ivar'>@version</span>
|
1642
|
+
<span class='rbrace'>}</span>
|
1643
|
+
<span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
1644
|
+
<span class='id identifier rubyid_duration'>duration</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>
|
1645
|
+
|
1646
|
+
<span class='id identifier rubyid_log_plugin_event'>log_plugin_event</span><span class='lparen'>(</span><span class='symbol'>:error</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Plugin export failed</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1647
|
+
<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>
|
1648
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration'>duration</span><span class='comma'>,</span>
|
1649
|
+
<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>
|
1650
|
+
<span class='label'>success:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1651
|
+
|
1652
|
+
<span class='lbrace'>{</span>
|
1653
|
+
<span class='label'>success:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
1654
|
+
<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>
|
1655
|
+
<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>
|
1656
|
+
<span class='label'>duration_ms:</span> <span class='id identifier rubyid_duration'>duration</span><span class='comma'>,</span>
|
1657
|
+
<span class='label'>plugin_name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
1658
|
+
<span class='label'>plugin_version:</span> <span class='ivar'>@version</span>
|
1659
|
+
<span class='rbrace'>}</span>
|
1660
|
+
<span class='kw'>end</span>
|
1661
|
+
<span class='kw'>end</span></pre>
|
1662
|
+
</td>
|
1663
|
+
</tr>
|
1664
|
+
</table>
|
1665
|
+
</div>
|
1666
|
+
|
1667
|
+
<div class="method_details ">
|
1668
|
+
<h3 class="signature " id="supported_formats-instance_method">
|
1669
|
+
|
1670
|
+
#<strong>supported_formats</strong> ⇒ <tt>Array<String></tt>
|
1671
|
+
|
1672
|
+
|
1673
|
+
|
1674
|
+
|
1675
|
+
|
1676
|
+
</h3><div class="docstring">
|
1677
|
+
<div class="discussion">
|
1678
|
+
|
1679
|
+
<p>Get supported formats (should be implemented by subclasses)</p>
|
1680
|
+
|
1681
|
+
|
1682
|
+
</div>
|
1683
|
+
</div>
|
1684
|
+
<div class="tags">
|
1685
|
+
|
1686
|
+
<p class="tag_title">Returns:</p>
|
1687
|
+
<ul class="return">
|
1688
|
+
|
1689
|
+
<li>
|
1690
|
+
|
1691
|
+
|
1692
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
1693
|
+
|
1694
|
+
|
1695
|
+
|
1696
|
+
—
|
1697
|
+
<div class='inline'>
|
1698
|
+
<p>Supported export formats</p>
|
1699
|
+
</div>
|
1700
|
+
|
1701
|
+
</li>
|
1702
|
+
|
1703
|
+
</ul>
|
1704
|
+
|
1705
|
+
</div><table class="source_code">
|
1706
|
+
<tr>
|
1707
|
+
<td>
|
1708
|
+
<pre class="lines">
|
1709
|
+
|
1710
|
+
|
1711
|
+
67
|
1712
|
+
68
|
1713
|
+
69</pre>
|
1714
|
+
</td>
|
1715
|
+
<td>
|
1716
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 67</span>
|
1717
|
+
|
1718
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_supported_formats'>supported_formats</span>
|
1719
|
+
<span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1720
|
+
<span class='kw'>end</span></pre>
|
1721
|
+
</td>
|
1722
|
+
</tr>
|
1723
|
+
</table>
|
1724
|
+
</div>
|
1725
|
+
|
1726
|
+
<div class="method_details ">
|
1727
|
+
<h3 class="signature " id="supports_format?-instance_method">
|
1728
|
+
|
1729
|
+
#<strong>supports_format?</strong>(format) ⇒ <tt>Boolean</tt>
|
1730
|
+
|
1731
|
+
|
1732
|
+
|
1733
|
+
|
1734
|
+
|
1735
|
+
</h3><div class="docstring">
|
1736
|
+
<div class="discussion">
|
1737
|
+
|
1738
|
+
<p>Check if plugin supports a specific format (must be implemented by subclasses)</p>
|
1739
|
+
|
1740
|
+
|
1741
|
+
</div>
|
1742
|
+
</div>
|
1743
|
+
<div class="tags">
|
1744
|
+
<p class="tag_title">Parameters:</p>
|
1745
|
+
<ul class="param">
|
1746
|
+
|
1747
|
+
<li>
|
1748
|
+
|
1749
|
+
<span class='name'>format</span>
|
1750
|
+
|
1751
|
+
|
1752
|
+
<span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
|
1753
|
+
|
1754
|
+
|
1755
|
+
|
1756
|
+
—
|
1757
|
+
<div class='inline'>
|
1758
|
+
<p>Format to check</p>
|
1759
|
+
</div>
|
1760
|
+
|
1761
|
+
</li>
|
1762
|
+
|
1763
|
+
</ul>
|
1764
|
+
|
1765
|
+
<p class="tag_title">Returns:</p>
|
1766
|
+
<ul class="return">
|
1767
|
+
|
1768
|
+
<li>
|
1769
|
+
|
1770
|
+
|
1771
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1772
|
+
|
1773
|
+
|
1774
|
+
|
1775
|
+
—
|
1776
|
+
<div class='inline'>
|
1777
|
+
<p>Whether format is supported</p>
|
1778
|
+
</div>
|
1779
|
+
|
1780
|
+
</li>
|
1781
|
+
|
1782
|
+
</ul>
|
1783
|
+
<p class="tag_title">Raises:</p>
|
1784
|
+
<ul class="raise">
|
1785
|
+
|
1786
|
+
<li>
|
1787
|
+
|
1788
|
+
|
1789
|
+
<span class='type'>(<tt>NotImplementedError</tt>)</span>
|
1790
|
+
|
1791
|
+
|
1792
|
+
|
1793
|
+
—
|
1794
|
+
<div class='inline'>
|
1795
|
+
<p>If not implemented by subclass</p>
|
1796
|
+
</div>
|
1797
|
+
|
1798
|
+
</li>
|
1799
|
+
|
1800
|
+
</ul>
|
1801
|
+
|
1802
|
+
</div><table class="source_code">
|
1803
|
+
<tr>
|
1804
|
+
<td>
|
1805
|
+
<pre class="lines">
|
1806
|
+
|
1807
|
+
|
1808
|
+
60
|
1809
|
+
61
|
1810
|
+
62</pre>
|
1811
|
+
</td>
|
1812
|
+
<td>
|
1813
|
+
<pre class="code"><span class="info file"># File 'lib/tasker/telemetry/plugins/base_exporter.rb', line 60</span>
|
1814
|
+
|
1815
|
+
<span class='kw'>def</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>
|
1816
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='kw'>self</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='embexpr_end'>}</span><span class='tstring_content'> must implement #supports_format? method</span><span class='tstring_end'>"</span></span>
|
1817
|
+
<span class='kw'>end</span></pre>
|
1818
|
+
</td>
|
1819
|
+
</tr>
|
1820
|
+
</table>
|
1821
|
+
</div>
|
1822
|
+
|
1823
|
+
</div>
|
1824
|
+
|
1825
|
+
</div>
|
1826
|
+
|
1827
|
+
<div id="footer">
|
1828
|
+
Generated on Tue Jul 1 16:47:40 2025 by
|
1829
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1830
|
+
0.9.37 (ruby-3.2.4).
|
1831
|
+
</div>
|
1832
|
+
|
1833
|
+
</div>
|
1834
|
+
</body>
|
1835
|
+
</html>
|