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

[jaeger-v2] Add StartTimeMin and StartTimeMax params to consumeTraces function. #5288

Merged
merged 4 commits into from
Mar 23, 2024

Conversation

james-ryans
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

How was this change tested?

  • Tested manually.

Checklist

@james-ryans james-ryans requested a review from a team as a code owner March 21, 2024 19:02
@james-ryans james-ryans requested a review from pavolloffay March 21, 2024 19:02
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.09%. Comparing base (c56e724) to head (755dc7e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5288      +/-   ##
==========================================
+ Coverage   95.08%   95.09%   +0.01%     
==========================================
  Files         340      340              
  Lines       16610    16626      +16     
==========================================
+ Hits        15793    15811      +18     
+ Misses        629      627       -2     
  Partials      188      188              
Flag Coverage Δ
badger 13.26% <ø> (ø)
cassandra-3.x 26.44% <ø> (ø)
cassandra-4.x 26.44% <ø> (ø)
elasticsearch-5.x 21.70% <ø> (ø)
elasticsearch-6.x 21.68% <ø> (-0.02%) ⬇️
elasticsearch-7.x 21.78% <ø> (ø)
elasticsearch-8.x 21.85% <ø> (-0.02%) ⬇️
grpc 11.00% <100.00%> (+0.08%) ⬆️
kafka 14.73% <ø> (ø)
opensearch-1.x 21.77% <ø> (ø)
opensearch-2.x 21.78% <ø> (+0.01%) ⬆️
unittests 92.28% <30.76%> (-0.03%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@james-ryans james-ryans force-pushed the fix-storage-receiver-v2 branch from 48b50ff to 4cfcb12 Compare March 22, 2024 15:38
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Did you also mean to add any additional logging in the datareceiver? Or does it do the logging already and you just weren't giving it a good logger?

@james-ryans
Copy link
Contributor Author

Did you also mean to add any additional logging in the datareceiver? Or does it do the logging already and you just weren't giving it a good logger?

Yes, it already has the logging there. This is where the logs have captured the error from Badger's integration test.

for _, svc := range services {
if err := r.consumeTraces(ctx, svc); err != nil {
r.settings.Logger.Error("Failed to consume traces from consumer", zap.Error(err))
}
}

telemetrySettings.Logger = tel.Logger()

receiver := datareceivers.NewJaegerStorageDataReceiver(
telemetrySettings,
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why can't pass tel directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because tel (or telemetry.Telemetry) and component.TelemetrySettings is two different component.
telemetry.Telemetry initialize the zap.Logger from the config.
component.TelemetrySettings is the struct that contains zap.Logger that is used by components in OTEL to report telemetry matters.

This means that the extension and receiver in the data receiver are using component.TelemetrySettings to write logs. Based on your suggestion, I thought it is better if we pass the initialized struct and use it directly in the data receiver.

Copy link
Member

Choose a reason for hiding this comment

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

Got it. Looking through OTEL code the situation seems to be quite messy, I don't know if they have a ticket to clean it up. E.g.

  • why are Telemetry and TelemetrySettings two different structs? They seem to server the same purpose (the latter being more comprehensive)
  • TelemetrySettings comment also mentions yet another similar struct servicetelemetry.TelemetrySettings

@yurishkuro yurishkuro added changelog:ci Change related to continuous integration / testing changelog:test Change that's adding missing tests or correcting existing tests and removed changelog:ci Change related to continuous integration / testing labels Mar 23, 2024
@yurishkuro yurishkuro changed the title [jaeger-v2] fix storage receiver consume traces query params [jaeger-v2] Add StartTimeMin and StartTimeMax params to consumeTraces function. Mar 23, 2024
@yurishkuro
Copy link
Member

Yes, it already has the logging there. This is where the logs have captured the error from Badger's integration test.

I was rather thinking of INFO logs as the data receiver polls the storage - it's a test scenario, we don't have to be stingy about logs. E.g. something like

  • querying for traces, params: ...
  • retrieved N spans
  • sleeping till the next retry

@yurishkuro yurishkuro merged commit 53592b3 into jaegertracing:main Mar 23, 2024
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:test Change that's adding missing tests or correcting existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants