LCOV - code coverage report
Current view: top level - include/hpactor/tracing - json_exporter.hpp (source / functions) Coverage Total Hit
Test: HPActor Coverage Lines: 0.0 % 2 0
Test Date: 2026-05-20 02:24:49 Functions: 0.0 % 1 0
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : #pragma once
       2                 :             : 
       3                 :             : #include <hpactor/tracing/trace_exporter.hpp>
       4                 :             : 
       5                 :             : #include <fstream>
       6                 :             : #include <mutex>
       7                 :             : #include <string>
       8                 :             : 
       9                 :             : namespace hpactor::tracing {
      10                 :             : 
      11                 :             : class JsonFileExporter final : public SpanExporter {
      12                 :             :   public:
      13                 :             :     explicit JsonFileExporter(std::string path);
      14                 :             :     result<void> export_batch(std::span<const SpanRecord> batch) noexcept override;
      15                 :             :     void shutdown() noexcept override;
      16                 :           0 :     const char* name() const noexcept override {
      17                 :           0 :         return "json_file";
      18                 :             :     }
      19                 :             : 
      20                 :             :   private:
      21                 :             :     std::string path_;
      22                 :             :     std::ofstream out_;
      23                 :             :     std::mutex mutex_;
      24                 :             : };
      25                 :             : 
      26                 :             : std::string span_record_to_json(const SpanRecord& record);
      27                 :             : 
      28                 :             : } // namespace hpactor::tracing
        

Generated by: LCOV version 2.0-1