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

Support custom logs correlation #2375

Merged
merged 4 commits into from
Mar 7, 2025

Conversation

ps48
Copy link
Member

@ps48 ps48 commented Mar 5, 2025

Description

Many users of trace analytics have different ways of defining their logs index. Many of them do not want set an alias on their existing indices and fields. Hence, we are adding this experimental feature to enable them to add custom log source used for correlation of spans & services to logs.

Redirection to Explorer:

obs-correlated-logs.mov

Redirection to Discover:
NOTE: We see an error in discover to load data from specific indexes using PPL. This looks to be a discover only issue.

mds-correlated-logs.mov

Issues Resolved

#2141

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Sorry, something went wrong.

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
@ps48 ps48 added enhancement New feature or request backport 2.x labels Mar 5, 2025
ps48 added 2 commits March 5, 2025 22:42
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 47.91667% with 25 lines in your changes missing coverage. Please review.

Project coverage is 56.16%. Comparing base (5cfbba1) to head (8815884).
Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
...nalytics/components/common/custom_index_flyout.tsx 45.45% 12 Missing ⚠️
...e_analytics/components/common/helper_functions.tsx 50.00% 9 Missing ⚠️
...ace_analytics/components/services/service_view.tsx 0.00% 2 Missing ⚠️
...analytics/components/traces/span_detail_flyout.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2375      +/-   ##
==========================================
- Coverage   56.53%   56.16%   -0.37%     
==========================================
  Files         393      396       +3     
  Lines       15574    15852     +278     
  Branches     4284     4384     +100     
==========================================
+ Hits         8804     8903      +99     
- Misses       6705     6878     +173     
- Partials       65       71       +6     
Flag Coverage Δ
dashboards-observability 56.16% <47.91%> (-0.37%) ⬇️

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.

@ps48 ps48 marked this pull request as ready for review March 6, 2025 18:53
@TackAdam
Copy link
Collaborator

TackAdam commented Mar 6, 2025

Are we intentionally applying the log “Correlated log indicies” to links from “Data Prepper” or should it be isolated to only affecting Traces while under the “Custom Source” tab. It is currently applying to both which seems to be useful but just wanted to make sure that its intended.

@TackAdam
Copy link
Collaborator

TackAdam commented Mar 6, 2025

“View associated logs” redirection seems broken under the new navigation when “Explorer” is not present as it cannot land on the page. Don’t think this was introduced by this PR but restricts the ability to test the functionality with new home enabled.

@ps48
Copy link
Member Author

ps48 commented Mar 6, 2025

“View associated logs” redirection seems broken under the new navigation when “Explorer” is not present as it cannot land on the page. Don’t think this was introduced by this PR but restricts the ability to test the functionality with new home enabled.

Did you have MDS enabled and query_enhancements enabled? -> We need this to make sure these are enabled, when explorer is missing.

Copy link
Collaborator

@paulstn paulstn left a comment

Choose a reason for hiding this comment

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

Changes look good to me, could we get tests?

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
@ps48
Copy link
Member Author

ps48 commented Mar 7, 2025

Note: We need to fixate of default timestamp in the next upcoming version.

@ps48 ps48 merged commit 6ea90a6 into opensearch-project:main Mar 7, 2025
20 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 7, 2025
* support custom logs correlation

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add support for custom field mappings in logs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update explorer fields

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add support for custom timestamp field

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
(cherry picked from commit 6ea90a6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
TackAdam pushed a commit that referenced this pull request Mar 8, 2025
* support custom logs correlation



* add support for custom field mappings in logs



* update explorer fields



* add support for custom timestamp field



---------


(cherry picked from commit 6ea90a6)

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
aalva500-prog pushed a commit to aalva500-prog/dashboards-observability that referenced this pull request Mar 8, 2025
* support custom logs correlation

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add support for custom field mappings in logs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update explorer fields

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add support for custom timestamp field

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Aaron Alvarez <aaarone@amazon.com>
Swiddis pushed a commit that referenced this pull request Mar 11, 2025
* Database selector in Integration install

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* Database selector in Integration install

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* Database selector in Integration install

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* These changes are in response to PR comments

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* Support custom logs correlation (#2375)

* support custom logs correlation

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add support for custom field mappings in logs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update explorer fields

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add support for custom timestamp field

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* These changes are in response to latest PR comments and suggestions made by Simeon

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

---------

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Co-authored-by: Aaron Alvarez <aaarone@amazon.com>
Co-authored-by: Shenoy Pratik <sgguruda@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 11, 2025
* Database selector in Integration install

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* Database selector in Integration install

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* Database selector in Integration install

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* These changes are in response to PR comments

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* Support custom logs correlation (#2375)

* support custom logs correlation

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add support for custom field mappings in logs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update explorer fields

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* add support for custom timestamp field

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

* These changes are in response to latest PR comments and suggestions made by Simeon

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

---------

Signed-off-by: Aaron Alvarez <aaarone@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Co-authored-by: Aaron Alvarez <aaarone@amazon.com>
Co-authored-by: Shenoy Pratik <sgguruda@amazon.com>
(cherry picked from commit 588c8d4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants