Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear trace response instead of metric response in OTelExportSinkNode::ConsumeSpans #1910

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

benkilimnik
Copy link
Member

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

…move duplicate return in OTelModule::Init

Signed-off-by: Benjamin Kilimnik <bkilimnik@pixielabs.ai>
@benkilimnik benkilimnik requested a review from a team May 20, 2024 20:04
@benkilimnik benkilimnik marked this pull request as ready for review May 20, 2024 20:04
@benkilimnik benkilimnik requested a review from a team as a code owner May 20, 2024 20:04
@vihangm vihangm merged commit 970a54a into pixie-io:main Jul 24, 2024
31 checks passed
ddelnano added a commit to ddelnano/pixie that referenced this pull request Jul 26, 2024
ddelnano added a commit that referenced this pull request Jul 28, 2024
…se members (#1975)

Summary: Add test to verify that ConsumeMetrics and ConsumeTraces clear
response members

This adds test coverage for the bug fix in #1910. This is a follow up to
the conversation
[here](#1910 (comment))

Relevant Issues: N/A

Type of change: /kind bug

Test Plan: Verified that unit test fails if #1910 is reverted
```
$ git show HEAD
commit 4ab4a9c (HEAD -> ddelnano/add-tests-for-otel-sink-bug, ddelnano/ddelnano/add-tests-for-otel-sink-bug)
Author: Dom Del Nano <ddelnano@gmail.com>
Date:   Fri Jul 26 12:17:00 2024 +0000

    Revert "Clear trace response instead of metric response in `OTelExportSinkNode::ConsumeSpans` (#1910)"

    This reverts commit 970a54a.

$ bazel test src/carnot/exec:otel_export_sink_node_test --test_output=all

[ ... ]
[ RUN      ] OTelExportSinkNodeTest.consume_spans_clears_span_responses
src/carnot/exec/otel_export_sink_node_test.cc:1748: Failure
Value of: response->partial_success().rejected_spans() == 0
  Actual: false
Expected: true

```

---------

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants