[Discover][Profiles] Add profileId for document profiles in telemetry context for relevant events #213222
Labels
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:medium
Medium Level of Effort
Project:OneDiscover
Enrich Discover with contextual awareness
Team:DataDiscovery
Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Summary
Background
With the introduction of profiles in Discover, the
discoverProfiles
attribute was added to the telemetry context to include theprofileId
for active Data Source Profiles.While working on the Document Profile implementation, I noticed that the
profileId
is not included in thediscoverProfiles
attribute for document profiles in the event context.Why?
As explained by @jughosta, it wasn't implemented because multiple document profiles can be resolved on the same page depending on the data in the rows. Adding them to the
discoverProfiles
attribute on load (as is done for data source profiles) wouldn't clarify which profile was actually in action at the time of the event.Goal
The goal of this issue is to add the
profileId
for document profiles when relevant. This may involve manually adding the event context in specific cases when using theebtManager
.For example, when calling
onAddFilter
from the flyout, we could pass the context for that specific event optionally, making sure it doesn't unintentionally carry over to other events.The text was updated successfully, but these errors were encountered: