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

Merge span normalizer into grouper #384

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

surajpuvvada
Copy link
Contributor

This change merges span-normalizer into raw-spans-grouper to reduce 1 redundant output topic (raw-spans-from-jaeger-spans)

@surajpuvvada surajpuvvada requested a review from a team May 12, 2023 10:02
@github-actions

This comment has been minimized.

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Merging #384 (e08b840) into main (a3bcd18) will increase coverage by 0.10%.
The diff coverage is 96.29%.

@@             Coverage Diff              @@
##               main     #384      +/-   ##
============================================
+ Coverage     79.51%   79.61%   +0.10%     
+ Complexity     1410     1401       -9     
============================================
  Files           126      125       -1     
  Lines          5545     5525      -20     
  Branches        520      519       -1     
============================================
- Hits           4409     4399      -10     
+ Misses          900      891       -9     
+ Partials        236      235       -1     
Flag Coverage Δ
unit 79.61% <96.29%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...va/org/hypertrace/ingester/HypertraceIngester.java 48.83% <ø> (-1.17%) ⬇️
.../normalizer/constants/SpanNormalizerConstants.java 0.00% <ø> (ø)
...ore/spannormalizer/client/ConfigServiceClient.java 90.00% <ø> (ø)
...ore/spannormalizer/config/ConfigServiceConfig.java 100.00% <ø> (ø)
...pannormalizer/fieldgenerators/FieldsGenerator.java 78.57% <ø> (ø)
...alizer/fieldgenerators/FirstMatchingKeyFinder.java 91.66% <ø> (ø)
...ormalizer/fieldgenerators/GrpcFieldsGenerator.java 96.96% <ø> (ø)
...ormalizer/fieldgenerators/HttpFieldsGenerator.java 94.47% <ø> (ø)
...lizer/fieldgenerators/ProtocolFieldsGenerator.java 100.00% <ø> (ø)
...normalizer/fieldgenerators/RpcFieldsGenerator.java 91.07% <ø> (ø)
... and 24 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@surajpuvvada surajpuvvada requested a review from ravisingal May 15, 2023 05:54
@github-actions
Copy link

Unit Test Results

  75 files   - 1    75 suites   - 1   1m 13s ⏱️ -18s
413 tests ±0  413 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit e08b840. ± Comparison against base commit a3bcd18.

output.topic = "structured-traces-from-raw-spans"
bypass.output.topic = "structured-traces-from-raw-spans"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this bypass.output.topic. Once we merge the topology, we can probably reuse output.topic

@saxenakshitiz
Copy link
Contributor

Is there a reason for removing span normalizer completely? This is a breaking change and will cause failure in our on-prem platform?


KStream<TraceIdentity, RawSpan> inputStream =
(KStream<TraceIdentity, RawSpan>) inputStreams.get(inputTopic);
KStream<byte[], JaegerSpanInternalModel.Span> inputStream =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be an incremental change. We need to read from both jaeger-spans and raw-spans-from-jaeger-spans topics in this PR.

Only in follow up PR some time down the line, we can just read from jaeger-spans

@@ -75,7 +89,34 @@ public StreamsBuilder buildTopology(
streamsBuilder.addStateStore(spanStoreBuilder);
streamsBuilder.addStateStore(traceStateStoreBuilder);

StreamPartitioner<TraceIdentity, StructuredTrace> groupPartitioner =
KStream<byte[], PreProcessedSpan> preProcessedStream =
inputStream.transform(() -> new JaegerSpanPreProcessor(getGrpcChannelRegistry()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are we ensuring that this jaeger spans topic is consumed exactly from the offset where the span-normalizer got decommissioned?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Being different applications, it will be difficult to get them in sync.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion would be the following:
We shouldn't even be reading from the existing jaeger-spans topic. This topology should read from a different topic(say jaeger-spans-v2). On the producer side(i.e. hypertrace-collector), we should have a way to control whether to produce to the existing jaeger-spans topic or to the new jaegar-spans-v2. Once we make the flip to the v2 topic we can decommission span-normalizer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need to keep both applications for now. And may need to move raw-span-grouper logic to span-normalizer instead of other way around.

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.

3 participants