Skip to content

Conversation

ps48
Copy link
Member

@ps48 ps48 commented Oct 15, 2025

Description

Add support for correlations tab for Datasets feature.

  • Users can create/edit a correlation from traces datasets, under the correlated datasets tab
  • Users can view a associated correlations from the logs dataset tab
  • Users can edit schema mappings during the correlations creation or later when editing a correlation
  • Limits -> 1 trace can only be part of 1 correlation and each correlation can have max 5 logs datasets

Issues Resolved

#10386

Screenshot / Testing the changes

correlations-feature.mov

Changelog

  • feat: Add correlations tab to support linking Trace and Logs Datasets

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@ps48 ps48 added the OSD Changes being merged by the OSD team label Oct 15, 2025
@ps48 ps48 changed the title Add correlations tab to OpenSearch Datasets Add correlations tab to support linking Trace and Logs Datasets Oct 15, 2025
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 98.15951% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.41%. Comparing base (9850413) to head (0f983e7).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ataset_management/public/hooks/use_correlations.ts 98.21% 0 Missing and 1 partial ⚠️
...set_management/public/utils/correlation_display.ts 96.00% 1 Missing ⚠️
..._management/public/utils/correlation_validation.ts 97.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10729      +/-   ##
==========================================
+ Coverage   60.34%   60.41%   +0.07%     
==========================================
  Files        4462     4468       +6     
  Lines      119495   119752     +257     
  Branches    19748    19800      +52     
==========================================
+ Hits        72109    72349     +240     
- Misses      42383    42392       +9     
- Partials     5003     5011       +8     
Flag Coverage Δ
Linux_1 26.58% <ø> (ø)
Linux_2 38.82% <ø> (ø)
Linux_3 39.02% <98.15%> (+0.12%) ⬆️
Linux_4 33.07% <ø> (+0.05%) ⬆️
Windows_1 26.60% <ø> (ø)
Windows_2 38.79% <ø> (ø)
Windows_3 39.02% <98.15%> (+0.12%) ⬆️
Windows_4 33.07% <ø> (+0.05%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: ps48 <[email protected]>
@opensearch-project opensearch-project deleted a comment from github-actions bot Oct 15, 2025
@TackAdam
Copy link
Collaborator

Testing this change against the Traces workflow. Required update to the log fetching as the correlation is a different object structure in src/plugins/explore/public/application/pages/traces/trace_details/public/logs/correlation_service.ts

Works great, nice change!

Tested.mov

@TackAdam
Copy link
Collaborator

NIT: The Traces "Correlated datasets" does not update with a (1) to indicate one exist after creation.
The logs does show this so it might mis-lead user's if the behavior is different here
UIFeedback

Logs:
Screenshot 2025-10-15 at 3 07 38 PM

@ps48
Copy link
Member Author

ps48 commented Oct 15, 2025

NIT: The Traces "Correlated datasets" does not update with a (1) to indicate one exist after creation. The logs does show this so it might mis-lead user's if the behavior is different here UIFeedback

Logs: Screenshot 2025-10-15 at 3 07 38 PM

This came from Ming to not have a counter for Correlated datasets and 1 trace can only be mapped to 1 correlation object

)}

{/* Show error callout only when there are missing mappings */}
{hasErrors && missingMappings.length > 0 && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we show a generic unknown error in other cases where hasErrors is true?

Copy link
Member Author

Choose a reason for hiding this comment

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

If hasErrors = true, then at least one row found a matching entry in missing mappings with non-empty missingFields, which means missingMappings.length > 0 must be true. hasErrors is kept as a separate variable for react state update race conditions.

TL;DR generic unknown error cannot be caught with hasErrors it just checks for missing mappings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OSD Changes being merged by the OSD team valued-contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants