| 126 | }; |
| 127 | |
| 128 | std::unique_ptr<otel::sdk::logs::LogRecordExporter> MakeExporter( |
| 129 | ExporterKind exporter_kind, std::ostream* ostream = nullptr) { |
| 130 | switch (exporter_kind) { |
| 131 | case ExporterKind::OSTREAM: { |
| 132 | return std::make_unique<otel::exporter::logs::OStreamLogRecordExporter>(*ostream); |
| 133 | } break; |
| 134 | case ExporterKind::OTLP_HTTP: { |
| 135 | namespace otlp = otel::exporter::otlp; |
| 136 | otlp::OtlpHttpLogRecordExporterOptions options{}; |
| 137 | return std::make_unique<otlp::OtlpHttpLogRecordExporter>(options); |
| 138 | } break; |
| 139 | case ExporterKind::OTLP_OSTREAM: { |
| 140 | return std::make_unique<OtlpOStreamLogRecordExporter>(ostream); |
| 141 | } break; |
| 142 | default: |
| 143 | break; |
| 144 | } |
| 145 | return nullptr; |
| 146 | } |
| 147 | |
| 148 | std::unique_ptr<otel::sdk::logs::LogRecordExporter> MakeExporterFromEnv( |
| 149 | const OtelLogExporterOptions& exporter_options) { |
no outgoing calls
no test coverage detected