Skip to content

Tweaks to logs integration test #2453

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

Merged

Conversation

cijothomas
Copy link
Member

Follow up to #2436

Replaces log crate with tracing crate in integration tests.
Name the spawned thread in BatchLogProcessor.
Validate Scope too in integration tests.

@cijothomas cijothomas requested a review from a team as a code owner December 19, 2024 00:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.

Files not reviewed (2)
  • opentelemetry-otlp/tests/integration_test/expected/failed_logs.json: Language not supported
  • opentelemetry-otlp/tests/integration_test/expected/logs.json: Language not supported

info!(target: "my-target", "hello from {}. My price is {}.", "banana", 2.99);
}
// TODO: remove below wait before calling logger_provider.shutdown()
// tokio::time::sleep(Duration::from_secs(10)).await;
Copy link
Preview

Copilot AI Dec 19, 2024

Choose a reason for hiding this comment

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

Commented-out code should be removed or properly handled. Leaving it commented out with a 'TODO' is not ideal.

Suggested change
// tokio::time::sleep(Duration::from_secs(10)).await;
// let _ = logger_provider.shutdown();

Copilot uses AI. Check for mistakes.

}
}
}
});
}).expect("Thread spawn failed."); //TODO: Handle thread spawn failure
Copy link
Preview

Copilot AI Dec 19, 2024

Choose a reason for hiding this comment

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

The error message for thread spawn failure is not descriptive enough. Consider providing more details, such as: 'Failed to spawn OpenTelemetry logs batch processor thread.'

Suggested change
}).expect("Thread spawn failed."); //TODO: Handle thread spawn failure
}).expect("Failed to spawn OpenTelemetry logs batch processor thread.");

Copilot uses AI. Check for mistakes.

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 64.91228% with 20 lines in your changes missing coverage. Please review.

Project coverage is 76.1%. Comparing base (0a7ad69) to head (5dd69eb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-sdk/src/logs/log_processor.rs 64.9% 20 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2453   +/-   ##
=====================================
  Coverage   76.1%   76.1%           
=====================================
  Files        122     122           
  Lines      22062   22065    +3     
=====================================
+ Hits       16790   16793    +3     
  Misses      5272    5272           

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

@cijothomas cijothomas closed this Dec 19, 2024
@cijothomas cijothomas reopened this Dec 19, 2024
@cijothomas cijothomas added the integration tests Run integration tests label Dec 19, 2024
@cijothomas cijothomas merged commit acf16ed into open-telemetry:main Dec 19, 2024
20 of 21 checks passed
@cijothomas cijothomas deleted the cijothomas/log-integration-test branch December 19, 2024 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration tests Run integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants