Class: Ci::Observability::ExportService
- Inherits:
-
Object
- Object
- Ci::Observability::ExportService
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/services/ci/observability/export_service.rb
Constant Summary collapse
- OBSERVABILITY_VARIABLE =
'GITLAB_OBSERVABILITY_EXPORT'- VALID_VARIABLE_VALUES =
%w[traces metrics logs].freeze
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(pipeline) ⇒ ExportService
constructor
A new instance of ExportService.
Constructor Details
#initialize(pipeline) ⇒ ExportService
Returns a new instance of ExportService.
11 12 13 |
# File 'app/services/ci/observability/export_service.rb', line 11 def initialize(pipeline) @pipeline = pipeline end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/services/ci/observability/export_service.rb', line 15 def execute return unless should_export? && observability_available? export_data rescue StandardError => e Gitlab::AppLogger.error( message: "GitLab Observability export failed", pipeline_id: pipeline.id, project_id: pipeline.project_id, error_class: e.class.name, error_message: e. ) end |