[maps] fix Maps embeddables in a dashboard not capturing map id in execution context#153616
Merged
nreese merged 14 commits intoelastic:mainfrom Mar 28, 2023
Merged
[maps] fix Maps embeddables in a dashboard not capturing map id in execution context#153616nreese merged 14 commits intoelastic:mainfrom
nreese merged 14 commits intoelastic:mainfrom
Conversation
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
Contributor
Author
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Contributor
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
nickpeihl
approved these changes
Mar 28, 2023
Contributor
nickpeihl
left a comment
There was a problem hiding this comment.
lgtm! this is great and will make it much easier for users and support to audit and troubleshoot es queries from kibana!
code review and tested logging execution contexts and x-opaque-id headers
| } | ||
|
|
||
| async getTooltipProperties(properties: unknown): Promise<ITooltipProperty[]> { | ||
| async getTooltipProperties(properties: GeoJsonProperties): Promise<ITooltipProperty[]> { |
| params.set('executionContextId', executionContextId); | ||
| } | ||
|
|
||
| return `${mvtUrlServicePath}?${params.toString()}`; |
Contributor
There was a problem hiding this comment.
Nice use of URLSearchParams!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#153218
Existing execution context implementation spread results from
executionContextServiceStart().get()to add mapid. This implementation did not work when map was embedded in another application. When embedded,executionContextServiceStart().get()returned theidof the parent application and not theidfor the map.This PR resolves the issue by building executionContext directly in MapEmbeddable and MapApp. MapApp uses
savedObjectIdforexecutionContext.id. MapEmbeddable usesembeddableIdforexecutionContext.id.The PR also updates the MVT routes to include executionContextId for the execution context with
_mvtcalls.Testing
To view execution context in kibana logs, add below to kibana.dev.yml. For more information https://www.elastic.co/guide/en/kibana/8.7/kibana-troubleshooting-trace-query.html
Execution context for lens and maps panels in dashboard
There is not a lot of consistency for what
typeandnameshould be across Kibana. I found this comment for when lens added execution context for lens embeddable that statedtype:featureandname:sub_feature. Therefore, I followed the lens example and madetype:mapsandname:mapssince maps does not have sub_features.Execution context for maps
There is not a lot of consistency across kibana for
typeandnamein applications. ExecutionContextService.getDefaultContext returns the below so I stuck withapplicationfor type in client andserverfor type in server. Here is one more link that provides some context value ofnameproperty.