[Discover][Oblt] Display Attributes doc viewer tab for Observability#222391
[Discover][Oblt] Display Attributes doc viewer tab for Observability#222391kpatticha merged 27 commits intoelastic:mainfrom
Conversation
davismcphee
left a comment
There was a problem hiding this comment.
So after looking at the PR, I realized this definitely could have been done through the root profile all along 🤦 Sorry for all the confusion and sending you in circles, I should have assessed this more thoroughly in the original discussions!
Since it's on me, I opened a PR against this branch that makes the change and includes more details: kpatticha#1. The main changes are the same, it turns out we just don't need the withAttributesDocViewerTab function or the base document provider, so it simplifies things.
...blic/context_awareness/profile_providers/observability/traces_data_source_profile/profile.ts
Show resolved
Hide resolved
…/kibana into 221919-discover-attributes-tab
davismcphee
left a comment
There was a problem hiding this comment.
Data Discovery code changes LGTM 👍
There's just two more areas I noticed where you also might want to update the root context check:
src/platform/plugins/shared/discover/public/context_awareness/profile_providers/observability/logs_data_source_profile/profile.tssrc/platform/plugins/shared/discover/public/context_awareness/profile_providers/observability/logs_data_source_profile/sub_profiles/create_resolve.ts
...blic/context_awareness/profile_providers/observability/traces_data_source_profile/profile.ts
Show resolved
Hide resolved
Good catch! I updated them |
...ty/observability_root_profile/sub_profiles/observability_root_profile_with_attributes_tab.ts
Show resolved
Hide resolved
MiriamAparicio
left a comment
There was a problem hiding this comment.
LGTM, awesome work 🎉
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
|
…lastic#222391) Closing elastic#221919 ## Summary In this PR, I'm adding the Attributes doc viwer tab for the **Observability solution view.** The tab should be visible for all discover documents that have any of the following prefixes ``` const attributesPrefixes = ['attributes.', 'scope.attributes.', 'resource.attributes.']; ``` Also, - Group the observability document profile providers into one file > [!IMPORTANT] > The content of the tab is not inlcuded in this PR. it will be part of this [ticket](elastic#221927) ## Additional changes For the existing profiles, logs, traces I updated the condition to check the solution From `params.rootContext.profileId === OBSERVABILITY_ROOT_PROFILE_ID` to `params.rootContext.solutionType === SolutionType.Observability` IMO both are prone to errors. - As I'm extending the root profile, the above statement is not true. it returns the new extended profile ID - Also, if we add more extensions to the root profile and we add another solutionType by mistake the profiles won't work I updated the type https://github.com/elastic/kibana/pull/222391/files#diff-ff7a53f0c234902226be3e34978326985dfffadabb8ae722b6c3fc2115085d11R14 but it might not be enough. ## Test #### How to generate OTel data - Follow https://github.com/smith/elastic-stack-docker-compose?tab=readme-ov-file#elastic-stack-docker-compose #### How to test - Make sure your solution view is Observability - update your `kibana.yaml` ``` discover.experimental.enabledProfiles: - observability-root-profile-with-attributes-tab # if you want to test it with the additional profiles add the following to your `kibana.yaml` - observability-traces-data-source-profile - observability-traces-transaction-document-profile - observability-traces-span-document-profile ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…ub profiles (#223988) ## Summary This PR fixes an issue I noticed while reviewing #222391 where the `isLogsDataSourceContext` check would not work for logs data source sub profiles, since it was checking against the context `profileId`, which would be different for each sub profile. Instead the utility now checks the shape of the context, which should work reliably across sub profiles. ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…lastic#222391) Closing elastic#221919 ## Summary In this PR, I'm adding the Attributes doc viwer tab for the **Observability solution view.** The tab should be visible for all discover documents that have any of the following prefixes ``` const attributesPrefixes = ['attributes.', 'scope.attributes.', 'resource.attributes.']; ``` Also, - Group the observability document profile providers into one file > [!IMPORTANT] > The content of the tab is not inlcuded in this PR. it will be part of this [ticket](elastic#221927) ## Additional changes For the existing profiles, logs, traces I updated the condition to check the solution From `params.rootContext.profileId === OBSERVABILITY_ROOT_PROFILE_ID` to `params.rootContext.solutionType === SolutionType.Observability` IMO both are prone to errors. - As I'm extending the root profile, the above statement is not true. it returns the new extended profile ID - Also, if we add more extensions to the root profile and we add another solutionType by mistake the profiles won't work I updated the type https://github.com/elastic/kibana/pull/222391/files#diff-ff7a53f0c234902226be3e34978326985dfffadabb8ae722b6c3fc2115085d11R14 but it might not be enough. ## Test #### How to generate OTel data - Follow https://github.com/smith/elastic-stack-docker-compose?tab=readme-ov-file#elastic-stack-docker-compose #### How to test - Make sure your solution view is Observability - update your `kibana.yaml` ``` discover.experimental.enabledProfiles: - observability-root-profile-with-attributes-tab # if you want to test it with the additional profiles add the following to your `kibana.yaml` - observability-traces-data-source-profile - observability-traces-transaction-document-profile - observability-traces-span-document-profile ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit cf57a85)
…bility (#222391) (#224219) # Backport This will backport the following commits from `main` to `8.19`: - [[Discover][Oblt] Display Attributes doc viewer tab for Observability (#222391)](#222391) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Katerina","email":"aikaterini.patticha@elastic.co"},"sourceCommit":{"committedDate":"2025-06-13T12:16:11Z","message":"[Discover][Oblt] Display Attributes doc viewer tab for Observability (#222391)\n\nClosing #221919 \n\n\n## Summary\n\n\nIn this PR, I'm adding the Attributes doc viwer tab for the\n**Observability solution view.**\nThe tab should be visible for all discover documents that have any of\nthe following prefixes\n\n```\nconst attributesPrefixes = ['attributes.', 'scope.attributes.', 'resource.attributes.'];\n```\n\nAlso, \n- Group the observability document profile providers into one file\n\n> [!IMPORTANT] \n> The content of the tab is not inlcuded in this PR. it will be part of\nthis [ticket](https://github.com/elastic/kibana/issues/221927)\n\n## Additional changes\n\n\nFor the existing profiles, logs, traces I updated the condition to check\nthe solution\n\nFrom `params.rootContext.profileId === OBSERVABILITY_ROOT_PROFILE_ID` to\n`params.rootContext.solutionType === SolutionType.Observability`\n \n \nIMO both are prone to errors. \n\n- As I'm extending the root profile, the above statement is not true. it\nreturns the new extended profile ID\n- Also, if we add more extensions to the root profile and we add another\nsolutionType by mistake the profiles won't work\n\nI updated the type\nhttps://github.com//pull/222391/files#diff-ff7a53f0c234902226be3e34978326985dfffadabb8ae722b6c3fc2115085d11R14\nbut it might not be enough.\n\n\n## Test \n#### How to generate OTel data\n- Follow\nhttps://github.com/smith/elastic-stack-docker-compose?tab=readme-ov-file#elastic-stack-docker-compose\n\n#### How to test\n- Make sure your solution view is Observability\n- update your `kibana.yaml` \n\n```\ndiscover.experimental.enabledProfiles:\n - observability-root-profile-with-attributes-tab\n # if you want to test it with the additional profiles add the following to your `kibana.yaml` \n - observability-traces-data-source-profile\n - observability-traces-transaction-document-profile\n - observability-traces-span-document-profile\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cf57a85869bec73f71978fc367b783e168f5cce4","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:feature","backport:version","v9.1.0","v8.19.0"],"title":"[Discover][Oblt] Display Attributes doc viewer tab for Observability","number":222391,"url":"https://github.com/elastic/kibana/pull/222391","mergeCommit":{"message":"[Discover][Oblt] Display Attributes doc viewer tab for Observability (#222391)\n\nClosing #221919 \n\n\n## Summary\n\n\nIn this PR, I'm adding the Attributes doc viwer tab for the\n**Observability solution view.**\nThe tab should be visible for all discover documents that have any of\nthe following prefixes\n\n```\nconst attributesPrefixes = ['attributes.', 'scope.attributes.', 'resource.attributes.'];\n```\n\nAlso, \n- Group the observability document profile providers into one file\n\n> [!IMPORTANT] \n> The content of the tab is not inlcuded in this PR. it will be part of\nthis [ticket](https://github.com/elastic/kibana/issues/221927)\n\n## Additional changes\n\n\nFor the existing profiles, logs, traces I updated the condition to check\nthe solution\n\nFrom `params.rootContext.profileId === OBSERVABILITY_ROOT_PROFILE_ID` to\n`params.rootContext.solutionType === SolutionType.Observability`\n \n \nIMO both are prone to errors. \n\n- As I'm extending the root profile, the above statement is not true. it\nreturns the new extended profile ID\n- Also, if we add more extensions to the root profile and we add another\nsolutionType by mistake the profiles won't work\n\nI updated the type\nhttps://github.com//pull/222391/files#diff-ff7a53f0c234902226be3e34978326985dfffadabb8ae722b6c3fc2115085d11R14\nbut it might not be enough.\n\n\n## Test \n#### How to generate OTel data\n- Follow\nhttps://github.com/smith/elastic-stack-docker-compose?tab=readme-ov-file#elastic-stack-docker-compose\n\n#### How to test\n- Make sure your solution view is Observability\n- update your `kibana.yaml` \n\n```\ndiscover.experimental.enabledProfiles:\n - observability-root-profile-with-attributes-tab\n # if you want to test it with the additional profiles add the following to your `kibana.yaml` \n - observability-traces-data-source-profile\n - observability-traces-transaction-document-profile\n - observability-traces-span-document-profile\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cf57a85869bec73f71978fc367b783e168f5cce4"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/222391","number":222391,"mergeCommit":{"message":"[Discover][Oblt] Display Attributes doc viewer tab for Observability (#222391)\n\nClosing #221919 \n\n\n## Summary\n\n\nIn this PR, I'm adding the Attributes doc viwer tab for the\n**Observability solution view.**\nThe tab should be visible for all discover documents that have any of\nthe following prefixes\n\n```\nconst attributesPrefixes = ['attributes.', 'scope.attributes.', 'resource.attributes.'];\n```\n\nAlso, \n- Group the observability document profile providers into one file\n\n> [!IMPORTANT] \n> The content of the tab is not inlcuded in this PR. it will be part of\nthis [ticket](https://github.com/elastic/kibana/issues/221927)\n\n## Additional changes\n\n\nFor the existing profiles, logs, traces I updated the condition to check\nthe solution\n\nFrom `params.rootContext.profileId === OBSERVABILITY_ROOT_PROFILE_ID` to\n`params.rootContext.solutionType === SolutionType.Observability`\n \n \nIMO both are prone to errors. \n\n- As I'm extending the root profile, the above statement is not true. it\nreturns the new extended profile ID\n- Also, if we add more extensions to the root profile and we add another\nsolutionType by mistake the profiles won't work\n\nI updated the type\nhttps://github.com//pull/222391/files#diff-ff7a53f0c234902226be3e34978326985dfffadabb8ae722b6c3fc2115085d11R14\nbut it might not be enough.\n\n\n## Test \n#### How to generate OTel data\n- Follow\nhttps://github.com/smith/elastic-stack-docker-compose?tab=readme-ov-file#elastic-stack-docker-compose\n\n#### How to test\n- Make sure your solution view is Observability\n- update your `kibana.yaml` \n\n```\ndiscover.experimental.enabledProfiles:\n - observability-root-profile-with-attributes-tab\n # if you want to test it with the additional profiles add the following to your `kibana.yaml` \n - observability-traces-data-source-profile\n - observability-traces-transaction-document-profile\n - observability-traces-span-document-profile\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cf57a85869bec73f71978fc367b783e168f5cce4"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Katerina <aikaterini.patticha@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…ub profiles (elastic#223988) ## Summary This PR fixes an issue I noticed while reviewing elastic#222391 where the `isLogsDataSourceContext` check would not work for logs data source sub profiles, since it was checking against the context `profileId`, which would be different for each sub profile. Instead the utility now checks the shape of the context, which should work reliably across sub profiles. ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit 027b9c4)
…ource sub profiles (#223988) (#224321) # Backport This will backport the following commits from `main` to `8.19`: - [[Discover] Fix `isLogsDataSourceContext` check for logs data source sub profiles (#223988)](#223988) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Davis McPhee","email":"davis.mcphee@elastic.co"},"sourceCommit":{"committedDate":"2025-06-16T20:45:14Z","message":"[Discover] Fix `isLogsDataSourceContext` check for logs data source sub profiles (#223988)\n\n## Summary\n\nThis PR fixes an issue I noticed while reviewing #222391 where the\n`isLogsDataSourceContext` check would not work for logs data source sub\nprofiles, since it was checking against the context `profileId`, which\nwould be different for each sub profile. Instead the utility now checks\nthe shape of the context, which should work reliably across sub\nprofiles.\n\n### Checklist\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"027b9c47a14faa336bcff7ef64a5d1fbf07bfb78","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","Project:OneDiscover","backport:version","v9.1.0","v8.19.0"],"title":"[Discover] Fix `isLogsDataSourceContext` check for logs data source sub profiles","number":223988,"url":"https://github.com/elastic/kibana/pull/223988","mergeCommit":{"message":"[Discover] Fix `isLogsDataSourceContext` check for logs data source sub profiles (#223988)\n\n## Summary\n\nThis PR fixes an issue I noticed while reviewing #222391 where the\n`isLogsDataSourceContext` check would not work for logs data source sub\nprofiles, since it was checking against the context `profileId`, which\nwould be different for each sub profile. Instead the utility now checks\nthe shape of the context, which should work reliably across sub\nprofiles.\n\n### Checklist\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"027b9c47a14faa336bcff7ef64a5d1fbf07bfb78"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223988","number":223988,"mergeCommit":{"message":"[Discover] Fix `isLogsDataSourceContext` check for logs data source sub profiles (#223988)\n\n## Summary\n\nThis PR fixes an issue I noticed while reviewing #222391 where the\n`isLogsDataSourceContext` check would not work for logs data source sub\nprofiles, since it was checking against the context `profileId`, which\nwould be different for each sub profile. Instead the utility now checks\nthe shape of the context, which should work reliably across sub\nprofiles.\n\n### Checklist\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"027b9c47a14faa336bcff7ef64a5d1fbf07bfb78"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
|
Hi @kpatticha. Can you add the correct team or feature label to this PR so it gets pulled into the correct release notes? Thank you! |
@florent-leborgne I have already added the |
|
@kpatticha Yes, a Team or Feature label to help extract this PR into the right release notes and release notes section. For example |
Closing #221919
Summary
In this PR, I'm adding the Attributes doc viwer tab for the Observability solution view.
The tab should be visible for all discover documents that have any of the following prefixes
Also,
Important
The content of the tab is not inlcuded in this PR. it will be part of this ticket
Additional changes
For the existing profiles, logs, traces I updated the condition to check the solution
From
params.rootContext.profileId === OBSERVABILITY_ROOT_PROFILE_IDtoparams.rootContext.solutionType === SolutionType.ObservabilityIMO both are prone to errors.
I updated the type https://github.com/elastic/kibana/pull/222391/files#diff-ff7a53f0c234902226be3e34978326985dfffadabb8ae722b6c3fc2115085d11R14 but it might not be enough.
Test
How to generate OTel data
How to test
kibana.yaml