Skip to content

Commit

Permalink
Clear trace response instead of metric response in `OTelExportSinkNod…
Browse files Browse the repository at this point in the history
…e::ConsumeSpans` (#1910)

Summary: Addresses a couple of small-ish bugs
- `ConsumeSpans` is mistakenly clearing the `metrics_response_` (which
is used in `ConsumeMetrics`) instead of the `trace_response_`.
- There is a duplicate return statement in `OTelModule::Init`.

Type of change: /kind bug

Test Plan: CI, skaffold-ed standalone pem and ran OTel export scripts

Signed-off-by: Benjamin Kilimnik <[email protected]>
  • Loading branch information
benkilimnik authored Jul 24, 2024
1 parent 1d41f9b commit 970a54a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/carnot/exec/otel_export_sink_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Status OTelExportSinkNode::ConsumeSpans(ExecState* exec_state, const RowBatch& r
}
context.set_compression_algorithm(GRPC_COMPRESS_GZIP);

metrics_response_.Clear();
trace_response_.Clear();
opentelemetry::proto::collector::trace::v1::ExportTraceServiceRequest request;

for (int64_t row_idx = 0; row_idx < rb.ColumnAt(0)->length(); ++row_idx) {
Expand Down
1 change: 0 additions & 1 deletion src/carnot/planner/objects/otel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ Status OTelModule::Init(CompilerState* compiler_state, IR* ir) {

AddMethod(kEndpointOpID, endpoint_fn);
PX_RETURN_IF_ERROR(endpoint_fn->SetDocString(kEndpointOpDocstring));
return Status::OK();

return Status::OK();
}
Expand Down

0 comments on commit 970a54a

Please sign in to comment.