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

[Home] Add support for otel sample data - logs, traces and metrics #8587

Merged
merged 16 commits into from
Oct 19, 2024

Conversation

ps48
Copy link
Member

@ps48 ps48 commented Oct 14, 2024

Description

Add support for otel sample data - logs, traces and metrics

Issues Resolved

OTEL-sample-data.mov

Changelog

  • feat: Add support for otel sample data - logs, traces and metrics

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

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

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 73.17073% with 11 lines in your changes missing coverage. Please review.

Project coverage is 60.83%. Comparing base (0e00abf) to head (28f5548).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...ns/home/server/services/sample_data/routes/list.ts 33.33% 5 Missing and 3 partials ⚠️
...ication/components/sample_data_view_data_button.js 87.50% 1 Missing ⚠️
...home/server/services/sample_data/data_sets/util.ts 93.33% 0 Missing and 1 partial ⚠️
...home/server/services/sample_data/routes/install.ts 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8587      +/-   ##
==========================================
- Coverage   60.89%   60.83%   -0.06%     
==========================================
  Files        3790     3793       +3     
  Lines       90262    90412     +150     
  Branches    14154    14196      +42     
==========================================
+ Hits        54962    55004      +42     
- Misses      31829    31932     +103     
- Partials     3471     3476       +5     
Flag Coverage Δ
Linux_1 29.08% <ø> (-0.04%) ⬇️
Linux_2 56.39% <ø> (+<0.01%) ⬆️
Linux_3 37.67% <ø> (-0.05%) ⬇️
Linux_4 29.82% <73.17%> (+0.01%) ⬆️
Windows_1 29.09% <ø> (-0.04%) ⬇️
Windows_2 56.34% <ø> (+<0.01%) ⬆️
Windows_3 37.67% <ø> (-0.05%) ⬇️
Windows_4 29.82% <73.17%> (+0.01%) ⬆️

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.

@ruanyl
Copy link
Member

ruanyl commented Oct 16, 2024

Not related to this PR, in the screen record, I noticed that you need to switch data source quite frequently, do you feel it's a bit overwhelming?

});
const initialAppLinks = [] as AppLinkSchema[];

const DEFAULT_INDEX = 'i254a9691-8a1b-11ef-adb4-9f1097200c20';
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this default index from? Seems we won't add any saved objects after sample data imported.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, this is not needed anymore. Updated here: c6949c4

previewImagePath: '/plugins/home/assets/sample_data_resources/otel/otel_traces.png',
darkPreviewImagePath: '/plugins/home/assets/sample_data_resources/otel/otel_traces_dark.png',
hasNewThemeImages: true,
overviewDashboard: DASHBOARD_ID,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we update SampleDatsetSchema to set field to optional? Since this overviewDashboard value will be used in this line, do we need to hide this button or show another link?

Copy link
Member Author

Choose a reason for hiding this comment

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

Didn't want to keep this optional, rather just kept it empty for now. Similar to how applinks are kept empty in other sample data objects. Have hidden the button for dashbords if empty and showing app links now.
Screenshot 2024-10-18 at 1 02 20 PM

mengweieric and others added 8 commits October 17, 2024 19:54
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric Wei <menwe@amazon.com>
…o utils

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
const initialAppLinks = [] as AppLinkSchema[];

const DEFAULT_INDEX = 'i254a9691-8a1b-11ef-adb4-9f1097200c20';
const DASHBOARD_ID = '';
Copy link
Member

Choose a reason for hiding this comment

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

why is this empty?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed the variable, we don't have a default dashboard, users land on to traces page

Copy link
Member Author

Choose a reason for hiding this comment

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

defaultMessage:
'Sample data including correlated observability signals for an e-commerce application in Open-Telemetry standard.',
});
const initialAppLinks = [] as AppLinkSchema[];
Copy link
Member

Choose a reason for hiding this comment

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

nit. avoid assertions if possible

Suggested change
const initialAppLinks = [] as AppLinkSchema[];
const initialAppLinks: AppLinkSchema[] = [];

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to add traces and services links c6949c4

id: 'otel-v1-apm-span-sample',
dataPath: path.join(__dirname, './sample_traces.json.gz'),
fields: tracesFieldMappings,
timeFields: ['startTime', 'endTime', 'traceGroupFields.endTime'], // TODO: add support for 'events.time'
Copy link
Member

Choose a reason for hiding this comment

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

what is needed for events.time?

Copy link
Member Author

Choose a reason for hiding this comment

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

Parsing array field needs to be added to search for the timefield inside the array and then update it in the doc. My understanding is this is not needed for P0 and can be fine if taken up later and trace queries use startTime and endTime

ps48 and others added 2 commits October 18, 2024 12:54
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
fields: {
keyword: {
type: 'keyword',
ignore_above: 256,
Copy link
Member

Choose a reason for hiding this comment

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

would be better to remove the .keyword field given it is already keyword type

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, will mark this as discussed already with vamsi that we will enhance sample data experience including things like this.

@mengweieric mengweieric merged commit c8b5318 into opensearch-project:main Oct 19, 2024
70 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 19, 2024
)

* add support for otel sample data - traces and services

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

* Changeset file for PR #8587 created/updated

* upload gz otel data

Signed-off-by: Eric <menwe@amazon.com>

* add mappings

Signed-off-by: Eric <menwe@amazon.com>

* correct mappings

Signed-off-by: Eric <menwe@amazon.com>

* Fix the time mismatch for otel sample data

Signed-off-by: Ryan Liang <jiallian@amazon.com>

* adjust time maker

Signed-off-by: Eric <menwe@amazon.com>

* create index name tests

Signed-off-by: Eric <menwe@amazon.com>

* add indexName field to DataIndexSchema, move nested field functions to utils

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

* add button for app redirection, resolve comments

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

* adjust id field to be as keyword

Signed-off-by: Eric <menwe@amazon.com>

* remove redundant keyword declaration

Signed-off-by: Eric <menwe@amazon.com>

* move to use correct format sample suffix

Signed-off-by: Eric <menwe@amazon.com>

* update text and one log index name/id

Signed-off-by: Eric <menwe@amazon.com>

* fix sample data test

Signed-off-by: Eric <menwe@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Eric Wei <menwe@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Eric <menwe@amazon.com>
Co-authored-by: Ryan Liang <jiallian@amazon.com>
(cherry picked from commit c8b5318)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mengweieric added a commit that referenced this pull request Oct 19, 2024
) (#8666)

* add support for otel sample data - traces and services



* Changeset file for PR #8587 created/updated

* upload gz otel data



* add mappings



* correct mappings



* Fix the time mismatch for otel sample data



* adjust time maker



* create index name tests



* add indexName field to DataIndexSchema, move nested field functions to utils



* add button for app redirection, resolve comments



* adjust id field to be as keyword



* remove redundant keyword declaration



* move to use correct format sample suffix



* update text and one log index name/id



* fix sample data test



---------








(cherry picked from commit c8b5318)

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Eric Wei <menwe@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>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Eric <menwe@amazon.com>
Co-authored-by: Ryan Liang <jiallian@amazon.com>
@mengweieric mengweieric changed the title [WIP] Add support for otel sample data - logs, traces and metrics [Home] Add support for otel sample data - logs, traces and metrics Oct 19, 2024
sejli pushed a commit to sejli/OpenSearch-Dashboards that referenced this pull request Oct 21, 2024
…ensearch-project#8587)

* add support for otel sample data - traces and services

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

* Changeset file for PR opensearch-project#8587 created/updated

* upload gz otel data

Signed-off-by: Eric <menwe@amazon.com>

* add mappings

Signed-off-by: Eric <menwe@amazon.com>

* correct mappings

Signed-off-by: Eric <menwe@amazon.com>

* Fix the time mismatch for otel sample data

Signed-off-by: Ryan Liang <jiallian@amazon.com>

* adjust time maker

Signed-off-by: Eric <menwe@amazon.com>

* create index name tests

Signed-off-by: Eric <menwe@amazon.com>

* add indexName field to DataIndexSchema, move nested field functions to utils

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

* add button for app redirection, resolve comments

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

* adjust id field to be as keyword

Signed-off-by: Eric <menwe@amazon.com>

* remove redundant keyword declaration

Signed-off-by: Eric <menwe@amazon.com>

* move to use correct format sample suffix

Signed-off-by: Eric <menwe@amazon.com>

* update text and one log index name/id

Signed-off-by: Eric <menwe@amazon.com>

* fix sample data test

Signed-off-by: Eric <menwe@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Eric Wei <menwe@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Eric <menwe@amazon.com>
Co-authored-by: Ryan Liang <jiallian@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants