servers::otlp::logs

Function to_grpc_insert_requests

Source
pub async fn to_grpc_insert_requests(
    request: ExportLogsServiceRequest,
    pipeline: PipelineWay,
    pipeline_params: GreptimePipelineParams,
    table_name: String,
    query_ctx: &QueryContextRef,
    pipeline_handler: PipelineHandlerRef,
) -> Result<(RowInsertRequests, usize)>
Expand description

Convert OpenTelemetry metrics to GreptimeDB insert requests

See https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto for data structure of OTLP metrics.

Returns InsertRequests and total number of rows to ingest