elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.73k stars 8.14k forks source link

[LaunchDarkly] Use deploymentId as the userId #158845

Closed afharo closed 1 year ago

afharo commented 1 year ago

We want to replace the current userId reported to LaunchDarkly. Instead of the hashed cloudId, it should use the raw deploymentId.

Implementation details

The relevant lines to change are linked below:

Server-side

https://github.com/elastic/kibana/blob/cc05731603df2ca9a89cd268c3be7026848a075b/x-pack/plugins/cloud_integrations/cloud_experiments/server/plugin.ts#L90

Here, the cloud plugin already exposes the deploymentId, so it should be just about

- userId: createSHA256Hash(deps.cloud.cloudId),
+ userId: deps.cloud.deploymentId,

Browser-side

https://github.com/elastic/kibana/blob/cc05731603df2ca9a89cd268c3be7026848a075b/x-pack/plugins/cloud_integrations/cloud_experiments/public/plugin.ts#L83

Here, the cloud plugin does not return it yet. So we need to expose it in the cloud plugin's contract and use it in this plugin.

elasticmachine commented 1 year ago

Pinging @elastic/platform-onboarding (Team:Journey/Onboarding)

jdbuhl commented 1 year ago

@afharo I'm not sure this falls in the scope of work for the onboarding team- Which team in Kibana implemented the launchdarkly integration? Same applies to https://github.com/elastic/kibana/issues/158845

afharo commented 1 year ago

@dandreaj, this integration was implemented by Kibana Core as a request from the Onboarding team. Similarly, the changes have been requested by @osmanis as part of https://elasticco.atlassian.net/browse/KBNA-9082. I was hoping your team could apply the changes, and we can approve the PR.