Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Oct 3, 2025

Summary

Extending log tests suite.


Note

Adds new log sampling scenarios requiring both message and severity, updates .NET test severity fallback to Information, and makes Python tests tolerate missing expected attributes.

  • Tests:
    • Log scenarios: Add cases where rules require both message and severityText (empty log, message-only, severity-only) in .../observability-dotnet/.../log-test-scenarios.json and .../observability-python/.../log-test-scenarios.json.
    • .NET test helper: SeverityTextToLogLevel default now returns Information instead of throwing for unsupported severityText in CustomSamplerTests.cs.
    • Python tests: In test_custom_sampler.py, only assert result.attributes when "attributes" exists in expected_result and is non-null for both span and log scenarios.

Written by Cursor Bugbot for commit 5e991a0. This will update automatically on new commits. Configure here.

@kinyoklion
Copy link
Member Author

I am going to have to update the test suites. These type safe languages don't allow for the missing severity.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1242 1066 86% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
sdk/@launchdarkly/observability-python/ldobserve/_otel/_sampling/test_custom_sampler.py 97% 🟢
TOTAL 97% 🟢

updated for commit: 5e991a0 by action🐍

@kinyoklion kinyoklion marked this pull request as ready for review October 6, 2025 21:51
@kinyoklion kinyoklion requested a review from a team as a code owner October 6, 2025 21:51
@kinyoklion kinyoklion merged commit 8f4e72d into main Oct 7, 2025
24 checks passed
@kinyoklion kinyoklion deleted the rlamb/update-log-test-scenarios branch October 7, 2025 15:46
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